[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/11] exec/cpu-common: Poison hwaddr type in user-mode emulation
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 11/11] exec/cpu-common: Poison hwaddr type in user-mode emulation |
Date: |
Sat, 9 May 2020 15:09:10 +0200 |
The 'hwaddr' type is restricted to system-mode.
Declare it poisoned on user-mode emulation.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
Checkpatch complains:
WARNING: architecture specific defines should be avoided
#10: FILE: include/exec/cpu-common.h:7:
+#ifdef __GNUC__
---
include/exec/cpu-common.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index b47e5630e7..56cfce8153 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -3,9 +3,13 @@
/* CPU interfaces that are target independent. */
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_USER_ONLY
+#ifdef __GNUC__
+#pragma GCC poison hwaddr
+#endif /* __GNUC__ */
+#else
#include "exec/hwaddr.h"
-#endif
+#endif /* CONFIG_USER_ONLY */
/* The CPU list lock nests outside page_(un)lock or mmap_(un)lock */
void qemu_init_cpu_list(void);
--
2.21.3
- Re: [PATCH 08/11] target/s390x: Restrict system-mode declarations, (continued)
[PATCH 09/11] target/cpu: Restrict handlers using hwaddr type to system-mode, Philippe Mathieu-Daudé, 2020/05/09
Re: [PATCH 09/11] target/cpu: Restrict handlers using hwaddr type to system-mode, David Gibson, 2020/05/10
[PATCH 10/11] exec: Use 'cpu-common.h' instead of system-mode specific 'hwaddr.h', Philippe Mathieu-Daudé, 2020/05/09
[PATCH 11/11] exec/cpu-common: Poison hwaddr type in user-mode emulation,
Philippe Mathieu-Daudé <=