[PATCH v1 1/2] powerpc/mmiotrace: Add MMIO Tracing tool for PowerPC
Michael Ellerman
mpe at ellerman.id.au
Fri Jun 28 17:02:48 AEST 2024
Jialong Yang <jialong.yang at shingroup.cn> writes:
> mmiotrace is a useful tool to trace MMIO accesses. Nowadays, it only
> supported on x86 and x86_64 platforms.
I've never used mmiotrace, and don't know it well.
I'm not necessarily opposed to merging it, but AFAIK it was mostly used
for reverse engineering proprietary drivers, where the driver itself
couldn't be easily instrumented. Is that what you're using it for?
For drivers where we have the source wouldn't it be easier to just use
tracepoints in the MMIO accessors?
Is it still in-use/maintained on the x86 side?
> Here is a support for powerpc.
> The manual is located at Documentation/trace/mmiotrace.rst which means
> I have not changed user API. People will be easy to use it.
> Almost all files are copied from x86/mm, there are only some
> differences from hardware and architectures software.
>
> LINK: https://lore.kernel.org/lkml/20080127195536.50809974@daedalus.pq.iki.fi/
>
> Signed-off-by: Jialong Yang <jialong.yang at shingroup.cn>
> ---
> arch/powerpc/Kconfig.debug | 3 +
> arch/powerpc/mm/Makefile | 1 +
> arch/powerpc/mm/kmmio.c | 649 +++++++++++++++++++++++++++++++
> arch/powerpc/mm/mmio-mod.c | 414 ++++++++++++++++++++
> arch/powerpc/mm/mmiotrace_arch.c | 149 +++++++
> arch/powerpc/mm/mmiotrace_arch.h | 25 ++
> arch/powerpc/mm/pf_in.c | 185 +++++++++
> arch/powerpc/mm/pf_in.h | 33 ++
> 8 files changed, 1459 insertions(+)
At a glance most of that code could be shared between arches. I don't
think I can merge that as-is, without some attempt to split the generic
parts out.
cheers
More information about the Linuxppc-dev
mailing list