Use the new MMU_INDEX() helper to specify the index of the CPUTLB which
should be used.  Additionally, in a follow-up patch this helper allows
then to optimize the tcg code generation.

Signed-off-by: Helge Deller <del...@gmx.de>
---
 target/xtensa/cpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index 87fe992ba6..2f1349b13d 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -699,11 +699,11 @@ static inline uint32_t 
xtensa_replicate_windowstart(CPUXtensaState *env)
 }

 /* MMU modes definitions */
-#define MMU_USER_IDX 3
+#define MMU_USER_IDX MMU_INDEX(3)

 static inline int cpu_mmu_index(CPUXtensaState *env, bool ifetch)
 {
-    return xtensa_get_cring(env);
+    return MMU_INDEX(xtensa_get_cring(env));
 }

 #define XTENSA_TBFLAG_RING_MASK 0x3
--
2.41.0


Reply via email to