From 7510454e3e74aafa2e6c50388bf24904644b6a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 26 Aug 2013 03:01:33 +0200 Subject: cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that while such functions may exist both for *-user and softmmu, only *-user uses the CPUState hook, while softmmu reuses the prototype for calling it directly. Signed-off-by: Andreas Färber --- target-moxie/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'target-moxie/cpu.c') diff --git a/target-moxie/cpu.c b/target-moxie/cpu.c index 32c6104..03d8eb1 100644 --- a/target-moxie/cpu.c +++ b/target-moxie/cpu.c @@ -108,7 +108,9 @@ static void moxie_cpu_class_init(ObjectClass *oc, void *data) cc->do_interrupt = moxie_cpu_do_interrupt; cc->dump_state = moxie_cpu_dump_state; cc->set_pc = moxie_cpu_set_pc; -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_USER_ONLY + cc->handle_mmu_fault = moxie_cpu_handle_mmu_fault; +#else cc->get_phys_page_debug = moxie_cpu_get_phys_page_debug; cc->vmsd = &vmstate_moxie_cpu; #endif -- cgit v1.1