[PATCH v2 3/7] target/arm: Segregate target-specific user-only fields

Richard Henderson posted 7 patches 2 days, 13 hours ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Peter Maydell <peter.maydell@linaro.org>
[PATCH v2 3/7] target/arm: Segregate target-specific user-only fields
Posted by Richard Henderson 2 days, 13 hours ago
In CPUARMState, we have one field that is only used for
AArch32 and one that is only used for AArch64.  Use one
more ifdef to avoid adding both at the same time.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/cpu.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 657ff4ab20..b11a31c807 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -812,12 +812,13 @@ typedef struct CPUArchState {
     const struct arm_boot_info *boot_info;
     /* Store GICv3CPUState to access from this struct */
     void *gicv3state;
-#else /* CONFIG_USER_ONLY */
-    /* For usermode syscall translation.  */
-    bool eabi;
+#elif defined(TARGET_AARCH64)
     /* Linux syscall tagged address support */
     bool tagged_addr_enable;
-#endif /* CONFIG_USER_ONLY */
+#else
+    /* For usermode syscall translation.  */
+    bool eabi;
+#endif /* !CONFIG_USER_ONLY */
 } CPUARMState;
 
 static inline void set_feature(CPUARMState *env, int feature)
-- 
2.43.0
Re: [PATCH v2 3/7] target/arm: Segregate target-specific user-only fields
Posted by Philippe Mathieu-Daudé 2 days, 12 hours ago
On 9/4/26 05:50, Richard Henderson wrote:
> In CPUARMState, we have one field that is only used for
> AArch32 and one that is only used for AArch64.  Use one
> more ifdef to avoid adding both at the same time.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/cpu.h | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>