diff mbox series

[11/23] target/s390x: Use MMU_INDEX() helper

Message ID 20230806120001.89130-12-deller@gmx.de (mailing list archive)
State New, archived
Headers show
Series Introduce MMU_INDEX() | expand

Commit Message

Helge Deller Aug. 6, 2023, 11:59 a.m. UTC
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 <deller@gmx.de>
---
 target/s390x/cpu.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--
2.41.0
diff mbox series

Patch

diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index eb5b65b7d3..05a4b7b299 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -38,7 +38,7 @@ 

 #define TARGET_INSN_START_EXTRA_WORDS 2

-#define MMU_USER_IDX 0
+#define MMU_USER_IDX MMU_INDEX(0)

 #define S390_MAX_CPUS 248

@@ -342,10 +342,10 @@  extern const VMStateDescription vmstate_s390_cpu;
 #define CR14_CHANNEL_REPORT_SC  0x0000000010000000ULL

 /* MMU */
-#define MMU_PRIMARY_IDX         0
-#define MMU_SECONDARY_IDX       1
-#define MMU_HOME_IDX            2
-#define MMU_REAL_IDX            3
+#define MMU_PRIMARY_IDX         MMU_INDEX(0)
+#define MMU_SECONDARY_IDX       MMU_INDEX(1)
+#define MMU_HOME_IDX            MMU_INDEX(2)
+#define MMU_REAL_IDX            MMU_INDEX(3)

 static inline int cpu_mmu_index(CPUS390XState *env, bool ifetch)
 {