mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86, apbt: Set affinity properly for apb timers in all cases
@ 2011-01-14  7:55 Yong Wang
  0 siblings, 0 replies; only message in thread
From: Yong Wang @ 2011-01-14  7:55 UTC (permalink / raw)
  To: Thomas Gleixner, H. Peter Anvin, Feng Tang, Jacob Pan, Alan Cox
  Cc: linux-kernel

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@intel.com>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-14  8:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14  7:55 [PATCH] x86, apbt: Set affinity properly for apb timers in all cases Yong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®