Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2019 20:08:48 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351486 - head/sys/powerpc/booke
Message-ID:  <201908252008.x7PK8mPt052261@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Aug 25 20:08:48 2019
New Revision: 351486
URL: https://svnweb.freebsd.org/changeset/base/351486

Log:
  powerpc/booke: Use the DMAP if possible in pmap_map()
  
  This avoids unnecessary TLB usage for statically mapped regions, such as
  vm_page_array.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Sun Aug 25 19:39:31 2019	(r351485)
+++ head/sys/powerpc/booke/pmap.c	Sun Aug 25 20:08:48 2019	(r351486)
@@ -2546,8 +2546,11 @@ mmu_booke_map(mmu_t mmu, vm_offset_t *virt, vm_paddr_t
 	vm_offset_t sva = *virt;
 	vm_offset_t va = sva;
 
-	//debugf("mmu_booke_map: s (sva = 0x%08x pa_start = 0x%08x pa_end = 0x%08x)\n",
-	//		sva, pa_start, pa_end);
+#ifdef __powerpc64__
+	/* XXX: Handle memory not starting at 0x0. */
+	if (pa_end < ctob(Maxmem))
+		return (PHYS_TO_DMAP(pa_start));
+#endif
 
 	while (pa_start < pa_end) {
 		mmu_booke_kenter(mmu, va, pa_start);
@@ -2556,7 +2559,6 @@ mmu_booke_map(mmu_t mmu, vm_offset_t *virt, vm_paddr_t
 	}
 	*virt = va;
 
-	//debugf("mmu_booke_map: e (va = 0x%08x)\n", va);
 	return (sva);
 }
 



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