[PATCHv5 4/4] asm-generic/io: Add logging support for MMIO accessors

Arnd Bergmann arnd at arndb.de
Mon Dec 6 02:01:05 PST 2021


On Mon, Dec 6, 2021 at 10:52 AM Sai Prakash Ranjan
<quic_saipraka at quicinc.com> wrote:
>
> Yes just the trace after read/write won't serve our usecase where we
> expect crashes/hangs on accessing
> these registers but internally we did have a log_post_read_mmio() as
> well, if it is useful then I can add it.

Are there any downsides to tracing both before and after, besides another growth
in binary size? Aside from the 'value', that would also allow
measuring the time it
takes to complete a readl(), which may be valuable for other users as these
can be significant.

Not sure how to best do that that, we could return a timestamp from the 'before'
tracepoint and pass it into the 'after' tracepoint in order to log the
difference, or just
rely on calculating the differences in user space based on the log.

For the 'write' style accessors, the timing data would be less interesting, at
least for posted PCI transactions, but it may be helpful to do the same for
symmetry reasons.

         Arnd



More information about the linux-arm-kernel mailing list