Revision dcfd14b3 linux-user/main.c

b/linux-user/main.c
455 455

  
456 456
#ifdef TARGET_ARM
457 457

  
458
static void arm_cache_flush(abi_ulong start, abi_ulong last)
459
{
460
    abi_ulong addr, last1;
461

  
462
    if (last < start)
463
        return;
464
    addr = start;
465
    for(;;) {
466
        last1 = ((addr + TARGET_PAGE_SIZE) & TARGET_PAGE_MASK) - 1;
467
        if (last1 > last)
468
            last1 = last;
469
        tb_invalidate_page_range(addr, last1 + 1);
470
        if (last1 == last)
471
            break;
472
        addr = last1 + 1;
473
    }
474
}
475

  
476 458
/* Handle a jump to the kernel code page.  */
477 459
static int
478 460
do_kernel_trap(CPUARMState *env)
......
717 699
                }
718 700

  
719 701
                if (n == ARM_NR_cacheflush) {
720
                    arm_cache_flush(env->regs[0], env->regs[1]);
702
                    /* nop */
721 703
                } else if (n == ARM_NR_semihosting
722 704
                           || n == ARM_NR_thumb_semihosting) {
723 705
                    env->regs[0] = do_arm_semihosting (env);
......
733 715
                    if ( n > ARM_NR_BASE) {
734 716
                        switch (n) {
735 717
                        case ARM_NR_cacheflush:
736
                            arm_cache_flush(env->regs[0], env->regs[1]);
718
                            /* nop */
737 719
                            break;
738 720
                        case ARM_NR_set_tls:
739 721
                            cpu_set_tls(env, env->regs[0]);

Also available in: Unified diff