physmem should be of type psize_t

Also, use PRIxPSIZE when printf(9)ing physmem.
This commit is contained in:
cherry 2016-12-22 16:05:14 +00:00
parent d24c42c87d
commit 3a405f030d
7 changed files with 22 additions and 20 deletions

View File

@ -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 <sys/cdefs.h>
__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;

View File

@ -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 <sys/cdefs.h>
__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;
/*

View File

@ -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 <sys/cdefs.h>
__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);
/*

View File

@ -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 <sys/cdefs.h>
__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;
/*

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/cprng.h>
@ -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

View File

@ -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) */

View File

@ -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 <sys/cdefs.h>
__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