Re: [RFC PATCH 00/12] Add Linux RISC-V trace support via CoreSight
From: Zane Leung
Date: Mon Jun 08 2026 - 03:31:13 EST
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.