[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/38] exec/user: Do not include 'cpu.h' in 'abitypes.h'
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 28/38] exec/user: Do not include 'cpu.h' in 'abitypes.h' |
Date: |
Fri, 26 Apr 2024 21:41:48 +0200 |
"exec/user/abitypes.h" requires:
- "exec/cpu-defs.h" (TARGET_LONG_BITS)
- "exec/tswap.h" (tswap32)
In order to avoid "cpu.h", pick the minimum required headers.
Assert this user-specific header is only included from user
emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20231212123401.37493-20-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/user/abitypes.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h
index 731f345ff5..3ec1969368 100644
--- a/include/exec/user/abitypes.h
+++ b/include/exec/user/abitypes.h
@@ -1,7 +1,12 @@
#ifndef EXEC_USER_ABITYPES_H
#define EXEC_USER_ABITYPES_H
-#include "cpu.h"
+#ifndef CONFIG_USER_ONLY
+#error Cannot include this header from system emulation
+#endif
+
+#include "exec/cpu-defs.h"
+#include "exec/tswap.h"
#include "user/tswap-target.h"
#ifdef TARGET_ABI32
--
2.41.0
- [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field, (continued)
- [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 17/38] accel/tcg: Include missing headers in 'tb-jmp-cache.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 19/38] accel/tcg: Rename helper-head.h -> helper-head.h.inc, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 23/38] exec/cpu-all: Reduce 'qemu/rcu.h' header inclusion, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 21/38] accel/nvmm: Use accel-specific per-vcpu @dirty field, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 22/38] accel/hvf: Use accel-specific per-vcpu @dirty field, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 24/38] exec/cpu-all: Remove unused 'qemu/thread.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 25/38] exec/cpu-all: Remove unused tswapls() definitions, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 26/38] exec: Declare target_words_bigendian() in 'exec/tswap.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 27/38] exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 28/38] exec/user: Do not include 'cpu.h' in 'abitypes.h',
Philippe Mathieu-Daudé <=
- [PULL 29/38] exec: Declare abi_ptr type in its own 'abi_ptr.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 30/38] exec: Declare MMUAccessType type in 'mmu-access-type.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 31/38] exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 32/38] exec: Restrict TCG specific declarations of 'cputlb.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 33/38] exec: Restrict 'cpu_ldst.h' to TCG accelerator, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 34/38] exec: Rename 'exec/user/guest-base.h' as 'user/guest-base.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 35/38] exec: Restrict inclusion of 'user/guest-base.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 36/38] exec: Move CPUTLBEntry helpers to cputlb.c, Philippe Mathieu-Daudé, 2024/04/26
- [PULL 37/38] hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h', Philippe Mathieu-Daudé, 2024/04/26
- [PULL 38/38] plugins: Include missing 'qemu/bitmap.h' header, Philippe Mathieu-Daudé, 2024/04/26