Commit ed8777fc authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf_events, x86: Fix event constraint masks

Since constraints are specified on the event number, not number
and unit mask shorten the constraint masks so that we'll
actually match something.
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <20100127221121.967610372@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 2e841873
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
INTEL_ARCH_INV_MASK| \ INTEL_ARCH_INV_MASK| \
INTEL_ARCH_EDGE_MASK|\ INTEL_ARCH_EDGE_MASK|\
INTEL_ARCH_UNIT_MASK|\ INTEL_ARCH_UNIT_MASK|\
INTEL_ARCH_EVENT_MASK) INTEL_ARCH_EVTSEL_MASK)
#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 0x3c #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 0x3c
#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8)
......
...@@ -100,12 +100,17 @@ struct cpu_hw_events { ...@@ -100,12 +100,17 @@ struct cpu_hw_events {
.weight = HWEIGHT64((u64)(n)), \ .weight = HWEIGHT64((u64)(n)), \
} }
#define INTEL_EVENT_CONSTRAINT(c, n) EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK) #define INTEL_EVENT_CONSTRAINT(c, n) \
#define FIXED_EVENT_CONSTRAINT(c, n) EVENT_CONSTRAINT(c, n, INTEL_ARCH_FIXED_MASK) EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVTSEL_MASK)
#define EVENT_CONSTRAINT_END EVENT_CONSTRAINT(0, 0, 0) #define FIXED_EVENT_CONSTRAINT(c, n) \
EVENT_CONSTRAINT(c, n, INTEL_ARCH_FIXED_MASK)
#define for_each_event_constraint(e, c) for ((e) = (c); (e)->cmask; (e)++) #define EVENT_CONSTRAINT_END \
EVENT_CONSTRAINT(0, 0, 0)
#define for_each_event_constraint(e, c) \
for ((e) = (c); (e)->cmask; (e)++)
/* /*
* struct x86_pmu - generic x86 pmu * struct x86_pmu - generic x86 pmu
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment