Skip to contentSkip to conversation

x86/apbt: conditionally register cpu hp notifier for apbt

PATCH In review Jacob Pan 1 participant 2 messages Apr 19, 2010 – Apr 21, 2010 x86

lore
Share & tools
lore

Jacob Pan

author
#0 lore raw

PATCH 1/1 x86/apbt: conditionally register cpu hp 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.

---
 arch/x86/kernel/apb_timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/apb_timer.c +1 -1
index ff469e4..a353475 100644
@@ -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);
Signature · 1 line
1.5.6.5
#1 lore raw

[tip:x86/urgent] x86, mrst: Conditionally register cpu hotplug notifier for apbt

Commit-ID:  ae7c9b70dcb4313ea3dbcc9a2f240dae6c2b50c0
Gitweb:     http://git.kernel.org/tip/ae7c9b70dcb4313ea3dbcc9a2f240dae6c2b50c0
Author:     Jacob Pan <[email protected]>
AuthorDate: Mon, 19 Apr 2010 11:23:43 -0700
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Tue, 20 Apr 2010 14:38:28 -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.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/apb_timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/apb_timer.c +1 -1
index ff469e4..a353475 100644
@@ -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);