Skip to content

Commit

Permalink
x86, mrst: Conditionally register cpu hotplug notifier for apbt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jacob Pan authored and H. Peter Anvin committed Apr 20, 2010
1 parent 05ce7bf commit ae7c9b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/apb_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ae7c9b7

Please sign in to comment.