]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/pai: Deny all events not handled by this PMU
authorThomas Richter <tmricht@linux.ibm.com>
Mon, 25 Aug 2025 07:53:27 +0000 (09:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:35:44 +0000 (16:35 +0200)
commit5665ac5c5151ce73fe734d7818e34ef50708af7e
tree35413bd37ce64ddebe2d27d7543242faec587850
parent88525accf16947ab459f8e91c27c8c53e1d612d7
s390/pai: Deny all events not handled by this PMU

[ Upstream commit 85941afd2c404247e583c827fae0a45da1c1d92c ]

Each PAI PMU device driver returns -EINVAL when an event is out of
its accepted range. This return value aborts the search for an
alternative PMU device driver to handle this event.
Change the return value to -ENOENT. This return value is used to
try other PMUs instead.  This makes the PMUs more robust when
the sequence of PMU device driver initialization changes (at boot time)
or by using modules.

Fixes: 39d62336f5c12 ("s390/pai: add support for cryptography counters")
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/perf_pai_crypto.c
arch/s390/kernel/perf_pai_ext.c