mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 04:13:39 +08:00
target/mips: Let cpu_mips_translate_address() take MMUAccessType arg
The single caller, do_translate_address(), passes MMUAccessType to cpu_mips_translate_address(). Let the prototype use it as argument, as it is stricter than an integer. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <20210128144125.3696119-10-f4bug@amsat.org>
This commit is contained in:
parent
1190c53e82
commit
48b28c6a8e
@ -146,7 +146,7 @@ void mips_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
|
||||
int mmu_idx, MemTxAttrs attrs,
|
||||
MemTxResult response, uintptr_t retaddr);
|
||||
hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address,
|
||||
int rw);
|
||||
MMUAccessType access_type);
|
||||
#endif
|
||||
|
||||
#define cpu_signal_handler cpu_mips_signal_handler
|
||||
|
@ -903,17 +903,17 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address,
|
||||
int rw)
|
||||
MMUAccessType access_type)
|
||||
{
|
||||
hwaddr physical;
|
||||
int prot;
|
||||
int ret = 0;
|
||||
|
||||
/* data access */
|
||||
ret = get_physical_address(env, &physical, &prot, address, rw,
|
||||
ret = get_physical_address(env, &physical, &prot, address, access_type,
|
||||
cpu_mmu_index(env, false));
|
||||
if (ret != TLBRET_MATCH) {
|
||||
raise_mmu_exception(env, address, rw, ret);
|
||||
raise_mmu_exception(env, address, access_type, ret);
|
||||
return -1LL;
|
||||
} else {
|
||||
return physical;
|
||||
|
Loading…
Reference in New Issue
Block a user