Revision 321365ab

b/target-sparc/helper.c
736 736

  
737 737

  
738 738
#if !defined(CONFIG_USER_ONLY)
739
static int cpu_sparc_get_phys_page(CPUState *env, target_phys_addr_t *phys,
740
                                   target_ulong addr, int rw, int mmu_idx)
741
{
742
    target_ulong page_size;
743
    int prot, access_index;
744

  
745
    return get_physical_address(env, phys, &prot, &access_index, addr, rw,
746
                                mmu_idx, &page_size);
747
}
748

  
739 749
target_phys_addr_t cpu_get_phys_page_nofault(CPUState *env, target_ulong addr,
740 750
                                           int mmu_idx)
741 751
{
742 752
    target_phys_addr_t phys_addr;
743
    target_ulong page_size;
744
    int prot, access_index;
745 753

  
746
    if (get_physical_address(env, &phys_addr, &prot, &access_index, addr, 2,
747
                             mmu_idx, &page_size) != 0)
748
        if (get_physical_address(env, &phys_addr, &prot, &access_index, addr,
749
                                 0, mmu_idx, &page_size) != 0)
754
    if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) {
755
        if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) {
750 756
            return -1;
757
        }
758
    }
751 759
    if (cpu_get_physical_page_desc(phys_addr) == IO_MEM_UNASSIGNED)
752 760
        return -1;
753 761
    return phys_addr;

Also available in: Unified diff