[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/14] target/sh4: Remove unused 'int access_type' argument
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 03/14] target/sh4: Remove unused 'int access_type' argument |
Date: |
Sat, 6 Mar 2021 16:36:10 +0100 |
get_mmu_address() and get_physical_address() don't use their
'int access_type' argument: remove it along with ACCESS_INT
in superh_cpu_tlb_fill().
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/sh4/helper.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/target/sh4/helper.c b/target/sh4/helper.c
index 4303ebf018b..b49efe84916 100644
--- a/target/sh4/helper.c
+++ b/target/sh4/helper.c
@@ -331,7 +331,7 @@ static int find_utlb_entry(CPUSH4State * env, target_ulong
address, int use_asid
*/
static int get_mmu_address(CPUSH4State * env, target_ulong * physical,
int *prot, target_ulong address,
- int rw, int access_type)
+ int rw)
{
int use_asid, n;
tlb_t *matching = NULL;
@@ -398,7 +398,7 @@ static int get_mmu_address(CPUSH4State * env, target_ulong
* physical,
static int get_physical_address(CPUSH4State * env, target_ulong * physical,
int *prot, target_ulong address,
- int rw, int access_type)
+ int rw)
{
/* P1, P2 and P4 areas do not use translation */
if ((address >= 0x80000000 && address < 0xc0000000) || address >=
0xe0000000) {
@@ -432,7 +432,7 @@ static int get_physical_address(CPUSH4State * env,
target_ulong * physical,
}
/* We need to resort to the MMU */
- return get_mmu_address(env, physical, prot, address, rw, access_type);
+ return get_mmu_address(env, physical, prot, address, rw);
}
hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
@@ -441,7 +441,8 @@ hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vaddr
addr)
target_ulong physical;
int prot;
- get_physical_address(&cpu->env, &physical, &prot, addr, MMU_DATA_LOAD, 0);
+ get_physical_address(&cpu->env, &physical, &prot, addr, MMU_DATA_LOAD);
+
return physical;
}
@@ -813,11 +814,9 @@ bool superh_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
MMU_DTLB_VIOLATION_READ);
#else
target_ulong physical;
- int prot, sh_access_type;
+ int prot;
- sh_access_type = ACCESS_INT;
- ret = get_physical_address(env, &physical, &prot, address,
- access_type, sh_access_type);
+ ret = get_physical_address(env, &physical, &prot, address, access_type);
if (ret == MMU_OK) {
address &= TARGET_PAGE_MASK;
--
2.26.2
- [PULL 00/14] Renesas patches for 2021-03-06, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 01/14] target/sh4: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 02/14] target/sh4: Replace magic value by MMUAccessType definitions, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 03/14] target/sh4: Remove unused 'int access_type' argument,
Philippe Mathieu-Daudé <=
- [PULL 04/14] target/sh4: Let get_physical_address() use MMUAccessType access_type, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 05/14] target/sh4: Remove unused definitions, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 06/14] hw/sh4: Add missing license, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 07/14] hw/sh4: Add missing Kconfig dependency on SH7750 for the R2D board, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 08/14] hw/intc: Introduce SH_INTC Kconfig entry, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 09/14] hw/char: Introduce SH_SCI Kconfig entry, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 10/14] hw/timer: Introduce SH_TIMER Kconfig entry, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 11/14] hw/block: Introduce TC58128 eeprom Kconfig entry, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 12/14] hw/pci-host: Introduce SH_PCI Kconfig entry, Philippe Mathieu-Daudé, 2021/03/06
- [PULL 13/14] hw/sh4: Remove now unused CONFIG_SH4 from Kconfig, Philippe Mathieu-Daudé, 2021/03/06