diff options
author | Robert Richter <robert.richter@amd.com> | 2009-06-12 17:58:48 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-06-12 17:58:48 +0200 |
commit | 1241eb8f136bf3ea409f61590e7663465906d158 (patch) | |
tree | c8384237f19bb1094d9c90825a74e28393b60d00 /arch/x86/oprofile/op_model_ppro.c | |
parent | 51563a0e5650d0d76539625388d72d62b34c726e (diff) | |
parent | 940010c5a314a7bd9b498593bc6ba1718ac5aec5 (diff) |
Merge commit 'tip/perfcounters-for-linus' into oprofile/master
Conflicts:
arch/x86/oprofile/op_model_ppro.c
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_model_ppro.c')
-rw-r--r-- | arch/x86/oprofile/op_model_ppro.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c index 0a261a5c696e..cd72d5c73b49 100644 --- a/arch/x86/oprofile/op_model_ppro.c +++ b/arch/x86/oprofile/op_model_ppro.c @@ -118,6 +118,13 @@ static int ppro_check_ctrs(struct pt_regs * const regs, u64 val; int i; + /* + * This can happen if perf counters are in use when + * we steal the die notifier NMI. + */ + if (unlikely(!reset_value)) + goto out; + for (i = 0 ; i < num_counters; ++i) { if (!reset_value[i]) continue; @@ -128,6 +135,7 @@ static int ppro_check_ctrs(struct pt_regs * const regs, wrmsrl(msrs->counters[i].addr, -reset_value[i]); } +out: /* Only P6 based Pentium M need to re-unmask the apic vector but it * doesn't hurt other P6 variant */ apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); |