mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
s390/pai_crypto: Add common pai_stop() 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. Call this common pai_stop() from paicrypt_del(). 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:
parent
a65a4d7e80
commit
ac03223f07
|
|
@ -435,13 +435,14 @@ static int paicrypt_add(struct perf_event *event, int flags)
|
|||
}
|
||||
|
||||
static void pai_have_sample(struct perf_event *, struct pai_map *);
|
||||
static void paicrypt_stop(struct perf_event *event, int flags)
|
||||
static void pai_stop(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);
|
||||
|
||||
if (!event->attr.sample_period) { /* Counting */
|
||||
paicrypt_read(event);
|
||||
pai_pmu[idx].pmu->read(event);
|
||||
} else { /* Sampling */
|
||||
if (!(event->attach_state & PERF_ATTACH_TASK)) {
|
||||
perf_sched_cb_dec(event->pmu);
|
||||
|
|
@ -454,6 +455,11 @@ static void paicrypt_stop(struct perf_event *event, int flags)
|
|||
event->hw.state = PERF_HES_STOPPED;
|
||||
}
|
||||
|
||||
static void paicrypt_stop(struct perf_event *event, int flags)
|
||||
{
|
||||
pai_stop(event, flags);
|
||||
}
|
||||
|
||||
static void paicrypt_del(struct perf_event *event, int flags)
|
||||
{
|
||||
struct pai_mapptr *mp = this_cpu_ptr(pai_root.mapptr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user