diff mbox series

[2/3] target/tricore: Pass MMUAccessType to get_physical_address()

Message ID 20210127224255.3505711-3-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series target/tricore: Pass MMUAccessType to get_physical_address() | expand

Commit Message

Philippe Mathieu-Daudé Jan. 27, 2021, 10:42 p.m. UTC
'int access_type' and ACCESS_INT are unused, drop them.
Provide the mmu_idx argument to match other targets.
'int rw' is actually the MMUAccessType, rename it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/tricore/helper.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Bastian Koppelmann Feb. 10, 2021, 12:09 p.m. UTC | #1
On Wed, Jan 27, 2021 at 11:42:54PM +0100, Philippe Mathieu-Daudé wrote:
> 'int access_type' and ACCESS_INT are unused, drop them.
> Provide the mmu_idx argument to match other targets.
> 'int rw' is actually the MMUAccessType, rename it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/tricore/helper.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Cheers,
Bastian
diff mbox series

Patch

diff --git a/target/tricore/helper.c b/target/tricore/helper.c
index 81171db833b..c5e997f3215 100644
--- a/target/tricore/helper.c
+++ b/target/tricore/helper.c
@@ -33,7 +33,7 @@  enum {
 #if defined(CONFIG_SOFTMMU)
 static int get_physical_address(CPUTriCoreState *env, hwaddr *physical,
                                 int *prot, target_ulong address,
-                                int rw, int access_type)
+                                MMUAccessType access_type, int mmu_idx)
 {
     int ret = TLBRET_MATCH;
 
@@ -72,13 +72,11 @@  bool tricore_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
     CPUTriCoreState *env = &cpu->env;
     hwaddr physical;
     int prot;
-    int access_type;
     int ret = 0;
 
     rw &= 1;
-    access_type = ACCESS_INT;
     ret = get_physical_address(env, &physical, &prot,
-                               address, rw, access_type);
+                               address, rw, mmu_idx);
 
     qemu_log_mask(CPU_LOG_MMU, "%s address=" TARGET_FMT_lx " ret %d physical "
                   TARGET_FMT_plx " prot %d\n",