summaryrefslogtreecommitdiff
path: root/arch/s390/Kconfig
diff options
context:
space:
mode:
authorThomas Richter <tmricht@linux.ibm.com>2021-04-28 14:30:56 +0300
committerVasily Gorbik <gor@linux.ibm.com>2021-06-07 18:06:58 +0300
commitd552a58d708020963f6973a8b3b690f19ac81c99 (patch)
treed1790d1128279050f99368e7c99058834413d9d1 /arch/s390/Kconfig
parent614124bea77e452aa6df7a8714e8bc820b489922 (diff)
downloadlinux-d552a58d708020963f6973a8b3b690f19ac81c99.tar.xz
s390/cpumf: remove counter transaction call backs
The command 'perf stat -e cycles ...' triggers the following function sequence in the CPU Measurement Facility counter device driver: perf_pmu_event_init() __hw_perf_event_init() validate_ctr_auth() validate_ctr_version() During event creation, the counter number is checked in functions validate_ctr_auth() and validate_ctr_version() to verify it is a valid counter and supported by the hardware. If this is not the case, both functions return an error and the event is not created. System call perf_event_open() returns an error in this case. Later on the event is installed in the kernel event subsystem and the driver functions cpumf_pmu_add() and cpumf_pmu_commit_txn() are called to install the counter event by the hardware. Since both events have been verified at event creation, there is no need to re-evaluate the authorization state. This can not change since on * LPARs the authorization change requires a restart of the LPAR (and thus a reboot of the kernel) * DPMs can not take resources away, just add them. Also the sequence of CPU Measurement facility counter device driver calls is cpumf_pmu_start_txn cpumf_pmu_add cpumf_pmu_start cpumf_pmu_commit_txn for every single event. Which means the condition in cpumf_pmu_add() is never met and validate_ctr_auth() is never called. This leaves the counter device driver transaction functions with just one task: start_txn: Verify a transaction is not in flight and call perf_pmu_disable() cancel_txn, commit_txn: Verify a transaction is in flight and call perf_pmu_enable() The same functionality is provided by the default transaction handling functions in kernel/events/core.c. Use those by removing the counter device driver private call back functions. Suggested-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/Kconfig')
0 files changed, 0 insertions, 0 deletions