qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 5/6] target/s390x: Use atomic operations for


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3 5/6] target/s390x: Use atomic operations for COMPARE SWAP
Date: Wed, 10 May 2017 07:07:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 05/09/2017 08:51 PM, Thomas Huth wrote:
+    int mem_idx = cpu_mmu_index(env, false);
+    Int128 oldv;
+    bool fail;
+
+    if (parallel_cpus) {
+#ifndef CONFIG_ATOMIC128
+        cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
+#else
+        TCGMemOpIdx oi = make_memop_idx(MO_TEQ | MO_ALIGN_16, mem_idx);
+        oldv = helper_atomic_cmpxchgo_be_mmu(env, addr, cmpv, newv, oi, ra);
+        fail = !int128_eq(oldv, cmpv);
+#endif
+    } else {

Have you seen the compilation issue that patchew reported? I think
you've got to move the definition of mem_idx into the "#else" part, too.

No, I didn't.  But I can see it now that you point it out.
I'll fix that and also make sure to test on a host that does not have CONFIG_ATOMIC128.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]