summaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile/nmi_int.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-05-05 17:47:17 +0200
committerRobert Richter <robert.richter@amd.com>2010-05-06 15:11:15 +0200
commitbae663bc635e2726c7c5228dbf0f2051e16d1c81 (patch)
tree4330eb087e99c223d7d60d806d9fcf786482686b /arch/x86/oprofile/nmi_int.c
parentoprofile/x86: notify cpus only when daemon is running (diff)
downloadlinux-bae663bc635e2726c7c5228dbf0f2051e16d1c81.tar.xz
linux-bae663bc635e2726c7c5228dbf0f2051e16d1c81.zip
oprofile/x86: make AMD IBS hotplug capable
Current IBS code is not hotplug capable. An offline cpu might not be initialized or deinitialized properly. This patch fixes this by removing on_each_cpu() functions. The IBS init/deinit code is executed in the per-cpu functions model->setup_ctrs() and model->cpu_down() which are also called by hotplug notifiers. model->cpu_down() replaces model->exit() that became obsolete. Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/nmi_int.c')
-rw-r--r--arch/x86/oprofile/nmi_int.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 2a086726cad1..b28d2f1253bb 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -397,6 +397,8 @@ static void nmi_cpu_shutdown(void *dummy)
apic_write(APIC_LVTPC, per_cpu(saved_lvtpc, cpu));
apic_write(APIC_LVTERR, v);
nmi_cpu_restore_registers(msrs);
+ if (model->cpu_down)
+ model->cpu_down();
}
static void nmi_cpu_up(void *dummy)
@@ -769,6 +771,4 @@ void op_nmi_exit(void)
{
if (using_nmi)
exit_sysfs();
- if (model->exit)
- model->exit();
}