diff mbox series

[3/7] hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header

Message ID 20250206181827.41557-4-philmd@linaro.org
State Superseded
Headers show
Series hw/riscv: Move few units to common_ss[] | expand

Commit Message

Philippe Mathieu-Daudé Feb. 6, 2025, 6:18 p.m. UTC
opentitan_machine_init() calls get_system_memory(),
which is declared in "exec/address-spaces.h". Include
it in order to avoid when refactoring unrelated headers:

  hw/riscv/opentitan.c:83:29: error: call to undeclared function 'get_system_memory'
     83 |     MemoryRegion *sys_mem = get_system_memory();
        |                             ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/riscv/opentitan.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson Feb. 6, 2025, 8:54 p.m. UTC | #1
On 2/6/25 10:18, Philippe Mathieu-Daudé wrote:
> opentitan_machine_init() calls get_system_memory(),
> which is declared in "exec/address-spaces.h". Include
> it in order to avoid when refactoring unrelated headers:
> 
>    hw/riscv/opentitan.c:83:29: error: call to undeclared function 'get_system_memory'
>       83 |     MemoryRegion *sys_mem = get_system_memory();
>          |                             ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/riscv/opentitan.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
> index b9e56235d87..98a67fe52a8 100644
> --- a/hw/riscv/opentitan.c
> +++ b/hw/riscv/opentitan.c
> @@ -28,6 +28,7 @@
>   #include "hw/riscv/boot.h"
>   #include "qemu/units.h"
>   #include "system/system.h"
> +#include "exec/address-spaces.h"
>   
>   /*
>    * This version of the OpenTitan machine currently supports

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Alistair Francis Feb. 10, 2025, 12:21 a.m. UTC | #2
On Fri, Feb 7, 2025 at 4:20 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> opentitan_machine_init() calls get_system_memory(),
> which is declared in "exec/address-spaces.h". Include
> it in order to avoid when refactoring unrelated headers:
>
>   hw/riscv/opentitan.c:83:29: error: call to undeclared function 'get_system_memory'
>      83 |     MemoryRegion *sys_mem = get_system_memory();
>         |                             ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/riscv/opentitan.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
> index b9e56235d87..98a67fe52a8 100644
> --- a/hw/riscv/opentitan.c
> +++ b/hw/riscv/opentitan.c
> @@ -28,6 +28,7 @@
>  #include "hw/riscv/boot.h"
>  #include "qemu/units.h"
>  #include "system/system.h"
> +#include "exec/address-spaces.h"
>
>  /*
>   * This version of the OpenTitan machine currently supports
> --
> 2.47.1
>
>
diff mbox series

Patch

diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index b9e56235d87..98a67fe52a8 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -28,6 +28,7 @@ 
 #include "hw/riscv/boot.h"
 #include "qemu/units.h"
 #include "system/system.h"
+#include "exec/address-spaces.h"
 
 /*
  * This version of the OpenTitan machine currently supports