[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/21] exec/user: Do not include 'cpu.h' in 'abitypes.h'
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 20/21] exec/user: Do not include 'cpu.h' in 'abitypes.h' |
Date: |
Wed, 17 Apr 2024 20:28:05 +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>
---
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 56e96fcb99..b5c7ad4d1a 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
- [PATCH 15/21] accel/tcg: Include missing 'hw/core/cpu.h' header, (continued)
- [PATCH 15/21] accel/tcg: Include missing 'hw/core/cpu.h' header, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 16/21] exec/cpu-all: Remove unused 'qemu/thread.h' header, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 17/21] exec/cpu-all: Remove unused tswapls() definitions, Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 19/21] exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h', Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 18/21] exec: Declare target_words_bigendian() in 'exec/tswap.h', Philippe Mathieu-Daudé, 2024/04/17
- [PATCH 20/21] exec/user: Do not include 'cpu.h' in 'abitypes.h',
Philippe Mathieu-Daudé <=
- [PATCH 21/21] exec: Declare abi_ptr type in its own 'abi_ptr.h' header, Philippe Mathieu-Daudé, 2024/04/17