Files
Varad Gautam fdd428149a asm-generic/io.h: Skip trace helpers if rwmmio events are disabled
commit 8327bd4fcb upstream.

With `CONFIG_TRACE_MMIO_ACCESS=y`, the `{read,write}{b,w,l,q}{_relaxed}()`
mmio accessors unconditionally call `log_{post_}{read,write}_mmio()`
helpers, which in turn call the ftrace ops for `rwmmio` trace events

This adds a performance penalty per mmio accessor call, even when
`rwmmio` events are disabled at runtime (~80% overhead on local
measurement).

Guard these with `tracepoint_enabled()`.

Signed-off-by: Varad Gautam <varadgautam@google.com>
Fixes: 210031971c ("asm-generic/io: Add logging support for MMIO accessors")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-19 16:30:39 +02:00
..
2022-02-25 09:36:06 +01:00
2023-02-13 22:13:29 +01:00
2023-05-18 11:07:54 +02:00
2021-12-11 23:31:51 +01:00
2022-07-22 17:34:57 -05:00
2023-08-21 13:37:52 -07:00
2022-02-25 09:36:06 +01:00