Skip to contentSkip to conversation

NUMA-Q breakage 4/7 cpu_init() heisenbug

PATCH William Lee Irwin III 1 participant 1 message Jul 12, 2002

lore
Share & tools
lore
#0 lore raw

cpu_init() (or something nearby) is broken and there is no clear way to tell why. Adding printk's seems to make it go away. hpa seemed to have a notion of what was going on around here.

Workaround below.

Cheers,
Bill

===== arch/i386/kernel/cpu/common.c 1.1 vs edited =====

arch/i386/kernel/cpu/common.c +6 -0
@@ -446,6 +446,8 @@
 	__asm__ __volatile__("lgdt %0": "=m" (gdt_descr));
 	__asm__ __volatile__("lidt %0": "=m" (idt_descr));
 
+	printk(KERN_INFO "Loading GDT/IDT for CPU#%d\n", nr);
+
 	/*
 	 * Delete NT
 	 */
@@ -466,6 +468,8 @@
 	load_TR(nr);
 	load_LDT(&init_mm.context);
 
+	printk(KERN_INFO "Loaded per-cpu LDT/TSS for CPU#%d\n", nr);
+
 	/* Clear %fs and %gs. */
 	asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
 
@@ -483,4 +487,6 @@
 	clear_thread_flag(TIF_USEDFPU);
 	current->used_math = 0;
 	stts();
+
+	printk(KERN_INFO "Cleaned up FPU and debug regs for CPU#%d\n", nr);
 }