powerpc/perf: Infrastructure to support addition of blacklisted events
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Sun, 4 Mar 2018 11:56:26 +0000 (17:26 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Mar 2018 08:25:10 +0000 (19:25 +1100)
commitb58064da046243f0c988afd939997e9317dc6d48
treefb4f46c1cd26dda819f835e21ec284afb7edcf55
parentcd1231d7035fea894118d5155ff984cdaf1ac1a2
powerpc/perf: Infrastructure to support addition of blacklisted events

Introduce code to support addition of blacklisted events for a
processor version. Blacklisted events are events that are known to not
count correctly on that CPU revision, and so should be prevented from
being counted so as to avoid user confusion.

A 'pointer' and 'int' variable to hold the number of events are added
to 'struct power_pmu', along with a generic function to loop through
the list to validate the given event. Generic function
'is_event_blacklisted' is called in power_pmu_event_init() to detect
and reject early.

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/perf_event_server.h
arch/powerpc/perf/core-book3s.c