mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Heiko Carstens
parent
ac03223f07
commit
42e6a0f6d2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user