qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 23/23] exec/cpu_ldst: Avoid including 'cpu.h'


From: Philippe Mathieu-Daudé
Subject: [PATCH v2 23/23] exec/cpu_ldst: Avoid including 'cpu.h'
Date: Tue, 12 Dec 2023 13:33:59 +0100

"exec/cpu_ldst.h" doesn't need to huge "cpu.h" header,
but simply:

 - exec/cpu-defs.h           (TARGET_LONG_BITS)
 - exec/tlb-common.h         (CPUTLBEntry)

 - exec/user/abitypes.h      (abi_ulong)
 - exec/user/guest-base.h    (guest_base)
 - exec/cpu-all.h            (GUEST_ADDR_MAX and env_cpu)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
env_cpu() will soon be removed from "exec/cpu-all.h". Do we
want to move GUEST_ADDR_MAX declaration to "user/guest-base.h",
eventually renaming it as "user/guest-addr.h"?
---
 include/exec/cpu_ldst.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index e039cc7f80..ec0784bf15 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -65,11 +65,14 @@
 #include "exec/memopidx.h"
 #include "exec/abi_ptr.h"
 #include "qemu/int128.h"
-#include "cpu.h"
+#include "exec/cpu-defs.h"
+#include "exec/tlb-common.h"
 
 #if defined(CONFIG_USER_ONLY)
 
+#include "exec/user/abitypes.h"
 #include "exec/user/guest-base.h"
+#include "exec/cpu-all.h"
 
 #ifndef TARGET_TAGGED_ADDRESSES
 static inline abi_ptr cpu_untagged_addr(CPUState *cs, abi_ptr x)
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]