mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/ppc: Convert to CPUClass::tlb_fill
Cc: qemu-ppc@nongnu.org Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
35e911ae2f
commit
351bc97ecf
4 changed files with 26 additions and 22 deletions
|
@ -3057,15 +3057,9 @@ void helper_check_tlb_flush_global(CPUPPCState *env)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* try to fill the TLB and return an exception if error. If retaddr is
|
||||
* NULL, it means that the function was called in C code (i.e. not
|
||||
* from generated code or from helper.c)
|
||||
*
|
||||
* XXX: fix it to restore all registers
|
||||
*/
|
||||
void tlb_fill(CPUState *cs, target_ulong addr, int size,
|
||||
MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
|
||||
bool ppc_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
|
||||
MMUAccessType access_type, int mmu_idx,
|
||||
bool probe, uintptr_t retaddr)
|
||||
{
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cs);
|
||||
|
@ -3078,7 +3072,17 @@ void tlb_fill(CPUState *cs, target_ulong addr, int size,
|
|||
ret = cpu_ppc_handle_mmu_fault(env, addr, access_type, mmu_idx);
|
||||
}
|
||||
if (unlikely(ret != 0)) {
|
||||
if (probe) {
|
||||
return false;
|
||||
}
|
||||
raise_exception_err_ra(env, cs->exception_index, env->error_code,
|
||||
retaddr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void tlb_fill(CPUState *cs, target_ulong addr, int size,
|
||||
MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
|
||||
{
|
||||
ppc_cpu_tlb_fill(cs, addr, size, access_type, mmu_idx, false, retaddr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue