[RFC PATCH 00/12] Add Linux RISC-V trace support via CoreSight
Zane Leung
liangzhen at linux.spacemit.com
Mon Jun 8 00:28:10 PDT 2026
Hi, all
I plan to extracting CoreSight's architecture-independent framework code
into a shared layer (drivers/hwtracing/trace-common/) to support multiple
trace implementations (ARM CoreSight, RISC-V trace, etc.).
## Proposed Structure
drivers/hwtracing/
├── trace-common/ # New: Generic framework layer
│ ├── trace-core.c # Device reg, path building/enable/disable
│ ├── trace-core.h # Public interfaces
│ └── Makefile/Kconfig (CONFIG_TRACE_FRAMEWORK)
│
├── coresight/ # Modified: ARM-specific only
│ ├── coresight-core.c # ARM CTI, claim/disclaim, module init
│ ├── Makefile/Kconfig # select TRACE_FRAMEWORK
│ └── [existing ARM drivers]
│
└── rvtrace/ # New: RISC-V trace
├── [RISC-V components]
└── Makefile/Kconfig # select TRACE_FRAMEWORK
Is this architectural direction acceptable? Any comments or suggestions are welcome.
More information about the linux-riscv
mailing list