[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1wOEkoteJRu+qpE0k3gJ0fRnwfn1Zrtcnmgn5wT4yQdw@mail.gmail.com>
Date: Mon, 6 Dec 2021 09:59:24 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Sai Prakash Ranjan <quic_saipraka@...cinc.com>
Cc: Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Arnd Bergmann <arnd@...db.de>,
Steven Rostedt <rostedt@...dmis.org>,
Marc Zyngier <maz@...nel.org>,
gregkh <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
quic_psodagud@...cinc.com,
Prasad Sodagudi <psodagud@...eaurora.org>
Subject: Re: [PATCHv5 3/4] tracing: Add register read/write tracing support
On Mon, Dec 6, 2021 at 9:28 AM Sai Prakash Ranjan
<quic_saipraka@...cinc.com> wrote:
> diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> index 420ff4bc67fd..9f55bcc51de1 100644
> --- a/kernel/trace/Kconfig
> +++ b/kernel/trace/Kconfig
> @@ -95,6 +95,13 @@ config RING_BUFFER_ALLOW_SWAP
> Allow the use of ring_buffer_swap_cpu.
> Adds a very slight overhead to tracing when enabled.
>
> +config TRACE_MMIO_ACCESS
> + bool "Register read/write tracing"
> + depends on TRACING
> + help
> + Create tracepoints for MMIO read/write operations. These trace events
> + can be used for logging all MMIO read/write operations.
I think this needs a 'depends on ARCH_HAVE_TRACE_MMIO_ACCESS'
or similar.
> +void log_read_mmio(u8 width, const volatile void __iomem *addr)
> +{
> + trace_rwmmio_read(CALLER_ADDR0, CALLER_ADDR1, width, addr);
> +}
Here, it may be better to pass the caller address as an argument, I think
CALLER_ADDR1 is not always reliable, though it's possible that it is
in the configurations when this file gets enabled.
Arnd
Powered by blists - more mailing lists