powerpc/perf: Check that events only include valid bits on Power8
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 28 Jun 2013 08:15:10 +0000 (18:15 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 01:49:50 +0000 (11:49 +1000)
commitd8bec4c9cd58f6d3679e09b7293851fb92ad7557
treeb8fd60813068d7ecc0df32b5bb6e4db680843427
parentb14b6260efeee6eb8942c6e6420e31281892acb6
powerpc/perf: Check that events only include valid bits on Power8

A mistake we have made in the past is that we pull out the fields we
need from the event code, but don't check that there are no unknown bits
set. This means that we can't ever assign meaning to those unknown bits
in future.

Although we have once again failed to do this at release, it is still
early days for Power8 so I think we can still slip this in and get away
with it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
CC: <stable@vger.kernel.org> [v3.10]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/perf/power8-pmu.c