diff options
-rw-r--r-- | arch/x86/include/asm/perf_event.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index dbc082685d52..ff5ede128bae 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h | |||
@@ -49,7 +49,7 @@ | |||
49 | INTEL_ARCH_INV_MASK| \ | 49 | INTEL_ARCH_INV_MASK| \ |
50 | INTEL_ARCH_EDGE_MASK|\ | 50 | INTEL_ARCH_EDGE_MASK|\ |
51 | INTEL_ARCH_UNIT_MASK|\ | 51 | INTEL_ARCH_UNIT_MASK|\ |
52 | INTEL_ARCH_EVENT_MASK) | 52 | INTEL_ARCH_EVTSEL_MASK) |
53 | 53 | ||
54 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 0x3c | 54 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 0x3c |
55 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) | 55 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 07fa0c2faa09..951213a51489 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -100,12 +100,17 @@ struct cpu_hw_events { | |||
100 | .weight = HWEIGHT64((u64)(n)), \ | 100 | .weight = HWEIGHT64((u64)(n)), \ |
101 | } | 101 | } |
102 | 102 | ||
103 | #define INTEL_EVENT_CONSTRAINT(c, n) EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK) | 103 | #define INTEL_EVENT_CONSTRAINT(c, n) \ |
104 | #define FIXED_EVENT_CONSTRAINT(c, n) EVENT_CONSTRAINT(c, n, INTEL_ARCH_FIXED_MASK) | 104 | EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVTSEL_MASK) |
105 | 105 | ||
106 | #define EVENT_CONSTRAINT_END EVENT_CONSTRAINT(0, 0, 0) | 106 | #define FIXED_EVENT_CONSTRAINT(c, n) \ |
107 | EVENT_CONSTRAINT(c, n, INTEL_ARCH_FIXED_MASK) | ||
107 | 108 | ||
108 | #define for_each_event_constraint(e, c) for ((e) = (c); (e)->cmask; (e)++) | 109 | #define EVENT_CONSTRAINT_END \ |
110 | EVENT_CONSTRAINT(0, 0, 0) | ||
111 | |||
112 | #define for_each_event_constraint(e, c) \ | ||
113 | for ((e) = (c); (e)->cmask; (e)++) | ||
109 | 114 | ||
110 | /* | 115 | /* |
111 | * struct x86_pmu - generic x86 pmu | 116 | * struct x86_pmu - generic x86 pmu |