From owner-svn-src-head@freebsd.org Sat Mar 3 02:04:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08678F3735E; Sat, 3 Mar 2018 02:04:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF3BB86638; Sat, 3 Mar 2018 02:04:40 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA2E11FD04; Sat, 3 Mar 2018 02:04:40 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2324ese075082; Sat, 3 Mar 2018 02:04:40 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2324eVJ075079; Sat, 3 Mar 2018 02:04:40 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201803030204.w2324eVJ075079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 3 Mar 2018 02:04:40 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: in head/sys/powerpc: powerpc ps3 X-SVN-Commit-Revision: 330305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2018 02:04:41 -0000 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.