]> www.infradead.org Git - users/dwmw2/linux.git/commit
s390/pai: simplify event start function for perf stat
authorThomas Richter <tmricht@linux.ibm.com>
Fri, 26 Jan 2024 12:32:03 +0000 (13:32 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 20 Feb 2024 13:37:32 +0000 (14:37 +0100)
commit82cb9b618531109824eb8e25b6a3da28d33178ac
treecc695ff65ef627df733195c6e2ba5de0a4388dac
parentfe861b0c8d0693cb65fd45b7e8c756937b5182ae
s390/pai: simplify event start function for perf stat

When an event is started, read the current value of the
PAI counter. This value is saved in event::hw.prev_count.
When an event is stopped, this value is subtracted from the current
value read out at event stop time. The difference is the delta
of this counter.

Simplify the logic and read the event value every time the event is
started. This scheme is identical to other device drivers.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/perf_pai_crypto.c
arch/s390/kernel/perf_pai_ext.c