mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-04 17:05:12 -04:00
s390/pai_crypto: Introduce PAI crypto specific event delete function
Introduce PAI crypto specific event delete function to handle additional actions to be done at event removal. 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
35a27bad07
commit
3abb6b1675
@@ -138,7 +138,6 @@ static void pai_event_destroy(struct perf_event *event)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
static_branch_dec(&pai_key);
|
||||
free_page(PAI_SAVE_AREA(event));
|
||||
if (event->cpu == -1) {
|
||||
struct cpumask *mask = PAI_CPU_MASK(event);
|
||||
@@ -151,6 +150,12 @@ static void pai_event_destroy(struct perf_event *event)
|
||||
}
|
||||
}
|
||||
|
||||
static void paicrypt_event_destroy(struct perf_event *event)
|
||||
{
|
||||
static_branch_dec(&pai_key);
|
||||
pai_event_destroy(event);
|
||||
}
|
||||
|
||||
static u64 pai_getctr(unsigned long *page, int nr, unsigned long offset)
|
||||
{
|
||||
if (offset)
|
||||
@@ -360,7 +365,7 @@ static int paicrypt_event_init(struct perf_event *event)
|
||||
int rc = pai_event_init(event, PAI_PMU_CRYPTO);
|
||||
|
||||
if (!rc) {
|
||||
event->destroy = pai_event_destroy;
|
||||
event->destroy = paicrypt_event_destroy;
|
||||
static_branch_inc(&pai_key);
|
||||
}
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user