Re: Linux v2.5.48

Manfred Spraul (manfred@colorfullife.com)
Mon, 18 Nov 2002 22:28:27 +0100


William Lee Irwin III wrote:

>On Mon, Nov 18, 2002 at 07:30:37PM +0100, Manfred Spraul wrote:
>
>
>>__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.
>>
>>
>
>That's odd, this should (in theory) enable them:
>
>void __init setup_secondary_APIC_clock(void)
>{
> local_irq_disable(); /* FIXME: Do we need this? --RR */
> setup_APIC_timer(calibration_result);
> local_irq_enable();
>}
>
>

That's ok.

>
>> +
>> + local_irq_enable();
>> setup_secondary_APIC_clock();
>>
>
Irqs are enabled just before setup_secondary_APIC_clock();

SMP bootstrap for i386 is
init() [linux/init/main.c()]
-> smp_prepare_cpus()
-> smp_boot_cpus() [arch/i386/kernel/smpboot.c]
->do_boot_cpu()
-> kick the new cpu.
new cpu: spinns on the smp_commenced_mask
***** start of critical area: new cpu must not get an irq
-> do_pre_smp_initcalls()
-> smp_init()
->cpu_up() [kernel/cpu.c]
-> CPU_ONLINE_PREPARE notifier call
***** end of critical area: memory for new cpu initialized
->__cpu_up() [arch/i386/kernel/smpboot.c]
-> set_bit(smp_commenced_mask);

--
    Manfred

- 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/