Re: [PATCH v2 02/12] rvtrace: Initial implementation of driver framework
From: Nutty.Liu
Date: Fri Nov 21 2025 - 02:49:21 EST
On 11/1/2025 11:42 PM, Anup Patel wrote:
The RISC-V Trace Control Interface Specification [1] defines a standardGlad to see this series and look forward to supporting 'perf kvm'.
way of implementing RISC-V trace related modular components irrespective
to underlying trace format (E-trace or N-trace). These RISC-V trace
components are organized in a graph-like topology where each RISC-V
hart has its own RISC-V trace encoder component.
Implement a basic driver framework for RISC-V trace where RISC-V trace
components are instantiated by a common platform driver and a separate
RISC-V trace driver for each type of RISC-V trace component.
[1] https://github.com/riscv-non-isa/tg-nexus-trace/releases/download/1.0_Ratified/RISC-V-Trace-Control-Interface.pdf
Co-developed-by: Mayuresh Chitale <mchitale@xxxxxxxxxxxxxxxx>
Signed-off-by: Mayuresh Chitale <mchitale@xxxxxxxxxxxxxxxx>
Signed-off-by: Anup Patel <apatel@xxxxxxxxxxxxxxxx>
---
drivers/Makefile | 1 +
drivers/hwtracing/Kconfig | 2 +
drivers/hwtracing/rvtrace/Kconfig | 16 +
drivers/hwtracing/rvtrace/Makefile | 4 +
drivers/hwtracing/rvtrace/rvtrace-core.c | 501 +++++++++++++++++++
drivers/hwtracing/rvtrace/rvtrace-platform.c | 192 +++++++
include/linux/rvtrace.h | 280 +++++++++++
7 files changed, 996 insertions(+)
create mode 100644 drivers/hwtracing/rvtrace/Kconfig
create mode 100644 drivers/hwtracing/rvtrace/Makefile
create mode 100644 drivers/hwtracing/rvtrace/rvtrace-core.c
create mode 100644 drivers/hwtracing/rvtrace/rvtrace-platform.c
create mode 100644 include/linux/rvtrace.h
Reviewed-by: Nutty Liu <nutty.liu@xxxxxxxxxxx>
Thanks,
Nutty