[PATCH v2 7/9] target/s390x: Build system units in common source set

Philippe Mathieu-Daudé posted 9 patches 4 days, 23 hours ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>, Thomas Huth <thuth@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>
There is a newer version of this series
[PATCH v2 7/9] target/s390x: Build system units in common source set
Posted by Philippe Mathieu-Daudé 4 days, 23 hours ago
Except the ioinst.c file which uses the TARGET_PAGE_SIZE
definition in the ioinst_handle_chsc() method, all other
files in meson's s390x_system_ss[] source set don't use
any target-specific code. Moving them in the other
s390x_common_system_ss[] set to build as common objects
ensures these files won't use any target-specific API
such target_ulong / TARGET_PAGE_SIZE, thus forcing to use
the appropriate types instead (such vaddr, hwaddr, uint64_t,
...).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/meson.build     | 7 ++++++-
 target/s390x/tcg/meson.build | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/target/s390x/meson.build b/target/s390x/meson.build
index 3b34ae034cb..0fb45103afe 100644
--- a/target/s390x/meson.build
+++ b/target/s390x/meson.build
@@ -20,10 +20,14 @@ s390x_ss.add(gen_features_h)
 
 s390x_system_ss = ss.source_set()
 s390x_system_ss.add(files(
+  'ioinst.c',
+))
+
+s390x_common_system_ss = ss.source_set()
+s390x_common_system_ss.add(files(
   'helper.c',
   'arch_dump.c',
   'diag.c',
-  'ioinst.c',
   'machine.c',
   'mmu_helper.c',
   'sigp.c',
@@ -41,4 +45,5 @@ subdir('kvm')
 
 target_arch += {'s390x': s390x_ss}
 target_system_arch += {'s390x': s390x_system_ss}
+target_common_system_arch += {'s390x': s390x_common_system_ss}
 target_user_arch += {'s390x': s390x_user_ss}
diff --git a/target/s390x/tcg/meson.build b/target/s390x/tcg/meson.build
index 515cb8b473d..17c9374d09e 100644
--- a/target/s390x/tcg/meson.build
+++ b/target/s390x/tcg/meson.build
@@ -12,6 +12,6 @@ s390x_ss.add(when: 'CONFIG_TCG', if_true: files(
   'vec_int_helper.c',
   'vec_string_helper.c',
 ))
-s390x_system_ss.add(when: 'CONFIG_TCG', if_true: files(
+s390x_common_system_ss.add(when: 'CONFIG_TCG', if_true: files(
   'debug.c',
 ))
-- 
2.52.0


Re: [PATCH v2 7/9] target/s390x: Build system units in common source set
Posted by Thomas Huth 3 days, 23 hours ago
On 04/02/2026 19.27, Philippe Mathieu-Daudé wrote:
> Except the ioinst.c file which uses the TARGET_PAGE_SIZE
> definition in the ioinst_handle_chsc() method, all other
> files in meson's s390x_system_ss[] source set don't use
> any target-specific code. Moving them in the other
> s390x_common_system_ss[] set to build as common objects
> ensures these files won't use any target-specific API
> such target_ulong / TARGET_PAGE_SIZE, thus forcing to use
> the appropriate types instead (such vaddr, hwaddr, uint64_t,
> ...).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/meson.build     | 7 ++++++-
>   target/s390x/tcg/meson.build | 2 +-
>   2 files changed, 7 insertions(+), 2 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>