]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user/arm: Fix return value of SYS_cacheflush
authorJ. Neuschäfer <j.neuschaefer@gmx.net>
Fri, 13 Jun 2025 15:59:32 +0000 (17:59 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 17 Jun 2025 20:32:16 +0000 (23:32 +0300)
Although the emulated cacheflush syscall does nothing, it still needs to
return zero to indicate success.

Cc: qemu-stable@nongnu.org
Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net>
Message-id: 20250613-cache-v1-1-ee9f4a9ba81b@gmx.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 5ad2b1f443a96444cf3e7a2fbe17aae696201012)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
linux-user/arm/cpu_loop.c

index 7416e3216ea181110429a42df6385781b8427a3a..098b54d10e8cd45f4db556aacdd63e3c09067c7c 100644 (file)
@@ -362,6 +362,7 @@ void cpu_loop(CPUARMState *env)
                     switch (n) {
                     case ARM_NR_cacheflush:
                         /* nop */
+                        env->regs[0] = 0;
                         break;
                     case ARM_NR_set_tls:
                         cpu_set_tls(env, env->regs[0]);