aboutsummaryrefslogtreecommitdiff
path: root/linux-user/riscv
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-09-08 16:44:03 +0100
committerLaurent Vivier <laurent@vivier.eu>2021-09-13 20:35:45 +0200
commit3b249d2661c752e75ef6d2d4ac63bdf9a921dd4b (patch)
treefaf09d4f4c391da701d450cdff471553b77aed4f /linux-user/riscv
parenta57e0c3657b764fa0311ffca2c72bd8dcd39e8af (diff)
downloadqemu-3b249d2661c752e75ef6d2d4ac63bdf9a921dd4b.zip
qemu-3b249d2661c752e75ef6d2d4ac63bdf9a921dd4b.tar.gz
qemu-3b249d2661c752e75ef6d2d4ac63bdf9a921dd4b.tar.bz2
linux-user: Split linux-user internals out of qemu.h
qemu.h is included in various non-linux-user files (which mostly want the TaskState struct and the functions for doing usermode access to guest addresses like lock_user(), unlock_user(), get_user*(), etc). Split out the parts that are only used in linux-user itself into a new user-internals.h. This leaves qemu.h with basically three things: * the definition of the TaskState struct * the user-access functions and macros * do_brk() all of which are needed by code outside linux-user that includes qemu.h. The addition of all the extra #include lines was done with sed -i '/include.*qemu\.h/a #include "user-internals.h"' $(git grep -l 'include.*qemu\.h' linux-user) (and then undoing the change to fpa11.h). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210908154405.15417-8-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/riscv')
-rw-r--r--linux-user/riscv/cpu_loop.c1
-rw-r--r--linux-user/riscv/signal.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c
index 47978c4..9859a36 100644
--- a/linux-user/riscv/cpu_loop.c
+++ b/linux-user/riscv/cpu_loop.c
@@ -21,6 +21,7 @@
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu.h"
+#include "user-internals.h"
#include "cpu_loop-common.h"
#include "signal-common.h"
#include "elf.h"
diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c
index 9405c7f..f7f33bc 100644
--- a/linux-user/riscv/signal.c
+++ b/linux-user/riscv/signal.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
#include "qemu.h"
+#include "user-internals.h"
#include "signal-common.h"
#include "linux-user/trace.h"