From 3a405f030d6d2598fb9431c40ee53973be87b610 Mon Sep 17 00:00:00 2001 From: cherry Date: Thu, 22 Dec 2016 16:05:14 +0000 Subject: [PATCH] physmem should be of type psize_t Also, use PRIxPSIZE when printf(9)ing physmem. --- sys/arch/cesfic/cesfic/machdep.c | 6 +++--- sys/arch/luna68k/luna68k/pmap_bootstrap.c | 7 ++++--- sys/arch/netwinder/netwinder/netwinder_machdep.c | 6 +++--- sys/arch/x68k/x68k/pmap_bootstrap.c | 7 ++++--- sys/rump/librump/rumpkern/emul.c | 6 +++--- sys/sys/systm.h | 4 ++-- sys/uvm/uvm_page.c | 6 +++--- 7 files changed, 22 insertions(+), 20 deletions(-) diff --git a/sys/arch/cesfic/cesfic/machdep.c b/sys/arch/cesfic/cesfic/machdep.c index 1450ab777219..5d30a132e2a1 100644 --- a/sys/arch/cesfic/cesfic/machdep.c +++ b/sys/arch/cesfic/cesfic/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.66 2015/11/05 03:48:51 pgoyette Exp $ */ +/* $NetBSD: machdep.c,v 1.67 2016/12/22 16:05:14 cherry Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.66 2015/11/05 03:48:51 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.67 2016/12/22 16:05:14 cherry Exp $"); #include "opt_bufcache.h" #include "opt_ddb.h" @@ -111,7 +111,7 @@ struct vm_map *phys_map = NULL; * Declare these as initialized data so we can patch them. */ /*int maxmem;*/ /* max memory per process */ -extern int physmem; /* max supported memory, changes to actual */ +extern psize_t physmem; /* max supported memory, changes to actual */ extern u_int lowram; diff --git a/sys/arch/luna68k/luna68k/pmap_bootstrap.c b/sys/arch/luna68k/luna68k/pmap_bootstrap.c index 38cc0efec682..8669b736e22c 100644 --- a/sys/arch/luna68k/luna68k/pmap_bootstrap.c +++ b/sys/arch/luna68k/luna68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.37 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.37 2016/12/22 16:05:15 cherry Exp $"); #include "opt_m68k_arch.h" @@ -51,7 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui extern char *etext; -extern int maxmem, physmem; +extern int maxmem; +extern psize_t physmem; extern paddr_t avail_start, avail_end; /* diff --git a/sys/arch/netwinder/netwinder/netwinder_machdep.c b/sys/arch/netwinder/netwinder/netwinder_machdep.c index afa971ac4225..afebcbeecaf6 100644 --- a/sys/arch/netwinder/netwinder/netwinder_machdep.c +++ b/sys/arch/netwinder/netwinder/netwinder_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netwinder_machdep.c,v 1.84 2016/12/22 14:47:58 cherry Exp $ */ +/* $NetBSD: netwinder_machdep.c,v 1.85 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.84 2016/12/22 14:47:58 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.85 2016/12/22 16:05:15 cherry Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -477,7 +477,7 @@ initarm(void *arg) physmem = (physical_end - physical_start) / PAGE_SIZE; /* Tell the user about the memory */ - printf("physmemory: %d pages at 0x%08lx -> 0x%08lx\n", physmem, + printf("physmemory: %"PRIxPSIZE" pages at 0x%08lx -> 0x%08lx\n", physmem, physical_start, physical_end - 1); /* diff --git a/sys/arch/x68k/x68k/pmap_bootstrap.c b/sys/arch/x68k/x68k/pmap_bootstrap.c index fd02f83ae359..ec2d270d77e7 100644 --- a/sys/arch/x68k/x68k/pmap_bootstrap.c +++ b/sys/arch/x68k/x68k/pmap_bootstrap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.60 2013/10/27 02:06:06 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.61 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.60 2013/10/27 02:06:06 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.61 2016/12/22 16:05:15 cherry Exp $"); #include "opt_m68k_arch.h" @@ -52,7 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.60 2013/10/27 02:06:06 tsutsui extern char *etext; -extern int maxmem, physmem; +extern int maxmem; +extern psize_t physmem; extern paddr_t avail_start, avail_end; /* diff --git a/sys/rump/librump/rumpkern/emul.c b/sys/rump/librump/rumpkern/emul.c index dbd4df85d62f..a36e4bfaade1 100644 --- a/sys/rump/librump/rumpkern/emul.c +++ b/sys/rump/librump/rumpkern/emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.179 2016/01/26 23:12:17 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.180 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.179 2016/01/26 23:12:17 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.180 2016/12/22 16:05:15 cherry Exp $"); #include #include @@ -54,7 +54,7 @@ void (*rump_vfs_fini)(void) = (void *)nullop; * calling rump_init() */ #define PHYSMEM 512*256 -int physmem = PHYSMEM; +psize_t physmem = PHYSMEM; int nkmempages = PHYSMEM/2; /* from le chapeau */ #undef PHYSMEM diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 5d5f630ba59c..12145c4990af 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.271 2016/07/06 05:20:48 ozaki-r Exp $ */ +/* $NetBSD: systm.h,v 1.272 2016/12/22 16:05:15 cherry Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -82,7 +82,7 @@ extern int autoniceval; /* proc priority after autonicetime */ extern int selwait; /* select timeout address */ extern int maxmem; /* max memory per process */ -extern int physmem; /* physical memory */ +extern psize_t physmem; /* physical memory */ extern dev_t dumpdev; /* dump device */ extern dev_t dumpcdev; /* dump device (character equivalent) */ diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 4f2a781680ee..b06ecef32efd 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.188 2016/12/22 13:26:25 cherry Exp $ */ +/* $NetBSD: uvm_page.c,v 1.189 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.188 2016/12/22 13:26:25 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.189 2016/12/22 16:05:15 cherry Exp $"); #include "opt_ddb.h" #include "opt_uvm.h" @@ -116,7 +116,7 @@ int vm_page_reserve_kernel = UVM_RESERVED_PAGES_PER_CPU; /* * physical memory size; */ -int physmem; +psize_t physmem; /* * local variables