Remove cpu_get_phys_page_debug from userspace emulation
authorPaul Brook <paul@codesourcery.com>
Mon, 1 Mar 2010 03:46:18 +0000 (03:46 +0000)
committerPaul Brook <paul@codesourcery.com>
Fri, 12 Mar 2010 18:34:25 +0000 (18:34 +0000)
cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it.

Signed-off-by: Paul Brook <paul@codesourcery.com>
12 files changed:
cpu-all.h
target-alpha/helper.c
target-arm/helper.c
target-cris/helper.c
target-i386/helper.c
target-m68k/helper.c
target-microblaze/helper.c
target-mips/helper.c
target-ppc/helper.c
target-s390x/helper.c
target-sh4/helper.c
target-sparc/helper.c

index e32ea47cfa292f5cc19f24510cd487f257ee9414..481f5277c87d582e3fb81ce12ced44f81f89b643 100644 (file)
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -820,11 +820,6 @@ void cpu_watchpoint_remove_all(CPUState *env, int mask);
 void cpu_single_step(CPUState *env, int enabled);
 void cpu_reset(CPUState *s);
 
-/* Return the physical page corresponding to a virtual one. Use it
-   only for debugging because no protection checks are done. Return -1
-   if no page found. */
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
-
 #define CPU_LOG_TB_OUT_ASM (1 << 0)
 #define CPU_LOG_TB_IN_ASM  (1 << 1)
 #define CPU_LOG_TB_OP      (1 << 2)
@@ -851,6 +846,11 @@ int cpu_str_to_log_mask(const char *str);
 
 #if !defined(CONFIG_USER_ONLY)
 
+/* Return the physical page corresponding to a virtual one. Use it
+   only for debugging because no protection checks are done. Return -1
+   if no page found. */
+target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr);
+
 /* memory API */
 
 extern int phys_ram_fd;
index f35ca9ac54692fd5578c0ccdc0f912cb820b2e9f..46335cdf9c42234977cd459a6a1e862cc0d8f089 100644 (file)
@@ -173,11 +173,6 @@ int cpu_alpha_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
     return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug (CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
 void do_interrupt (CPUState *env)
 {
     env->exception_index = -1;
index 6f40084b2398d1cbd1ed70d20ee12c39cb7c006e..1a181acce33713dbe5a55e66831d2ba204b81bd8 100644 (file)
@@ -483,11 +483,6 @@ int cpu_arm_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
     return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
 /* These should probably raise undefined insn exceptions.  */
 void HELPER(set_cp)(CPUState *env, uint32_t insn, uint32_t val)
 {
index a17a9f0cb538972eaa61b59bd0699172ae293ad9..b101dc5ad02990dc605626628e5c81d239bbf995 100644 (file)
@@ -56,11 +56,6 @@ int cpu_cris_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
        return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr)
-{
-       return addr;
-}
-
 #else /* !CONFIG_USER_ONLY */
 
 
index ce2b5eb346a25b20a1eb6bb0cc9dd8ea8247ea08..f109d5a97ee11de53b4fcb96d8d19808a918e7a5 100644 (file)
@@ -1386,11 +1386,6 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
     return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
 #else
 
 /* XXX: This value should match the one returned by CPUID
index 9f30a7479db9e126a69db2ec4174372c46f4db44..5d52bd34ea9451be8d5e3fbdee00b577e4733ce1 100644 (file)
@@ -342,14 +342,6 @@ void m68k_switch_sp(CPUM68KState *env)
     env->current_sp = new_sp;
 }
 
-/* MMU */
-
-/* TODO: This will need fixing once the MMU is implemented.  */
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
 #if defined(CONFIG_USER_ONLY)
 
 int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
@@ -362,6 +354,14 @@ int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 
 #else
 
+/* MMU */
+
+/* TODO: This will need fixing once the MMU is implemented.  */
+target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
+{
+    return addr;
+}
+
 int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
                                int mmu_idx, int is_softmmu)
 {
index 40d27b956ea44b0bfedfdacb43293ebf50d2873a..d99840c7355c548e5070a829ac0f82b4d40ee1d1 100644 (file)
@@ -45,11 +45,6 @@ int cpu_mb_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
     return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr)
-{
-    return addr;
-}
-
 #else /* !CONFIG_USER_ONLY */
 
 int cpu_mb_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
index a3f099f04b4b727ee34178fb6bb91857603f78bb..43d11b351ddb634c13538364784d2c935a7246f3 100644 (file)
@@ -253,19 +253,17 @@ static void raise_mmu_exception(CPUState *env, target_ulong address,
     env->error_code = error_code;
 }
 
+#if !defined(CONFIG_USER_ONLY)
 target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
 {
-#if defined(CONFIG_USER_ONLY)
-    return addr;
-#else
     target_phys_addr_t phys_addr;
     int prot;
 
     if (get_physical_address(env, &phys_addr, &prot, addr, 0, ACCESS_INT) != 0)
         return -1;
     return phys_addr;
-#endif
 }
+#endif
 
 int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
                                int mmu_idx, int is_softmmu)
index cd1c9fea0ec0f11448f4e609e54508343f413f70..fc54d718020fe145c58dd0ef40f71581b6f915f7 100644 (file)
@@ -97,11 +97,6 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
     return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug (CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
 #else
 /* Common routines used by software and hardware TLBs emulation */
 static inline int pte_is_valid(target_ulong pte0)
index 1322ffce03e319269ec6f83c6fb6e2bbd6262c6c..b97d1ff8a4576c1c27bf370e157bf11e680d4c5e 100644 (file)
@@ -46,11 +46,6 @@ CPUS390XState *cpu_s390x_init(const char *cpu_model)
     return env;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
 void cpu_reset(CPUS390XState *env)
 {
     if (qemu_loglevel_mask(CPU_LOG_RESET)) {
index d2ff6691e0f345c004a359748a9f21334a6d423b..486be5d5116d26f0e08593f2b767c689d4c05ac2 100644 (file)
@@ -53,11 +53,6 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
     return 1;
 }
 
-target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr)
-{
-    return addr;
-}
-
 int cpu_sh4_is_cached(CPUSH4State * env, target_ulong addr)
 {
     /* For user mode, only U0 area is cachable. */
index ffe93e3d44dd216f9ed5798c32a05b028733b072..976eb43d33018b1dfa963bf4323b2b4404ec6bbf 100644 (file)
@@ -652,13 +652,7 @@ void dump_mmu(CPUState *env)
 #endif /* !CONFIG_USER_ONLY */
 
 
-#if defined(CONFIG_USER_ONLY)
-target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
-{
-    return addr;
-}
-
-#else
+#if !defined(CONFIG_USER_ONLY)
 target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
 {
     target_phys_addr_t phys_addr;