From 14f9a22138b8eef9eaa876a7449bec53dd8f7d89 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 10 Mar 2021 07:28:19 +0000 Subject: [PATCH] pmap_avail_setup() is the only place physmem is calculated, delete a bunch of code which thinks it could be done elsewhere. ok kurt --- sys/arch/powerpc/powerpc/pmap.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index 2534bfdc7d6..2ed78325827 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.172 2020/04/15 08:09:00 mpi Exp $ */ +/* $OpenBSD: pmap.c,v 1.173 2021/03/10 07:28:19 deraadt Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -1232,22 +1232,15 @@ void pmap_avail_setup(void) { struct mem_region *mp; - int pmap_physmem; ppc_mem_regions(&pmap_mem, &pmap_avail); - pmap_cnt_avail = 0; - pmap_physmem = 0; - ndumpmem = 0; for (mp = pmap_mem; mp->size !=0; mp++, ndumpmem++) { - pmap_physmem += atop(mp->size); + physmem += atop(mp->size); dumpmem[ndumpmem].start = atop(mp->start); dumpmem[ndumpmem].end = atop(mp->start + mp->size); } - if (physmem == 0) - physmem = pmap_physmem; - for (mp = pmap_avail; mp->size !=0 ; mp++) { if (physmaxaddr < mp->start + mp->size) physmaxaddr = mp->start + mp->size; -- 2.20.1