diff mbox series

[04/10] target/loongarch/cpu: Restrict "memory.h" header to sysemu

Message ID 20221216220539.7065-5-philmd@linaro.org
State Superseded
Headers show
Series target/misc: Header cleanups around "cpu.h" | expand

Commit Message

Philippe Mathieu-Daudé Dec. 16, 2022, 10:05 p.m. UTC
Missed in 0093b9a5ee ("target/loongarch: Adjust functions
and structure to support user-mode") while cleaning commit
f84a2aacf5 ("target/loongarch: Add LoongArch IOCSR instruction").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/loongarch/cpu.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Henderson Dec. 17, 2022, 12:37 a.m. UTC | #1
On 12/16/22 14:05, Philippe Mathieu-Daudé wrote:
> Missed in 0093b9a5ee ("target/loongarch: Adjust functions
> and structure to support user-mode") while cleaning commit
> f84a2aacf5 ("target/loongarch: Add LoongArch IOCSR instruction").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/loongarch/cpu.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
> index c8612f5466..2f17ac6b47 100644
> --- a/target/loongarch/cpu.h
> +++ b/target/loongarch/cpu.h
> @@ -12,7 +12,9 @@
>   #include "fpu/softfloat-types.h"
>   #include "hw/registerfields.h"
>   #include "qemu/timer.h"
> +#ifndef CONFIG_USER_ONLY
>   #include "exec/memory.h"
> +#endif
>   #include "cpu-csr.h"
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index c8612f5466..2f17ac6b47 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -12,7 +12,9 @@ 
 #include "fpu/softfloat-types.h"
 #include "hw/registerfields.h"
 #include "qemu/timer.h"
+#ifndef CONFIG_USER_ONLY
 #include "exec/memory.h"
+#endif
 #include "cpu-csr.h"
 
 #define IOCSRF_TEMP             0