diff options
| author | Thomas Richter <tmricht@linux.ibm.com> | 2025-11-05 15:38:57 +0100 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2025-11-14 11:30:07 +0100 |
| commit | 42e6a0f6d2f0e9ac96d0d6045624a1fa44ab6871 (patch) | |
| tree | fac54d0009476aff662c845d30418ef4d3d4f09b | |
| parent | ac03223f0723cf7ee11171be963f19958a91f7b3 (diff) | |
s390/pai_crypto: Add common pai_del() function
To support one common PAI PMU device driver which handles
both PMUs pai_crypto and pai_ext, use a common naming scheme
for structures and variables suitable for both device drivers.
Add a common usable function pai_stop() for the event on a CPU.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
| -rw-r--r-- | arch/s390/kernel/perf_pai_crypto.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/s390/kernel/perf_pai_crypto.c b/arch/s390/kernel/perf_pai_crypto.c index 5d4b9ffe3cb1..a014f4a1b443 100644 --- a/arch/s390/kernel/perf_pai_crypto.c +++ b/arch/s390/kernel/perf_pai_crypto.c @@ -460,18 +460,24 @@ static void paicrypt_stop(struct perf_event *event, int flags) pai_stop(event, flags); } -static void paicrypt_del(struct perf_event *event, int flags) +static void pai_del(struct perf_event *event, int flags) { struct pai_mapptr *mp = this_cpu_ptr(pai_root.mapptr); struct pai_map *cpump = mp->mapptr; + int idx = PAI_PMU_IDX(event); - paicrypt_stop(event, PERF_EF_UPDATE); + pai_pmu[idx].pmu->stop(event, PERF_EF_UPDATE); if (--cpump->active_events == 0) { local_ctl_clear_bit(0, CR0_CRYPTOGRAPHY_COUNTER_BIT); WRITE_ONCE(get_lowcore()->ccd, 0); } } +static void paicrypt_del(struct perf_event *event, int flags) +{ + pai_del(event, flags); +} + /* Create raw data and save it in buffer. Calculate the delta for each * counter between this invocation and the last invocation. * Returns number of bytes copied. |
