On 14/10/25 22:35, Anton Johansson wrote:
All debug.h definitions except for RV_MAX_TRIGGERS are internal to
target/riscv.  Move RV_MAX_TRIGGERS to cpu.h and include debug.h from
all translation units which relied on the cpu.h include.

Signed-off-by: Anton Johansson <[email protected]>
Reviewed-by: Pierrick Bouvier <[email protected]>
---
  target/riscv/cpu.h         | 2 +-
  target/riscv/debug.h       | 2 --
  target/riscv/cpu.c         | 3 +++
  target/riscv/csr.c         | 3 +++
  target/riscv/debug.c       | 1 +
  target/riscv/tcg/tcg-cpu.c | 1 +
  6 files changed, 9 insertions(+), 3 deletions(-)


diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index f169eb4bba..f4dd3b48d5 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -37,6 +37,9 @@
  #include "kvm/kvm_riscv.h"
  #include "tcg/tcg-cpu.h"
  #include "tcg/tcg.h"
+#if !defined(CONFIG_USER_ONLY)
+#include "debug.h"
+#endif

For target specific header, we prefer the path relative to $srcdir:

  #include "target/riscv/debug.h"

Otherwise,

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to