On 5/15/2026 11:04 AM, Anton Johansson via qemu development 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.
> 
> 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: Pierrick Bouvier <[email protected]>

Reply via email to