Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2019 19:06:18 +0000 (UTC)
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353500 - in head/sys/powerpc: aim powerpc
Message-ID:  <201910141906.x9EJ6Ins023569@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luporl
Date: Mon Oct 14 19:06:17 2019
New Revision: 353500
URL: https://svnweb.freebsd.org/changeset/base/353500

Log:
  Fix powerpc/powerpcspe builds
  
  Revision 353489 introduced some new function calls in common powerpc code,
  but these must be called only on powerpc64.

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

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c	Mon Oct 14 18:31:11 2019	(r353499)
+++ head/sys/powerpc/aim/mmu_oea64.c	Mon Oct 14 19:06:17 2019	(r353500)
@@ -2943,6 +2943,8 @@ moea64_scan_init(mmu_t mmu)
 	}
 }
 
+#ifdef __powerpc64__
+
 static size_t
 moea64_scan_pmap(mmu_t mmu)
 {
@@ -3009,3 +3011,19 @@ moea64_dump_pmap_init(mmu_t mmu, unsigned blkpgs)
 	dump_ctx.blksz = blkpgs * PAGE_SIZE;
 	return (&dump_ctx);
 }
+
+#else
+
+static size_t
+moea64_scan_pmap(mmu_t mmu)
+{
+	return (0);
+}
+
+static void *
+moea64_dump_pmap_init(mmu_t mmu, unsigned blkpgs)
+{
+	return (NULL);
+}
+
+#endif

Modified: head/sys/powerpc/powerpc/uma_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/uma_machdep.c	Mon Oct 14 18:31:11 2019	(r353499)
+++ head/sys/powerpc/powerpc/uma_machdep.c	Mon Oct 14 19:06:17 2019	(r353500)
@@ -71,8 +71,10 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int 
 	if ((vm_offset_t)pa != pa)
 		return (NULL);
 
+#ifdef __powerpc64__
 	if ((wait & M_NODUMP) == 0)
 		dump_add_page(pa);
+#endif
 
 	if (!hw_direct_map) {
 		pmap_kenter(pa, pa);
@@ -103,7 +105,9 @@ uma_small_free(void *mem, vm_size_t size, u_int8_t fla
 		m = PHYS_TO_VM_PAGE((vm_offset_t)mem);
 	KASSERT(m != NULL,
 	    ("Freeing UMA block at %p with no associated page", mem));
-	dump_add_page(VM_PAGE_TO_PHYS(m));
+#ifdef __powerpc64__
+	dump_drop_page(VM_PAGE_TO_PHYS(m));
+#endif
 	vm_page_unwire_noq(m);
 	vm_page_free(m);
 	atomic_subtract_int(&hw_uma_mdpages, 1);



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