]> 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)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 16 Jun 2025 10:26:25 +0000 (11:26 +0100)
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>
linux-user/arm/cpu_loop.c

index e8417d040691a04a3edc0f5508f047571beac8fa..33f63951a958a5a48ced2d1e187264d691e5c940 100644 (file)
@@ -363,6 +363,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]);