]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Fix constraint table end marker bug
authorMaria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
Wed, 4 Dec 2013 23:24:37 +0000 (01:24 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 Dec 2013 09:02:30 +0000 (10:02 +0100)
commit5930e2c78cc4c953ef1495ae5d64298b6596f117
tree7377b27a7692d73a828e2ddbf9b33f661192f442
parent02626fd3deb49554894b17b9f8afc8e539553f2f
perf/x86: Fix constraint table end marker bug

The EVENT_CONSTRAINT_END() macro defines the end marker as
a constraint with a weight of zero. This was all fine
until we blacklisted the corrupting memory events on
Intel IvyBridge. These events are blacklisted by using
a counter bitmask of zero. Thus, they also get a constraint
weight of zero.

The iteration macro: for_each_constraint tests the weight==0.
Therefore, it was stopping at the first blacklisted event, i.e.,
0xd0. The corrupting events were therefore considered as
unconstrained and were scheduled on any of the generic counters.

This patch fixes the end marker to have a weight of -1. With
this, the blacklisted events get an empty constraint and cannot
be scheduled which is what we want for now.

Signed-off-by: Maria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
Reviewed-by: Stephane Eranian <eranian@google.com>
Cc: peterz@infradead.org
Cc: ak@linux.intel.com
Cc: jolsa@redhat.com
Cc: zheng.z.yan@intel.com
Link: http://lkml.kernel.org/r/20131204232437.GA10689@starlight
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event.h