Author: nwhitehorn Date: Wed Jan 14 02:18:29 2015 New Revision: 277157 URL: https://svnweb.freebsd.org/changeset/base/277157
Log: Do not remap Open Firmware mappings covered by the direct map. It's pointless and wastes resources. MFC after: 1 week Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Jan 14 01:23:50 2015 (r277156) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Jan 14 02:18:29 2015 (r277157) @@ -224,6 +224,8 @@ uma_zone_t moea64_mpvo_zone; /* zone for #define BPVO_POOL_SIZE 327680 static struct pvo_entry *moea64_bpvo_pool; static int moea64_bpvo_pool_index = 0; +SYSCTL_INT(_machdep, OID_AUTO, moea64_allocated_bpvo_entries, CTLFLAG_RD, + &moea64_bpvo_pool_index, 0, ""); #define VSID_NBPW (sizeof(u_int32_t) * 8) #ifdef __powerpc64__ @@ -534,6 +536,11 @@ moea64_add_ofw_mappings(mmu_t mmup, phan DISABLE_TRANS(msr); for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { + /* If this address is direct-mapped, skip remapping */ + if (hw_direct_map && translations[i].om_va == pa_base && + moea64_calc_wimg(pa_base + off, VM_MEMATTR_DEFAULT) == LPTE_M) + continue; + if (moea64_pvo_find_va(kernel_pmap, translations[i].om_va + off) != NULL) continue; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"