[Bug 219882] [SMP][patch] 11.1-PRELEASE panics at CPU detection on a single CPU i386 machine
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jun 9 05:29:51 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219882
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 at FreeBSD.org
Reporter: ota at j.email.ne.jp
Keywords: patch
Created attachment 183349
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=183349&action=edit
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 == 1 || smp_started);
if (cpu != NOCPU) {
#else
/*
* Don't do anything during early boot. We will pick up the
* assignment once the APs are started.
*/
if (assign_cpu && cpu != NOCPU) {
#endif
isrc = arg;
sx_xlock(&intrsrc_lock);
error = isrc->is_pic->pic_assign_cpu(isrc, cpu_apic_ids[cpu]);
sx_xunlock(&intrsrc_lock);
} else
error = 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 at 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="GenuineIntel" Id=0xf29 Family=0xf Model=0x2 Stepping=9
Features=0xbfebf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,P
AT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x4400<CNXT-ID,xTPR>
real memory = 536870912 (512 MB)
avail memory = 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
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list