[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/41] target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFF
From: |
Richard Henderson |
Subject: |
[PULL 33/41] target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX |
Date: |
Wed, 8 Jan 2020 14:45:15 +1100 |
The generated functions aside from *_real are unused.
The *_real functions have a couple of users in mem_helper.c;
use *_mmuidx_ra instead, with MMU_REAL_IDX.
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
v2: Use *_mmuidx_ra directly, without intermediate macros.
---
target/s390x/cpu.h | 5 -----
target/s390x/mem_helper.c | 10 +++++-----
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index e195e5c7c8..8a557fd8d1 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -36,11 +36,6 @@
#define TARGET_INSN_START_EXTRA_WORDS 2
-#define MMU_MODE0_SUFFIX _primary
-#define MMU_MODE1_SUFFIX _secondary
-#define MMU_MODE2_SUFFIX _home
-#define MMU_MODE3_SUFFIX _real
-
#define MMU_USER_IDX 0
#define S390_MAX_CPUS 248
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 20a84b3912..428bde4c54 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -2026,7 +2026,7 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t
real_addr)
real_addr = wrap_address(env, real_addr) & TARGET_PAGE_MASK;
for (i = 0; i < TARGET_PAGE_SIZE; i += 8) {
- cpu_stq_real_ra(env, real_addr + i, 0, ra);
+ cpu_stq_mmuidx_ra(env, real_addr + i, 0, MMU_REAL_IDX, ra);
}
return 0;
@@ -2260,11 +2260,11 @@ void HELPER(idte)(CPUS390XState *env, uint64_t r1,
uint64_t r2, uint32_t m4)
for (i = 0; i < entries; i++) {
/* addresses are not wrapped in 24/31bit mode but table index is */
raddr = table + ((index + i) & 0x7ff) * sizeof(entry);
- entry = cpu_ldq_real_ra(env, raddr, ra);
+ entry = cpu_ldq_mmuidx_ra(env, raddr, MMU_REAL_IDX, ra);
if (!(entry & REGION_ENTRY_I)) {
/* we are allowed to not store if already invalid */
entry |= REGION_ENTRY_I;
- cpu_stq_real_ra(env, raddr, entry, ra);
+ cpu_stq_mmuidx_ra(env, raddr, entry, MMU_REAL_IDX, ra);
}
}
}
@@ -2291,9 +2291,9 @@ void HELPER(ipte)(CPUS390XState *env, uint64_t pto,
uint64_t vaddr,
pte_addr += VADDR_PAGE_TX(vaddr) * 8;
/* Mark the page table entry as invalid */
- pte = cpu_ldq_real_ra(env, pte_addr, ra);
+ pte = cpu_ldq_mmuidx_ra(env, pte_addr, MMU_REAL_IDX, ra);
pte |= PAGE_ENTRY_I;
- cpu_stq_real_ra(env, pte_addr, pte, ra);
+ cpu_stq_mmuidx_ra(env, pte_addr, pte, MMU_REAL_IDX, ra);
/* XXX we exploit the fact that Linux passes the exact virtual
address here - it's not obliged to! */
--
2.20.1
- [PULL 23/41] target/nios2: Remove MMU_MODE{0,1}_SUFFIX, (continued)
- [PULL 23/41] target/nios2: Remove MMU_MODE{0,1}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 24/41] target/alpha: Remove MMU_MODE{0,1}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 25/41] target/cris: Remove MMU_MODE{0,1}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 26/41] target/i386: Remove MMU_MODE{0,1,2}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 27/41] target/microblaze: Remove MMU_MODE{0,1,2}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 28/41] target/sh4: Remove MMU_MODE{0,1}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 29/41] target/unicore32: Remove MMU_MODE{0,1}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 30/41] target/xtensa: Remove MMU_MODE{0,1,2,3}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 31/41] target/m68k: Use cpu_*_mmuidx_ra instead of MMU_MODE{0, 1}_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 32/41] target/mips: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 33/41] target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX,
Richard Henderson <=
- [PULL 34/41] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 35/41] cputlb: Remove support for MMU_MODE*_SUFFIX, Richard Henderson, 2020/01/07
- [PULL 36/41] cputlb: Expand cpu_ldst_template.h in cputlb.c, Richard Henderson, 2020/01/07
- [PULL 37/41] tcg: Search includes from the project root source directory, Richard Henderson, 2020/01/07
- [PULL 38/41] tcg: Search includes in the parent source directory, Richard Henderson, 2020/01/07
- [PULL 39/41] tcg: Move TCG headers to include/tcg/, Richard Henderson, 2020/01/07
- [PULL 40/41] configure: Remove tcg/ from the preprocessor include search list, Richard Henderson, 2020/01/07
- [PULL 41/41] MAINTAINERS: Replace Claudio Fontana for tcg/aarch64, Richard Henderson, 2020/01/07
- Re: [PULL 00/41] tcg patch queue, Peter Maydell, 2020/01/10