Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2015 02:18:30 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277157 - head/sys/powerpc/aim
Message-ID:  <201501140218.t0E2IUQY073616@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501140218.t0E2IUQY073616>