[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 34/41] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX
From: |
Richard Henderson |
Subject: |
[PULL 34/41] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX |
Date: |
Wed, 8 Jan 2020 14:45:16 +1100 |
There are only two uses. Within dcbz_common, the local variable
mmu_idx already contains the epid computation, and we can avoid
repeating it for the store. Within helper_icbiep, the usage is
trivially expanded using PPC_TLB_EPID_LOAD.
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: David Gibson <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/ppc/cpu.h | 2 --
target/ppc/mem_helper.c | 11 ++---------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 103bfe9dc2..8ebeaba649 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -951,8 +951,6 @@ struct ppc_radix_page_info {
* + real/paged mode combinations. The other two modes are for
* external PID load/store.
*/
-#define MMU_MODE8_SUFFIX _epl
-#define MMU_MODE9_SUFFIX _eps
#define PPC_TLB_EPID_LOAD 8
#define PPC_TLB_EPID_STORE 9
diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c
index 1351b53f28..56855f2381 100644
--- a/target/ppc/mem_helper.c
+++ b/target/ppc/mem_helper.c
@@ -177,14 +177,7 @@ static void dcbz_common(CPUPPCState *env, target_ulong
addr,
} else {
/* Slow path */
for (i = 0; i < dcbz_size; i += 8) {
- if (epid) {
-#if !defined(CONFIG_USER_ONLY)
- /* Does not make sense on USER_ONLY config */
- cpu_stq_eps_ra(env, addr + i, 0, retaddr);
-#endif
- } else {
- cpu_stq_data_ra(env, addr + i, 0, retaddr);
- }
+ cpu_stq_mmuidx_ra(env, addr + i, 0, mmu_idx, retaddr);
}
}
}
@@ -216,7 +209,7 @@ void helper_icbiep(CPUPPCState *env, target_ulong addr)
#if !defined(CONFIG_USER_ONLY)
/* See comments above */
addr &= ~(env->dcache_line_size - 1);
- cpu_ldl_epl_ra(env, addr, GETPC());
+ cpu_ldl_mmuidx_ra(env, addr, PPC_TLB_EPID_LOAD, GETPC());
#endif
}
--
2.20.1
- [PULL 24/41] target/alpha: Remove MMU_MODE{0,1}_SUFFIX, (continued)
- [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, 2020/01/07
- [PULL 34/41] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX,
Richard Henderson <=
- [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