lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110114075519.GA20428@ywang-moblin2.bj.intel.com>
Date:	Fri, 14 Jan 2011 15:55:19 +0800
From:	Yong Wang <yong.y.wang@...ux.intel.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, Feng Tang <feng.tang@...el.com>,
	Jacob Pan <jacob.jun.pan@...el.com>,
	Alan Cox <alan@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] 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.

Signed-off-by: Yong Wang <yong.y.wang@...el.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ