code. Make it possible to use it from the *-user code as wel.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
softmmu/physmem.c | 5 -----
target/meson.build | 2 ++
target/target-common.c | 9 +++++++++
3 files changed, 11 insertions(+), 5 deletions(-)
create mode 100644 target/target-common.c
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index bda475a719d..6bdd944fe88 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -3359,11 +3359,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 a53a60486fc..dee2ac47e02 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 00000000000..6868a1f490f
--- /dev/null
+++ b/target/target-common.c
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include "qemu/osdep.h"
+
+#include "exec/exec-all.h"
+
+int qemu_target_page_mask(void)
+{
+ return TARGET_PAGE_MASK;
+}