diff --git a/cpu-exec.c b/cpu-exec.c index 7323f3c260..16a223ed1a 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -704,19 +704,6 @@ int cpu_exec(CPUState *env1) return ret; } -/* must only be called from the generated code as an exception can be - generated */ -void tb_invalidate_page_range(target_ulong start, target_ulong end) -{ - /* XXX: cannot enable it yet because it yields to MMU exception - where NIP != read address on PowerPC */ -#if 0 - target_ulong phys_addr; - phys_addr = get_phys_addr_code(env, start); - tb_invalidate_phys_page_range(phys_addr, phys_addr + end - start, 0); -#endif -} - #if defined(TARGET_I386) && defined(CONFIG_USER_ONLY) void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector) diff --git a/exec-all.h b/exec-all.h index 7c2d29ff98..cf3a704e6d 100644 --- a/exec-all.h +++ b/exec-all.h @@ -95,7 +95,6 @@ void QEMU_NORETURN cpu_loop_exit(void); int page_unprotect(target_ulong address, unsigned long pc, void *puc); void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, int is_cpu_write_access); -void tb_invalidate_page_range(target_ulong start, target_ulong end); void tlb_flush_page(CPUState *env, target_ulong addr); void tlb_flush(CPUState *env, int flush_global); #if !defined(CONFIG_USER_ONLY) diff --git a/linux-user/main.c b/linux-user/main.c index a4996e7e3a..8336639d08 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -455,24 +455,6 @@ void cpu_loop(CPUX86State *env) #ifdef TARGET_ARM -static void arm_cache_flush(abi_ulong start, abi_ulong last) -{ - abi_ulong addr, last1; - - if (last < start) - return; - addr = start; - for(;;) { - last1 = ((addr + TARGET_PAGE_SIZE) & TARGET_PAGE_MASK) - 1; - if (last1 > last) - last1 = last; - tb_invalidate_page_range(addr, last1 + 1); - if (last1 == last) - break; - addr = last1 + 1; - } -} - /* Handle a jump to the kernel code page. */ static int do_kernel_trap(CPUARMState *env) @@ -717,7 +699,7 @@ void cpu_loop(CPUARMState *env) } if (n == ARM_NR_cacheflush) { - arm_cache_flush(env->regs[0], env->regs[1]); + /* nop */ } else if (n == ARM_NR_semihosting || n == ARM_NR_thumb_semihosting) { env->regs[0] = do_arm_semihosting (env); @@ -733,7 +715,7 @@ void cpu_loop(CPUARMState *env) if ( n > ARM_NR_BASE) { switch (n) { case ARM_NR_cacheflush: - arm_cache_flush(env->regs[0], env->regs[1]); + /* nop */ break; case ARM_NR_set_tls: cpu_set_tls(env, env->regs[0]); diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index e165444102..c52a37173b 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -362,7 +362,6 @@ void helper_icbi(target_ulong addr) * do the load "by hand". */ ldl(addr); - tb_invalidate_page_range(addr, addr + env->icache_line_size); } // XXX: to be tested diff --git a/target-sparc/helper.h b/target-sparc/helper.h index 12e8557133..023f4d6023 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -35,7 +35,6 @@ DEF_HELPER_2(check_align, void, tl, i32) DEF_HELPER_0(debug, void) DEF_HELPER_0(save, void) DEF_HELPER_0(restore, void) -DEF_HELPER_1(flush, void, tl) DEF_HELPER_2(udiv, tl, tl, tl) DEF_HELPER_2(udiv_cc, tl, tl, tl) DEF_HELPER_2(sdiv, tl, tl, tl) diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index ffffb8c0bd..b38691e19d 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -4092,12 +4092,6 @@ void helper_write_softint(uint64_t value) } #endif -void helper_flush(target_ulong addr) -{ - addr &= ~7; - tb_invalidate_page_range(addr, addr + 8); -} - #ifdef TARGET_SPARC64 #ifdef DEBUG_PCALL static const char * const excp_names[0x80] = { diff --git a/target-sparc/translate.c b/target-sparc/translate.c index fe99f0bfea..0cc47e9ff3 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -4226,7 +4226,7 @@ static void disas_sparc_insn(DisasContext * dc) case 0x3b: /* flush */ if (!((dc)->def->features & CPU_FEATURE_FLUSH)) goto unimp_flush; - gen_helper_flush(cpu_dst); + /* nop */ break; case 0x3c: /* save */ save_state(dc, cpu_cond);