aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/include/asm/perf_event_server.h
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>2018-03-04 17:26:26 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-27 19:25:10 +1100
commitb58064da046243f0c988afd939997e9317dc6d48 (patch)
treefb4f46c1cd26dda819f835e21ec284afb7edcf55 /arch/powerpc/include/asm/perf_event_server.h
parentpowerpc/perf: Prevent kernel address leak via perf_get_data_addr() (diff)
downloadwireguard-linux-b58064da046243f0c988afd939997e9317dc6d48.tar.xz
wireguard-linux-b58064da046243f0c988afd939997e9317dc6d48.zip
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>
Diffstat (limited to 'arch/powerpc/include/asm/perf_event_server.h')
-rw-r--r--arch/powerpc/include/asm/perf_event_server.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h
index 723bf48e7494..67a8a9585d50 100644
--- a/arch/powerpc/include/asm/perf_event_server.h
+++ b/arch/powerpc/include/asm/perf_event_server.h
@@ -53,6 +53,8 @@ struct power_pmu {
[PERF_COUNT_HW_CACHE_OP_MAX]
[PERF_COUNT_HW_CACHE_RESULT_MAX];
+ int n_blacklist_ev;
+ int *blacklist_ev;
/* BHRB entries in the PMU */
int bhrb_nr;
};