svn commit: r351065 - in head/sys/powerpc: booke include

Justin Hibbits jhibbits at FreeBSD.org
Thu Aug 15 03:42:16 UTC 2019


Author: jhibbits
Date: Thu Aug 15 03:42:15 2019
New Revision: 351065
URL: https://svnweb.freebsd.org/changeset/base/351065

Log:
  powerpc/pmap: Enable UMA_MD_SMALL_ALLOC for 64-bit booke
  
  The only thing blocking UMA_MD_SMALL_ALLOC from working on 64-bit booke
  powerpc was a missing check in pmap_kextract().  Adding DMAP handling into
  pmap_kextract(), we can now use UMA_MD_SMALL_ALLOC.  This should improve
  performance and stability a bit, since DMAP is always mapped in TLB1, so
  this relieves pressure on TLB0.
  
  MFC after:	3 weeks

Modified:
  head/sys/powerpc/booke/pmap.c
  head/sys/powerpc/include/vmparam.h

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Thu Aug 15 02:30:44 2019	(r351064)
+++ head/sys/powerpc/booke/pmap.c	Thu Aug 15 03:42:15 2019	(r351065)
@@ -1958,6 +1958,11 @@ mmu_booke_kextract(mmu_t mmu, vm_offset_t va)
 	vm_paddr_t p = 0;
 	int i;
 
+#ifdef __powerpc64__
+	if (va >= DMAP_BASE_ADDRESS && va <= DMAP_MAX_ADDRESS)
+		return (DMAP_TO_PHYS(va));
+#endif
+
 	if (va >= VM_MIN_KERNEL_ADDRESS && va <= VM_MAX_KERNEL_ADDRESS)
 		p = pte_vatopa(mmu, kernel_pmap, va);
 	

Modified: head/sys/powerpc/include/vmparam.h
==============================================================================
--- head/sys/powerpc/include/vmparam.h	Thu Aug 15 02:30:44 2019	(r351064)
+++ head/sys/powerpc/include/vmparam.h	Thu Aug 15 03:42:15 2019	(r351065)
@@ -133,6 +133,11 @@
 
 #else /* Book-E */
 
+/* Use the direct map for UMA small allocs on powerpc64. */
+#ifdef __powerpc64__
+#define UMA_MD_SMALL_ALLOC
+#endif
+
 #define	KERNBASE		0x04000100	/* start of kernel physical */
 #ifndef __powerpc64__
 #define	VM_MIN_KERNEL_ADDRESS	0xc0000000


More information about the svn-src-all mailing list