mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
include/exec: Implement cpu_mmu_index generically
For user-only mode, use MMU_USER_IDX. For system mode, use CPUClass.mmu_index. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
68283ff4b4
commit
a120d32097
31 changed files with 34 additions and 133 deletions
|
@ -118,7 +118,7 @@ static bool mb_cpu_has_work(CPUState *cs)
|
|||
return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI);
|
||||
}
|
||||
|
||||
int mb_cpu_mmu_index(CPUState *cs, bool ifetch)
|
||||
static int mb_cpu_mmu_index(CPUState *cs, bool ifetch)
|
||||
{
|
||||
CPUMBState *env = cpu_env(cs);
|
||||
MicroBlazeCPU *cpu = env_archcpu(env);
|
||||
|
|
|
@ -434,12 +434,6 @@ void mb_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr,
|
|||
MemTxResult response, uintptr_t retaddr);
|
||||
#endif
|
||||
|
||||
int mb_cpu_mmu_index(CPUState *cs, bool ifetch);
|
||||
static inline int cpu_mmu_index(CPUMBState *env, bool ifetch)
|
||||
{
|
||||
return mb_cpu_mmu_index(env_cpu(env), ifetch);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
extern const VMStateDescription vmstate_mb_cpu;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue