Revision 9fd1ae3a target-sparc/helper.c

b/target-sparc/helper.c
572 572
    /* ??? We treat everything as a small page, then explicitly flush
573 573
       everything when an entry is evicted.  */
574 574
    *page_size = TARGET_PAGE_SIZE;
575

  
576
#if defined (DEBUG_MMU)
577
    /* safety net to catch wrong softmmu index use from dynamic code */
578
    if (env->tl > 0 && mmu_idx != MMU_NUCLEUS_IDX) {
579
        DPRINTF_MMU("get_physical_address %s tl=%d mmu_idx=%d"
580
                    " primary context=%" PRIx64
581
                    " secondary context=%" PRIx64
582
                " address=%" PRIx64
583
                "\n",
584
                (rw == 2 ? "CODE" : "DATA"),
585
                env->tl, mmu_idx,
586
                env->dmmu.mmu_primary_context,
587
                env->dmmu.mmu_secondary_context,
588
                address);
589
    }
590
#endif
591

  
575 592
    if (rw == 2)
576 593
        return get_physical_address_code(env, physical, prot, address,
577 594
                                         mmu_idx);
......
718 735

  
719 736
target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
720 737
{
721
    return cpu_get_phys_page_nofault(env, addr, MMU_KERNEL_IDX);
738
    return cpu_get_phys_page_nofault(env, addr, cpu_mmu_index(env));
722 739
}
723 740
#endif
724 741

  

Also available in: Unified diff