On 15/5/26 20:04, Anton Johansson wrote:
pmp.h is only needed and included for system mode, however relevant
macros (MAX_RISCV_PMPS, OLD_MAX_RISCV_PMPS, MIN_RISCV_PMP_GRANULARITY)
are required unconditionally by cpu.c, and so are defined in cpu.h.
pmp.h then defines pmp_table_t depending on these macros and so requires
cpu.h, and cpu.h in turn uses pmp_table_t resulting in circular
inclusion.

Move PMP macros to pmp.h and only exose PMP properties in system mode.

Typo "expose"


Signed-off-by: Anton Johansson <[email protected]>
---
  target/riscv/cpu.h | 4 ----
  target/riscv/pmp.h | 4 +++-
  target/riscv/cpu.c | 6 ++++++
  3 files changed, 9 insertions(+), 5 deletions(-)

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

Reply via email to