aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/oprofile/nmi_int.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2009-07-09 16:29:34 +0200
committerRobert Richter <robert.richter@amd.com>2009-07-20 16:43:18 +0200
commit82a225283fb0d9438549595d9e6f3ecc42b42ad6 (patch)
tree930e6ae4897b4d142127ff6b627b30445d27c77f /arch/x86/oprofile/nmi_int.c
parent5e766e3e433fa2d5d2fdfd8e2432804c91393387 (diff)
x86/oprofile: Use per_cpu() instead of __get_cpu_var()
__get_cpu_var() calls smp_processor_id(). When the cpu id is already known, instead use per_cpu() to avoid generating the id again. 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 e54f6a0b35a..8cd4658370b 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -294,7 +294,7 @@ static void nmi_cpu_shutdown(void *dummy)
{
unsigned int v;
int cpu = smp_processor_id();
- struct op_msrs *msrs = &__get_cpu_var(cpu_msrs);
+ struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu);
/* restoring APIC_LVTPC can trigger an apic error because the delivery
* mode and vector nr combination can be illegal. That's by design: on
@@ -307,7 +307,7 @@ static void nmi_cpu_shutdown(void *dummy)
apic_write(APIC_LVTERR, v);
nmi_cpu_restore_registers(msrs);
#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
- __get_cpu_var(switch_index) = 0;
+ per_cpu(switch_index, cpu) = 0;
#endif
}