aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-04-13 16:23:14 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-07 05:31:00 -0400
commit31fa58af57c41d2912debf62d47d5811062411f1 (patch)
treeebf17783851862e215f9f0ec966d7f4d85e15614 /arch/x86/kernel/cpu/perf_event.c
parent9d0fcba67e47ff398a6fa86476d4884d472dc98a (diff)
perf, x86: Pass enable bit mask to __x86_pmu_enable_event()
To reuse this function for events with different enable bit masks, this mask is part of the function's argument list now. The function will be used later to control ibs events too. Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1271190201-25705-6-git-send-email-robert.richter@amd.com> 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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index c2c1e10f7b0..4e218d7ac85 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -844,10 +844,10 @@ void hw_perf_enable(void)
844 x86_pmu.enable_all(added); 844 x86_pmu.enable_all(added);
845} 845}
846 846
847static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc) 847static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc,
848 u64 enable_mask)
848{ 849{
849 wrmsrl(hwc->config_base + hwc->idx, 850 wrmsrl(hwc->config_base + hwc->idx, hwc->config | enable_mask);
850 hwc->config | ARCH_PERFMON_EVENTSEL_ENABLE);
851} 851}
852 852
853static inline void x86_pmu_disable_event(struct perf_event *event) 853static inline void x86_pmu_disable_event(struct perf_event *event)
@@ -919,7 +919,8 @@ static void x86_pmu_enable_event(struct perf_event *event)
919{ 919{
920 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 920 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
921 if (cpuc->enabled) 921 if (cpuc->enabled)
922 __x86_pmu_enable_event(&event->hw); 922 __x86_pmu_enable_event(&event->hw,
923 ARCH_PERFMON_EVENTSEL_ENABLE);
923} 924}
924 925
925/* 926/*