]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/xtensa: Use probe_access for itlb_hit_test
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 9 Dec 2019 23:21:52 +0000 (15:21 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 16 Jan 2020 01:13:09 +0000 (15:13 -1000)
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é <philmd@redhat.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/xtensa/mmu_helper.c

index f15bff306f3437844b1a9963a222e1df6514c633..b01ff9399ae6f749f32444dd59a2bd40c39ccab7 100644 (file)
 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)