diff mbox series

[1/4] target: Make qemu_softmmu_page_mask() available for *-user

Message ID 20230630203720.528552-2-iii@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series accel/tcg: Move perf and debuginfo support to tcg | expand

Commit Message

Ilya Leoshkevich June 30, 2023, 8:36 p.m. UTC
Currently qemu_softmmu_page_mask() is usable only from the softmmu
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

Comments

Philippe Mathieu-Daudé June 30, 2023, 11:25 p.m. UTC | #1
On 30/6/23 22:36, Ilya Leoshkevich wrote:
> Currently qemu_softmmu_page_mask() is usable only from the softmmu

s/qemu_softmmu_page_mask/qemu_target_page_mask/?

> 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;
> +}
diff mbox series

Patch

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;
+}