x86, mrst: Conditionally register cpu hotplug notifier for apbt

Previous thread: powerpc/pseries: Flush lazy kernel mappings after unplug operations by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)

Next thread: NFS: Fix an unstable write data integrity race by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, April 29, 2010 - 5:59 pm

Gitweb:     http://git.kernel.org/linus/ae7c9b70dcb4313ea3dbcc9a2f240dae6c2b50c0
Commit:     ae7c9b70dcb4313ea3dbcc9a2f240dae6c2b50c0
Parent:     05ce7bfe547c9fa967d9cab6c37867a9cb6fb3fa
Author:     Jacob Pan <jacob.jun.pan@linux.intel.com>
AuthorDate: Mon Apr 19 11:23:43 2010 -0700
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Tue Apr 20 14:38:28 2010 -0700

    x86, mrst: Conditionally register cpu hotplug notifier for apbt
    
    APB timer is used on Moorestown platforms but not on a standard PC.
    If APB timer code is compiled in but not initialized at run-time due
    to lack of FW reported SFI table, kernel would panic when the non-boot
    CPUs are offlined and notifier is called.
    
    https://bugzilla.kernel.org/show_bug.cgi?id=15786
    
    This patch ensures CPU hotplug notifier for APB timer is only registered
    when the APBT timer block is initialized.
    
    Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
    LKML-Reference: <1271701423-1162-1-git-send-email-jacob.jun.pan@linux.intel.com>
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/kernel/apb_timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c
index ff469e4..a353475 100644
--- a/arch/x86/kernel/apb_timer.c
+++ b/arch/x86/kernel/apb_timer.c
@@ -429,7 +429,7 @@ static int apbt_cpuhp_notify(struct notifier_block *n,
 
 static __init int apbt_late_init(void)
 {
-	if (disable_apbt_percpu)
+	if (disable_apbt_percpu || !apb_timer_block_enabled)
 		return 0;
 	/* This notifier should be called after workqueue is ready */
 	hotcpu_notifier(apbt_cpuhp_notify, -20);
--

Previous thread: powerpc/pseries: Flush lazy kernel mappings after unplug operations by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)

Next thread: NFS: Fix an unstable write data integrity race by Linux Kernel Mailing List on Thursday, April 29, 2010 - 5:59 pm. (1 message)