Skip to contentSkip to conversation

x86, apbt: Set affinity properly for apb timers in all cases

PATCH New Yong Wang 1 participant 1 message Jan 14, 2011 x86

lore
Share & tools
lore

Yong Wang

author
#0 lore raw

PATCH 1/1 x86, apbt: Set affinity properly for apb timers in all cases

Commit e4d2ebca only sets timer affinity when system boots. We also need to set affinity properly in other cases like when onlining CPU because apb timer acts as per-cpu tick device. Otherwise, we are observing system hang on onling CPU which is offlined previously.

---
 arch/x86/kernel/apb_timer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/kernel/apb_timer.c +2 -1
index 7c9ab59..449b111 100644
@@ -313,9 +313,10 @@ static void apbt_setup_irq(struct apbt_dev *adev)
 	if (adev->irq == 0)
 		return;
 
+	irq_set_affinity(adev->irq, cpumask_of(adev->cpu));
+
 	if (system_state == SYSTEM_BOOTING) {
 		irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
-		irq_set_affinity(adev->irq, cpumask_of(adev->cpu));
 		/* APB timer irqs are set up as mp_irqs, timer is edge type */
 		__set_irq_handler(adev->irq, handle_edge_irq, 0, "edge");
 		if (request_irq(adev->irq, apbt_interrupt_handler,
Signature · 1 line
1.5.5.1