diff mbox

[1/1] ppc-e500: on write to MMUCSR0, pass GPR content, not SPR number, to low-level TLB-flush routine

Message ID 1401297936-4878-2-git-send-email-alexander.zuepke@hs-rm.de
State New
Headers show

Commit Message

Alex Zuepke May 28, 2014, 5:25 p.m. UTC
A  "mtspr SPRMMUCSR0, reg"  always flushed TLB0,
because it passed the SPR number 0x3f4 to the flush routine.
But we want to flush either TLB0 or TBL1 depending on the GPR value.

Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
---
 target-ppc/translate_init.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Alexander Graf May 28, 2014, 10:02 p.m. UTC | #1
On 28.05.14 19:25, Alex Zuepke wrote:
> A  "mtspr SPRMMUCSR0, reg"  always flushed TLB0,
> because it passed the SPR number 0x3f4 to the flush routine.
> But we want to flush either TLB0 or TBL1 depending on the GPR value.
>
> Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>

Thanks, applied to ppc-next with a shortened subject line :).


Alex
diff mbox

Patch

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 4d94015..e4680cb 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -1455,9 +1455,7 @@  static void spr_write_e500_l1csr0 (void *opaque, int sprn, int gprn)
 
 static void spr_write_booke206_mmucsr0 (void *opaque, int sprn, int gprn)
 {
-    TCGv_i32 t0 = tcg_const_i32(sprn);
-    gen_helper_booke206_tlbflush(cpu_env, t0);
-    tcg_temp_free_i32(t0);
+    gen_helper_booke206_tlbflush(cpu_env, cpu_gpr[gprn]);
 }
 
 static void spr_write_booke_pid (void *opaque, int sprn, int gprn)