summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-24 09:43:21 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-24 09:43:21 -0800
commit5bd2010fbe027b224db2e74a4fdfec9a7b7918d2 (patch)
tree59106aae3930a3608409c101ec32d68742c8d168 /arch/x86/kernel
parent41f107266b19d100c1bcef9e1e1aef00692c1209 (diff)
parent413541dd66d51f791a0b169d9b9014e4f56be13c (diff)
downloadtalos-obmc-linux-5bd2010fbe027b224db2e74a4fdfec9a7b7918d2.tar.gz
talos-obmc-linux-5bd2010fbe027b224db2e74a4fdfec9a7b7918d2.zip
Merge 3.13-rc5 into staging-next
We want these fixes here to handle some merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/perf_event.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
index fd00bb29425d..c1a861829d81 100644
--- a/arch/x86/kernel/cpu/perf_event.h
+++ b/arch/x86/kernel/cpu/perf_event.h
@@ -262,11 +262,20 @@ struct cpu_hw_events {
__EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK, \
HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_ST_HSW)
-#define EVENT_CONSTRAINT_END \
- EVENT_CONSTRAINT(0, 0, 0)
+/*
+ * We define the end marker as having a weight of -1
+ * to enable blacklisting of events using a counter bitmask
+ * of zero and thus a weight of zero.
+ * The end marker has a weight that cannot possibly be
+ * obtained from counting the bits in the bitmask.
+ */
+#define EVENT_CONSTRAINT_END { .weight = -1 }
+/*
+ * Check for end marker with weight == -1
+ */
#define for_each_event_constraint(e, c) \
- for ((e) = (c); (e)->weight; (e)++)
+ for ((e) = (c); (e)->weight != -1; (e)++)
/*
* Extra registers for specific events.
OpenPOWER on IntegriCloud