[patch] ARM: smpboot: Enable interrupts after marking CPU online/active
tglx at linutronix.de
Fri Oct 7 08:17:02 EDT 2011
On Fri, 7 Oct 2011, Kukjin Kim wrote:
> I think, basically, if SPIs in GIC are used in local timer, the routing
> interrupt like calling irq_set_affinity() to offline CPUs should be
> available when boot time before calling set_cpu_online() because as you know
> the local_timer_setup() which includes setup interrupt is called in
> percpu_timer_setup() now...
> Is there any way to get the flags of struct irqaction from struct irq_data
> in gic_set_affinity()? Or?
No, and you should not even think about it at all.
The problem I can see from all this discussion is related to the early
enabling of interrupts and the per cpu timer setup before the cpu is
marked online. I really do not understand at all why this needs to be
done in order to call calibrate_delay().
calibrate_delay() monitors jiffies, which are updated from the CPU
which is waiting for the new CPU to set the online bit.
So you simply can call calibrate_delay() on the new CPU just from the
interrupt disabled region and move the local timer setup after you
stored the cpu data and before enabling interrupts.
This solves both the cpu_online vs. cpu_active problem and the
affinity setting of the per cpu timers.
@@ -301,17 +301,7 @@ asmlinkage void __cpuinit secondary_star
- * Enable local interrupts.
- * Setup the percpu timer for this CPU.
@@ -323,10 +313,23 @@ asmlinkage void __cpuinit secondary_star
* before we continue.
+ * Setup the percpu timer for this CPU.
+ * cpu_active bit is set, so it's safe to enable interrupts
+ * now.
* OK, it's off to the idle thread for us
More information about the linux-arm-kernel