Nice!
> ------------------------
>
> SECONDARY CPU:
>
> start_secondary
> cpu_init
> smp_callin
> {spin on cpu_callout_map}
> setup_local_APIC
> local_irq_enable
> calibrate_delay
> disable_APIC_timer
> {set our bit in cpu_callin_map}
> synchronise_tsc_api
> {spin on smp_commenced_mask}
> enable_APIC_timer
> {set our bit in cpu_online_map}
> idle
So this is the bug, isn't it? Can the calibrate_delay stuff be moved
until _after_ the bit has been set in smp_commenced_mask??
>
>
> > In this case I'd say "all interrupts". The secondary really
> > should be 100% dormant until all CPU_UP_PREPARE callouts have
> > been run and have returned NOTIFY_OK.
> >
> > At least, that's how I'd have designed it.
>
> Well that makes sense to me. Apart from when I started doing it,
> it seems that in smp_callin we do calibrate_delay, which looks
> like it needs interrupts enabled (I could be wrong). I suppose
> I could just disable them at the end of smp_callin again, but
> it's all rather ugly. Maybe after we do disable_APIC_timer in
> smp_callin.
Maybe you could copy the boot cpu's calibrate_delay result
over to all cpu_possible secondaries, then redo the calibration
for real once the secondary is actually legally up and running.
-
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/