提交 5a376e4f 编写于 作者: R Richard Henderson

target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX

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: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
上级 ed53a636
...@@ -951,8 +951,6 @@ struct ppc_radix_page_info { ...@@ -951,8 +951,6 @@ struct ppc_radix_page_info {
* + real/paged mode combinations. The other two modes are for * + real/paged mode combinations. The other two modes are for
* external PID load/store. * external PID load/store.
*/ */
#define MMU_MODE8_SUFFIX _epl
#define MMU_MODE9_SUFFIX _eps
#define PPC_TLB_EPID_LOAD 8 #define PPC_TLB_EPID_LOAD 8
#define PPC_TLB_EPID_STORE 9 #define PPC_TLB_EPID_STORE 9
......
...@@ -177,14 +177,7 @@ static void dcbz_common(CPUPPCState *env, target_ulong addr, ...@@ -177,14 +177,7 @@ static void dcbz_common(CPUPPCState *env, target_ulong addr,
} else { } else {
/* Slow path */ /* Slow path */
for (i = 0; i < dcbz_size; i += 8) { for (i = 0; i < dcbz_size; i += 8) {
if (epid) { cpu_stq_mmuidx_ra(env, addr + i, 0, mmu_idx, retaddr);
#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);
}
} }
} }
} }
...@@ -216,7 +209,7 @@ void helper_icbiep(CPUPPCState *env, target_ulong addr) ...@@ -216,7 +209,7 @@ void helper_icbiep(CPUPPCState *env, target_ulong addr)
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
/* See comments above */ /* See comments above */
addr &= ~(env->dcache_line_size - 1); 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 #endif
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册