Re: Linux v2.5.48

From: Manfred Spraul (manfred@colorfullife.com)
Date: Mon Nov 18 2002 - 13:30:37 EST


At least the 2nd hunk is bogus:

@@ -1179,13 +1180,18 @@ void __init smp_prepare_cpus(unsigned in
 int __devinit __cpu_up(unsigned int cpu)
 {
         /* This only works at boot for x86. See "rewrite" above. */
- if (test_bit(cpu, &smp_commenced_mask))
+ if (test_bit(cpu, &smp_commenced_mask)) {
+ local_irq_enable();
                 return -ENOSYS;
+ }

__cpu_up is called in the context of the boot cpu, not in the context of
the new cpu.

I think this patch should keep the interrupts disabled until after
smp_commenced is set. It's partially tested: bochs boots until all cpus
are up and then crashes.

I've tested the interrupt flag (pushfl;popfl), noone else enables them.

--
	Manfred

--- 2.5/arch/i386/kernel/smpboot.c 2002-11-04 23:30:27.000000000 +0100 +++ build-2.5/arch/i386/kernel/smpboot.c 2002-11-18 19:19:38.000000000 +0100 @@ -405,8 +405,6 @@ clear_local_APIC(); setup_local_APIC(); - local_irq_enable(); - /* * Get our bogomips. */ @@ -449,6 +447,8 @@ smp_callin(); while (!test_bit(smp_processor_id(), &smp_commenced_mask)) rep_nop(); + + local_irq_enable(); setup_secondary_APIC_clock(); if (nmi_watchdog == NMI_IO_APIC) { disable_8259A_irq(0);

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:23 EST