From owner-freebsd-bugs@freebsd.org Fri Jun 9 05:29:51 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE28AB94585 for ; Fri, 9 Jun 2017 05:29:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A153A7EEE1 for ; Fri, 9 Jun 2017 05:29:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v595Tpj8059731 for ; Fri, 9 Jun 2017 05:29:51 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219882] [SMP][patch] 11.1-PRELEASE panics at CPU detection on a single CPU i386 machine Date: Fri, 09 Jun 2017 05:29:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2017 05:29:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219882 Bug ID: 219882 Summary: [SMP][patch] 11.1-PRELEASE panics at CPU detection on a single CPU i386 machine Product: Base System Version: 11.0-STABLE Hardware: i386 OS: Any Status: New Keywords: patch Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: ota@j.email.ne.jp Keywords: patch Created attachment 183349 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D183349&action= =3Dedit SMP kernel panic fix based on no-SMP kernel implementation atpic_assign_cpu() function calls panic() and kernel fails to boot. After reading the comment of atpic_assig_cpu(), I wondered if non-SMP kernel boots. The result was good - non-SMP kernel booted. I adjusted atpic_assign_cpu() to mimic non-SMP path. sys/x86/x86/intr_machdep.c: static int intr_assign_cpu(void *arg, int cpu) { #ifdef SMP struct intsrc *isrc; int error; #ifdef EARLY_AP_STARTUP MPASS(mp_ncpus =3D=3D 1 || smp_started); if (cpu !=3D NOCPU) { #else /* * Don't do anything during early boot. We will pick up the * assignment once the APs are started. */ if (assign_cpu && cpu !=3D NOCPU) { #endif isrc =3D arg; sx_xlock(&intrsrc_lock); error =3D isrc->is_pic->pic_assign_cpu(isrc, cpu_apic_ids[c= pu]); sx_xunlock(&intrsrc_lock); } else error =3D 0; return (error); #else return (EOPNOTSUPP); #endif } ones in the following files also return EOPNOTSUPP for non-SMP option, too. sys/x86/xen/xen_intr.c sys/sparc64/sparc64/intr_machdep.c dmsg of the machine after applying the patch: FreeBSD 11.1-PRERELEASE #1065 r319639M: Thu Jun 8 01:05:28 EDT 2017 ota@localhost:/usr/obj/usr/src/sys/GENERIC i386 FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0 ) VT(vga): text 80x25 CPU: Mobile Intel(R) Celeron(R) CPU 2.40GHz (2394.05-MHz 686-class CPU) Origin=3D"GenuineIntel" Id=3D0xf29 Family=3D0xf Model=3D0x2 Stepping= =3D9 =20 Features=3D0xbfebf9ff Features2=3D0x4400 real memory =3D 536870912 (512 MB) avail memory =3D 477016064 (454 MB) random: unblocking device. Timecounter "TSC-low" frequency 1197026036 Hz quality 800 taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0 taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0 --=20 You are receiving this mail because: You are the assignee for the bug.=