aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2024-01-24 08:56:06 +0100
committerRichard Henderson <richard.henderson@linaro.org>2024-01-29 21:04:10 +1000
commitf3d57a82003a1e56190e5ca6d8154713ac3e7365 (patch)
tree461a1f6a09c48b5bfacde8e4e76dee2bdcbe2ba7
parentf5e9362af1ad9514fb2cb283cecaa723b5c6cc40 (diff)
downloadqemu-f3d57a82003a1e56190e5ca6d8154713ac3e7365.zip
qemu-f3d57a82003a1e56190e5ca6d8154713ac3e7365.tar.gz
qemu-f3d57a82003a1e56190e5ca6d8154713ac3e7365.tar.bz2
target: Make qemu_target_page_mask() available for *-user
Currently qemu_target_page_mask() is usable only from the softmmu code. Make it possible to use it from the *-user code as well. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-ID: <20231208003754.3688038-2-iii@linux.ibm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240124075609.14756-2-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [rth: Split out change to accel/tcg/perf.c] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--system/physmem.c5
-rw-r--r--target/meson.build2
-rw-r--r--target/target-common.c10
3 files changed, 12 insertions, 5 deletions
diff --git a/system/physmem.c b/system/physmem.c
index cc68a79..5e66d9a 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -3431,11 +3431,6 @@ size_t qemu_target_page_size(void)
return TARGET_PAGE_SIZE;
}
-int qemu_target_page_mask(void)
-{
- return TARGET_PAGE_MASK;
-}
-
int qemu_target_page_bits(void)
{
return TARGET_PAGE_BITS;
diff --git a/target/meson.build b/target/meson.build
index a53a604..dee2ac4 100644
--- a/target/meson.build
+++ b/target/meson.build
@@ -19,3 +19,5 @@ subdir('sh4')
subdir('sparc')
subdir('tricore')
subdir('xtensa')
+
+specific_ss.add(files('target-common.c'))
diff --git a/target/target-common.c b/target/target-common.c
new file mode 100644
index 0000000..903b10c
--- /dev/null
+++ b/target/target-common.c
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include "qemu/osdep.h"
+
+#include "cpu.h"
+#include "exec/target_page.h"
+
+int qemu_target_page_mask(void)
+{
+ return TARGET_PAGE_MASK;
+}