]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/mips: Simplify and fix update_pagemask
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 28 Mar 2025 17:55:26 +0000 (12:55 -0500)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 5 Apr 2025 13:51:01 +0000 (16:51 +0300)
commit7e1dcc10d434a9bb3ae194c3030724cbca2f6e76
treeb6224052d3fd6a45c16aa11dd1a90491dde5f567
parent553334393edc2f20b47d4019972e31e62cd4fca5
target/mips: Simplify and fix update_pagemask

When update_pagemask was split from helper_mtc0_pagemask,
we failed to actually write to the new parameter but continue
to write to env->CP0_PageMask.  Thus the use within
page_table_walk_refill modifies cpu state and not the local
variable as expected.

Simplify by renaming to compute_pagemask and returning the
value directly.  No need for either env or pointer return.

Fixes: 074cfcb4dae ("target/mips: Implement hardware page table walker for MIPS32")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250328175526.368121-4-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: qemu-stable@nongnu.org
(cherry picked from commit 256ba7715b109c080c0c77a3923df9e69736ba17)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/mips/tcg/sysemu/cp0_helper.c
target/mips/tcg/sysemu/tlb_helper.c
target/mips/tcg/tcg-internal.h