Module Name: src
Committed By: matt
Date: Thu Jun 11 15:43:36 UTC 2015
Modified Files:
src/sys/arch/mips/include: mips_param.h
Log Message:
Use (uint64_t) to avoid 32-bit overflow
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mips/include/mips_param.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/include/mips_param.h
diff -u src/sys/arch/mips/include/mips_param.h:1.36 src/sys/arch/mips/include/mips_param.h:1.37
--- src/sys/arch/mips/include/mips_param.h:1.36 Thu Jun 11 07:30:10 2015
+++ src/sys/arch/mips/include/mips_param.h Thu Jun 11 15:43:36 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_param.h,v 1.36 2015/06/11 07:30:10 matt Exp $ */
+/* $NetBSD: mips_param.h,v 1.37 2015/06/11 15:43:36 matt Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -92,10 +92,10 @@
#endif
#ifdef ENABLE_MIPS_16KB_PAGE
-#define NBPG 16384UL /* bytes/page */
+#define NBPG 16384 /* bytes/page */
#define PGSHIFT 14 /* LOG2(NBPG) */
#else
-#define NBPG 4096UL /* bytes/page */
+#define NBPG 4096 /* bytes/page */
#define PGSHIFT 12 /* LOG2(NBPG) */
#endif
#define PGOFSET (NBPG-1) /* byte offset into page */
@@ -107,7 +107,7 @@
#ifdef _LP64
#define NSEGPG (NBPG/8)
-#define NBXSEG (NSEGPG*NBSEG) /* bytes/xsegment */
+#define NBXSEG ((uint64_t)NSEGPG*NBSEG) /* bytes/xsegment */
#define XSEGOFSET (NBSEG-1) /* byte offset into segment */
#define XSEGSHIFT (SEGSHIFT+(PGSHIFT-3)) /* LOG2(NBXSEG) */
#endif