]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4486d5a51dcdc2763a78e9a6d936a08fe621aaa3
treefb4f46c1cd26dda819f835e21ec284afb7edcf55
parent24cc2f4f1feebbef549f612005b408b8c8b6aa13
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