remove duplicated tlb_fill definitions for i386 and cris targets
PATCH 1/1 remove duplicated tlb_fill definitions for i386 and cris targets
The following patch removes a duplicated tlb_fill definition from the per target specific exec.h for i386 and cris in favor of the generic one in exec-all.h.
It also rearranges cris' op_helper implement it only in softmmu mode like all other targets.
Carlo
---
Index: target-cris/exec.h
===================================================================
RCS file: /sources/qemu/qemu/target-cris/exec.h,v
retrieving revision 1.2
exec.h +0 -1
@@ -46,7 +46,6 @@int cpu_cris_handle_mmu_fault (CPUState *env,target_ulong address,int rw,int mmu_idx,int is_softmmu); -void tlb_fill (target_ulong addr,int is_write,int mmu_idx,void *retaddr);#if !defined(CONFIG_USER_ONLY )#include "softmmu_exec.h"
Index: target-cris/op_helper.c
===================================================================
RCS file: /sources/qemu/qemu/target-cris/op_helper.c,v retrieving revision 1.4
op_helper.c +6 -0
@@ -22,6 +22,10 @@#include <assert.h> #include "exec.h" +/*****************************************************************************/ +/* Softmmu support */ +#if !defined (CONFIG_USER_ONLY ) +#define MMUSUFFIX _mmu#ifdef __s390__# define GETPC () ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL))
@@ -73,6 +77,8 @@ env = saved_env; } +#endif +void do_unassigned_access (target_phys_addr_t addr,int is_write,int is_exec,int is_asi) {
Index: target-i386/exec.h
===================================================================
RCS file: /sources/qemu/qemu/target-i386/exec.h,v
retrieving revision 1.39
exec.h +0 -2
@@ -164,8 +164,6 @@void cpu_x86_flush_tlb (CPUX86State *env,target_ulong addr);int cpu_x86_handle_mmu_fault (CPUX86State *env,target_ulong addr,int is_write,int mmu_idx,int is_softmmu); -void tlb_fill (target_ulong addr,int is_write,int mmu_idx, -void *retaddr); void __hidden cpu_lock(void); void __hidden cpu_unlock(void); void do_interrupt(int intno, int is_int, int error_code,