diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2023-10-10 16:14:22 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-10-25 15:08:29 +0200 |
commit | a13e8bdf0f788552aa37e1f9a6fe5fcca4095d2b (patch) | |
tree | 84d8a96c742d7503975b94195eb34d0757bef979 /arch/s390/kernel/perf_pai_ext.c | |
parent | 1954da4a2b621a3328a63382cae7e5f5e2af502c (diff) | |
download | lwn-a13e8bdf0f788552aa37e1f9a6fe5fcca4095d2b.tar.gz lwn-a13e8bdf0f788552aa37e1f9a6fe5fcca4095d2b.zip |
s390/pai_crypto: use PERF_ATTACH_TASK define for per task detection
Use define PERF_ATTACH_TASK bit in event->attach_state to determine
system wide invocation or per task invocation in event initialization.
This bit is set in common code and before calling PMU device driver
specific event initialization.
It is set once and never changes. It is save to use and also in
sync with other PMU specific code.
No functional change.
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/perf_pai_ext.c')
-rw-r--r-- | arch/s390/kernel/perf_pai_ext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/perf_pai_ext.c b/arch/s390/kernel/perf_pai_ext.c index e91c77155f08..edceff2143b9 100644 --- a/arch/s390/kernel/perf_pai_ext.c +++ b/arch/s390/kernel/perf_pai_ext.c @@ -248,7 +248,7 @@ static int paiext_event_init(struct perf_event *event) if (rc) return rc; /* Allow only CPU wide operation, no process context for now. */ - if (event->hw.target || event->cpu == -1) + if ((event->attach_state & PERF_ATTACH_TASK) || event->cpu == -1) return -ENOENT; /* Allow only event NNPA_ALL for sampling. */ if (a->sample_period && a->config != PAI_NNPA_BASE) |