[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/20] target/openrisc: Stub out handle_mmu_fault fo
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 15/20] target/openrisc: Stub out handle_mmu_fault for softmmu |
Date: |
Sun, 27 May 2018 09:13:19 -0500 |
This hook is only used by CONFIG_USER_ONLY.
Signed-off-by: Richard Henderson <address@hidden>
---
target/openrisc/mmu.c | 35 +++++------------------------------
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c
index ee3016a8b9..2f1f16fd6b 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)
--
2.17.0
- [Qemu-devel] [PATCH 07/20] target/openrisc: Form the spr index from tcg, (continued)
- [Qemu-devel] [PATCH 07/20] target/openrisc: Form the spr index from tcg, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 09/20] target/openrisc: Remove indirect function calls for mmu, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 11/20] target/openrisc: Reduce tlb to a single dimension, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 12/20] target/openrisc: Fix tlb flushing in mtspr, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 13/20] target/openrisc: Fix cpu_mmu_index, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 14/20] target/openrisc: Use identical sizes for ITLB and DTLB, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 15/20] target/openrisc: Stub out handle_mmu_fault for softmmu,
Richard Henderson <=
- [Qemu-devel] [PATCH 16/20] target/openrisc: Log interrupts, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 17/20] target/openrisc: Increase the TLB size, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 18/20] target/openrisc: Reorg tlb lookup, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 20/20] target/or1k: Add support in scripts/qemu-binfmt-conf.sh, Richard Henderson, 2018/05/27
- [Qemu-devel] [PATCH 19/20] target/openrisc: Add print_insn_or1k, Richard Henderson, 2018/05/27
- Re: [Qemu-devel] [PATCH 00/20] target/openrisc improvements, no-reply, 2018/05/27
- Re: [Qemu-devel] [PATCH 00/20] target/openrisc improvements, Stafford Horne, 2018/05/30