summaryrefslogtreecommitdiffstats
path: root/target/openrisc
diff options
context:
space:
mode:
authorRichard Henderson2018-05-23 05:43:25 +0200
committerStafford Horne2018-07-02 17:05:28 +0200
commit5ce5dad3527e024c297f73f9eb79098235efba6b (patch)
tree42257d11686b0ca5418702ea13b00bf740844018 /target/openrisc
parenttarget/openrisc: Use identical sizes for ITLB and DTLB (diff)
downloadqemu-5ce5dad3527e024c297f73f9eb79098235efba6b.tar.gz
qemu-5ce5dad3527e024c297f73f9eb79098235efba6b.tar.xz
qemu-5ce5dad3527e024c297f73f9eb79098235efba6b.zip
target/openrisc: Stub out handle_mmu_fault for softmmu
This hook is only used by CONFIG_USER_ONLY. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'target/openrisc')
-rw-r--r--target/openrisc/mmu.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c
index a4613e9ae4..f4c0a3e217 100644
--- a/target/openrisc/mmu.c
+++ b/target/openrisc/mmu.c
@@ -177,42 +177,17 @@ static void cpu_openrisc_raise_mmu_exception(OpenRISCCPU *cpu,
cpu->env.lock_addr = -1;
}
-#ifndef CONFIG_USER_ONLY
int openrisc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size,
int rw, int mmu_idx)
{
+#ifdef CONFIG_USER_ONLY
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
- int ret = 0;
- hwaddr physical = 0;
- int prot = 0;
-
- ret = get_phys_addr(cpu, &physical, &prot, address, rw);
-
- if (ret == TLBRET_MATCH) {
- tlb_set_page(cs, address & TARGET_PAGE_MASK,
- physical & TARGET_PAGE_MASK, prot,
- mmu_idx, TARGET_PAGE_SIZE);
- ret = 0;
- } else if (ret < 0) {
- cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret);
- ret = 1;
- }
-
- return ret;
-}
+ cpu_openrisc_raise_mmu_exception(cpu, address, rw, 0);
+ return 1;
#else
-int openrisc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size,
- int rw, int mmu_idx)
-{
- OpenRISCCPU *cpu = OPENRISC_CPU(cs);
- int ret = 0;
-
- cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret);
- ret = 1;
-
- return ret;
-}
+ g_assert_not_reached();
#endif
+}
#ifndef CONFIG_USER_ONLY
hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)