[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 19/23] exec/user: Do not include 'cpu.h' in 'abitypes.h'
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 19/23] exec/user: Do not include 'cpu.h' in 'abitypes.h' |
Date: |
Tue, 12 Dec 2023 13:33:55 +0100 |
"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>
---
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 ed10d5fe7e..fbb55684d3 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 "exec/user/tswap-target.h"
#ifdef TARGET_ABI32
--
2.41.0
- Re: [PATCH v2 14/23] exec/cpu-all: Remove unused tswapls() definitions, (continued)
- [PATCH v2 13/23] exec/cpu-all: Reduce 'qemu/rcu.h' header inclusion, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 15/23] exec: Declare target_words_bigendian() in 'exec/tswap.h', Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 16/23] exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h', Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 17/23] target/ppc/excp_helper: Avoid 'abi_ptr' in system emulation, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 18/23] accel/tcg: Un-inline retaddr helpers to 'user-retaddr.h', Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 19/23] exec/user: Do not include 'cpu.h' in 'abitypes.h',
Philippe Mathieu-Daudé <=
- [PATCH v2 20/23] exec: Declare abi_ptr type in its own 'abi_ptr.h' header, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 22/23] exec/cpu-all: Extract page-protection definitions to page-prot-common.h, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 23/23] exec/cpu_ldst: Avoid including 'cpu.h', Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 21/23] exec/cpu-all: Restrict inclusion of 'exec/user/guest-base.h', Philippe Mathieu-Daudé, 2023/12/12
- Re: [PATCH v2 00/23] exec: Rework of various headers (user focused), Philippe Mathieu-Daudé, 2023/12/12