aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2010-03-26 09:08:44 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-26 10:47:24 -0400
commit11164cd4f6dab326a88bdf27f2f8f7c11977e91a (patch)
tree260a9f48f66cce8c5f4e23111ba6be8af6cfa578 /arch/x86/kernel/cpu/perf_event.c
parentea8e61b7bbc4a2faef77db34eb2db2a2c2372ff6 (diff)
perf, x86: Add Nehelem PMU programming errata workaround
Implement the workaround for Intel Errata AAK100 and AAP53. Also, remove the Core-i7 name for Nehalem events since there are also Westmere based i7 chips. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <1269608924.12097.147.camel@laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index f571f514de2a..6f66d4a845ff 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -184,7 +184,7 @@ struct x86_pmu {
184 int version; 184 int version;
185 int (*handle_irq)(struct pt_regs *); 185 int (*handle_irq)(struct pt_regs *);
186 void (*disable_all)(void); 186 void (*disable_all)(void);
187 void (*enable_all)(void); 187 void (*enable_all)(int added);
188 void (*enable)(struct perf_event *); 188 void (*enable)(struct perf_event *);
189 void (*disable)(struct perf_event *); 189 void (*disable)(struct perf_event *);
190 int (*hw_config)(struct perf_event_attr *attr, struct hw_perf_event *hwc); 190 int (*hw_config)(struct perf_event_attr *attr, struct hw_perf_event *hwc);
@@ -576,7 +576,7 @@ void hw_perf_disable(void)
576 x86_pmu.disable_all(); 576 x86_pmu.disable_all();
577} 577}
578 578
579static void x86_pmu_enable_all(void) 579static void x86_pmu_enable_all(int added)
580{ 580{
581 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 581 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
582 int idx; 582 int idx;
@@ -784,7 +784,7 @@ void hw_perf_enable(void)
784 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 784 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
785 struct perf_event *event; 785 struct perf_event *event;
786 struct hw_perf_event *hwc; 786 struct hw_perf_event *hwc;
787 int i; 787 int i, added = cpuc->n_added;
788 788
789 if (!x86_pmu_initialized()) 789 if (!x86_pmu_initialized())
790 return; 790 return;
@@ -836,7 +836,7 @@ void hw_perf_enable(void)
836 cpuc->enabled = 1; 836 cpuc->enabled = 1;
837 barrier(); 837 barrier();
838 838
839 x86_pmu.enable_all(); 839 x86_pmu.enable_all(added);
840} 840}
841 841
842static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc) 842static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc)