Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2018 02:04:40 +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: r330305 - in head/sys/powerpc: powerpc ps3
Message-ID:  <201803030204.w2324eVJ075079@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sat Mar  3 02:04:40 2018
New Revision: 330305
URL: https://svnweb.freebsd.org/changeset/base/330305

Log:
  Remove assumption that all physical memory is available to the kernel and
  that the physical and available memory arrays are interchangeable.

Modified:
  head/sys/powerpc/powerpc/platform.c
  head/sys/powerpc/ps3/ps3bus.c

Modified: head/sys/powerpc/powerpc/platform.c
==============================================================================
--- head/sys/powerpc/powerpc/platform.c	Sat Mar  3 01:53:51 2018	(r330304)
+++ head/sys/powerpc/powerpc/platform.c	Sat Mar  3 02:04:40 2018	(r330305)
@@ -156,10 +156,14 @@ mem_regions(struct mem_region **phys, int *physsz, str
 		}
 	}
 
-	*phys = pregions;
-	*avail = aregions;
-	*physsz = npregions;
-	*availsz = naregions;
+	if (phys != NULL)
+		*phys = pregions;
+	if (avail != NULL)
+		*avail = aregions;
+	if (physsz != NULL)
+		*physsz = npregions;
+	if (availsz != NULL)
+		*availsz = naregions;
 }
 
 int

Modified: head/sys/powerpc/ps3/ps3bus.c
==============================================================================
--- head/sys/powerpc/ps3/ps3bus.c	Sat Mar  3 01:53:51 2018	(r330304)
+++ head/sys/powerpc/ps3/ps3bus.c	Sat Mar  3 02:04:40 2018	(r330305)
@@ -337,7 +337,7 @@ ps3bus_attach(device_t self) 
 	rman_manage_region(&sc->sc_intr_rman, 0, ~0);
 
 	/* Get memory regions for DMA */
-	mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount);
+	mem_regions(&sc->regions, &sc->rcount, NULL, NULL);
 
 	/*
 	 * Probe all the PS3's buses.



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