Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys physmem should be of type psize_t



details:   https://anonhg.NetBSD.org/src/rev/baa116217579
branches:  trunk
changeset: 819909:baa116217579
user:      cherry <cherry%NetBSD.org@localhost>
date:      Thu Dec 22 16:05:14 2016 +0000

description:
physmem should be of type psize_t

Also, use PRIxPSIZE when printf(9)ing physmem.

diffstat:

 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(-)

diffs (182 lines):

diff -r fd7213c37dec -r baa116217579 sys/arch/cesfic/cesfic/machdep.c
--- a/sys/arch/cesfic/cesfic/machdep.c  Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/arch/cesfic/cesfic/machdep.c  Thu Dec 22 16:05:14 2016 +0000
@@ -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 @@
  * 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 -r fd7213c37dec -r baa116217579 sys/arch/luna68k/luna68k/pmap_bootstrap.c
--- a/sys/arch/luna68k/luna68k/pmap_bootstrap.c Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/arch/luna68k/luna68k/pmap_bootstrap.c Thu Dec 22 16:05:14 2016 +0000
@@ -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 @@
 
 extern char *etext;
 
-extern int maxmem, physmem;
+extern int maxmem;
+extern psize_t physmem;
 extern paddr_t avail_start, avail_end;
 
 /*
diff -r fd7213c37dec -r baa116217579 sys/arch/netwinder/netwinder/netwinder_machdep.c
--- a/sys/arch/netwinder/netwinder/netwinder_machdep.c  Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/arch/netwinder/netwinder/netwinder_machdep.c  Thu Dec 22 16:05:14 2016 +0000
@@ -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 @@
        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 -r fd7213c37dec -r baa116217579 sys/arch/x68k/x68k/pmap_bootstrap.c
--- a/sys/arch/x68k/x68k/pmap_bootstrap.c       Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/arch/x68k/x68k/pmap_bootstrap.c       Thu Dec 22 16:05:14 2016 +0000
@@ -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 @@
 
 extern char *etext;
 
-extern int maxmem, physmem;
+extern int maxmem;
+extern psize_t physmem;
 extern paddr_t avail_start, avail_end;
 
 /*
diff -r fd7213c37dec -r baa116217579 sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c  Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/rump/librump/rumpkern/emul.c  Thu Dec 22 16:05:14 2016 +0000
@@ -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 @@
  * calling rump_init()
  */
 #define PHYSMEM 512*256
-int physmem = PHYSMEM;
+psize_t physmem = PHYSMEM;
 int nkmempages = PHYSMEM/2; /* from le chapeau */
 #undef PHYSMEM
 
diff -r fd7213c37dec -r baa116217579 sys/sys/systm.h
--- a/sys/sys/systm.h   Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/sys/systm.h   Thu Dec 22 16:05:14 2016 +0000
@@ -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 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 -r fd7213c37dec -r baa116217579 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c        Thu Dec 22 15:54:35 2016 +0000
+++ b/sys/uvm/uvm_page.c        Thu Dec 22 16:05:14 2016 +0000
@@ -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 @@
 /*
  * physical memory size;
  */
-int physmem;
+psize_t physmem;
 
 /*
  * local variables



Home | Main Index | Thread Index | Old Index