svn commit: r358718 - head/sys/powerpc/powerpc

Mark Johnston markj at FreeBSD.org
Fri Mar 6 20:44:23 UTC 2020


Author: markj
Date: Fri Mar  6 20:44:22 2020
New Revision: 358718
URL: https://svnweb.freebsd.org/changeset/base/358718

Log:
  Remove dead code from the powerpc uma_small_alloc().
  
  32-bit Book-E doesn't set UMA_MD_SMALL_ALLOC, and 32-bit OEA platforms
  have a 32-bit vm_paddr_t.  Moreover, this code was wrong in that it
  leaked the page if the check failed.
  
  Reviewed by:	jhibbits
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D23991

Modified:
  head/sys/powerpc/powerpc/uma_machdep.c

Modified: head/sys/powerpc/powerpc/uma_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/uma_machdep.c	Fri Mar  6 19:56:12 2020	(r358717)
+++ head/sys/powerpc/powerpc/uma_machdep.c	Fri Mar  6 20:44:22 2020	(r358718)
@@ -66,11 +66,6 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int 
 		return (NULL);
 
 	pa = VM_PAGE_TO_PHYS(m);
-
-	/* On book-e sizeof(void *) < sizeof(vm_paddr_t) */
-	if ((vm_offset_t)pa != pa)
-		return (NULL);
-
 #ifdef __powerpc64__
 	if ((wait & M_NODUMP) == 0)
 		dump_add_page(pa);


More information about the svn-src-head mailing list