From: Richard Henderson Date: Mon, 9 Dec 2019 23:21:52 +0000 (-0800) Subject: target/xtensa: Use probe_access for itlb_hit_test X-Git-Tag: v5.0.0-rc0~142^2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ecd3571eb100ce1d29b0a2e5fd0918f7fe1d0b90;p=thirdparty%2Fqemu.git target/xtensa: Use probe_access for itlb_hit_test We don't actually need the result of the read, only to probe that the memory mapping exists. This is exactly what probe_access does. This is also the only user of any cpu_ld*_code_ra function. Removing this allows the interface to be removed shortly. Tested-by: Philippe Mathieu-Daudé Acked-by: Max Filippov Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index f15bff306f3..b01ff9399ae 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -63,10 +63,11 @@ void HELPER(itlb_hit_test)(CPUXtensaState *env, uint32_t vaddr) { /* - * Attempt the memory load; we don't care about the result but + * Probe the memory; we don't care about the result but * only the side-effects (ie any MMU or other exception) */ - cpu_ldub_code_ra(env, vaddr, GETPC()); + probe_access(env, vaddr, 1, MMU_INST_FETCH, + cpu_mmu_index(env, true), GETPC()); } void HELPER(wsr_rasid)(CPUXtensaState *env, uint32_t v)