[PATCH] x86, apbt: Set affinity properly for apb timers in allcases

From: Yong Wang
Date: Fri Jan 14 2011 - 03:22:27 EST


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.

Signed-off-by: Yong Wang <yong.y.wang@xxxxxxxxx>
---
arch/x86/kernel/apb_timer.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c
index 7c9ab59..449b111 100644
--- a/arch/x86/kernel/apb_timer.c
+++ b/arch/x86/kernel/apb_timer.c
@@ -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,
--
1.5.5.1

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