diff options
author | Robert Richter <robert.richter@amd.com> | 2010-05-05 11:47:17 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-05-06 09:11:15 -0400 |
commit | bae663bc635e2726c7c5228dbf0f2051e16d1c81 (patch) | |
tree | 4330eb087e99c223d7d60d806d9fcf786482686b /arch/x86/oprofile/nmi_int.c | |
parent | 3de668ee8d5b1e08da3200f926ff5a28aeb99bc2 (diff) |
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.c | 4 |
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) | |||
397 | apic_write(APIC_LVTPC, per_cpu(saved_lvtpc, cpu)); | 397 | apic_write(APIC_LVTPC, per_cpu(saved_lvtpc, cpu)); |
398 | apic_write(APIC_LVTERR, v); | 398 | apic_write(APIC_LVTERR, v); |
399 | nmi_cpu_restore_registers(msrs); | 399 | nmi_cpu_restore_registers(msrs); |
400 | if (model->cpu_down) | ||
401 | model->cpu_down(); | ||
400 | } | 402 | } |
401 | 403 | ||
402 | static void nmi_cpu_up(void *dummy) | 404 | static void nmi_cpu_up(void *dummy) |
@@ -769,6 +771,4 @@ void op_nmi_exit(void) | |||
769 | { | 771 | { |
770 | if (using_nmi) | 772 | if (using_nmi) |
771 | exit_sysfs(); | 773 | exit_sysfs(); |
772 | if (model->exit) | ||
773 | model->exit(); | ||
774 | } | 774 | } |