[PATCH 44/50] target/s390x: Drop CONFIG_ATOMIC64 tests

Richard Henderson posted 50 patches 2 days, 5 hours ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Riku Voipio <riku.voipio@iki.fi>, Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, "Daniel P. Berrangé" <berrange@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony PERARD <anthony@xenproject.org>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, David Hildenbrand <david@kernel.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Peter Xu <peterx@redhat.com>, Li Zhijian <lizhijian@fujitsu.com>, Hyman Huang <yong.huang@smartx.com>, Peter Maydell <peter.maydell@linaro.org>, Helge Deller <deller@gmx.de>, Zhao Liu <zhao1.liu@intel.com>, Eduardo Habkost <eduardo@habkost.net>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Ilya Leoshkevich <iii@linux.ibm.com>, WANG Xuerui <git@xen0n.name>, Stefan Weil <sw@weilnetz.de>
[PATCH 44/50] target/s390x: Drop CONFIG_ATOMIC64 tests
Posted by Richard Henderson 2 days, 5 hours ago
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/s390x/tcg/mem_helper.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 9e5bd3ed07..cc0755c91f 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -1814,9 +1814,7 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
      */
     if (parallel) {
         uint32_t max = 2;
-#ifdef CONFIG_ATOMIC64
         max = 3;
-#endif
         if ((HAVE_CMPXCHG128 ? 0 : fc + 2 > max) ||
             (HAVE_ATOMIC128_RW ? 0 : sc > max)) {
             cpu_loop_exit_atomic(env_cpu(env), ra);
@@ -1855,12 +1853,7 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
             uint64_t ov;
 
             if (parallel) {
-#ifdef CONFIG_ATOMIC64
                 ov = cpu_atomic_cmpxchgq_be_mmu(env, a1, cv, nv, oi8, ra);
-#else
-                /* Note that we asserted !parallel above.  */
-                g_assert_not_reached();
-#endif
             } else {
                 ov = cpu_ldq_mmu(env, a1, oi8, ra);
                 cpu_stq_mmu(env, a1, (ov == cv ? nv : ov), oi8, ra);
-- 
2.43.0
Re: [PATCH 44/50] target/s390x: Drop CONFIG_ATOMIC64 tests
Posted by Pierrick Bouvier 1 day, 13 hours ago
On 1/7/26 9:30 PM, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/mem_helper.c | 7 -------
>   1 file changed, 7 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Re: [PATCH 44/50] target/s390x: Drop CONFIG_ATOMIC64 tests
Posted by Thomas Huth 2 days ago
On 08/01/2026 06.30, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/tcg/mem_helper.c | 7 -------
>   1 file changed, 7 deletions(-)
> 
> diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
> index 9e5bd3ed07..cc0755c91f 100644
> --- a/target/s390x/tcg/mem_helper.c
> +++ b/target/s390x/tcg/mem_helper.c
> @@ -1814,9 +1814,7 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
>        */
>       if (parallel) {
>           uint32_t max = 2;
> -#ifdef CONFIG_ATOMIC64
>           max = 3;
> -#endif
>           if ((HAVE_CMPXCHG128 ? 0 : fc + 2 > max) ||
>               (HAVE_ATOMIC128_RW ? 0 : sc > max)) {
>               cpu_loop_exit_atomic(env_cpu(env), ra);
> @@ -1855,12 +1853,7 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1,
>               uint64_t ov;
>   
>               if (parallel) {
> -#ifdef CONFIG_ATOMIC64
>                   ov = cpu_atomic_cmpxchgq_be_mmu(env, a1, cv, nv, oi8, ra);
> -#else
> -                /* Note that we asserted !parallel above.  */
> -                g_assert_not_reached();
> -#endif
>               } else {
>                   ov = cpu_ldq_mmu(env, a1, oi8, ra);
>                   cpu_stq_mmu(env, a1, (ov == cv ? nv : ov), oi8, ra);

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