Module Name:    src
Committed By:   matt
Date:           Mon Sep  7 21:34:47 UTC 2009

Modified Files:
        src/sys/arch/mips/include [matt-nb5-mips64]: cpuregs.h

Log Message:
Use intptr_t in MIPS_KSEGx_P()
Use uintptr_t in MIPS_XKPHYS*


To generate a diff of this commit:
cvs rdiff -u -r1.74.28.6 -r1.74.28.7 src/sys/arch/mips/include/cpuregs.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/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.74.28.6 src/sys/arch/mips/include/cpuregs.h:1.74.28.7
--- src/sys/arch/mips/include/cpuregs.h:1.74.28.6	Sun Sep  6 22:36:16 2009
+++ src/sys/arch/mips/include/cpuregs.h	Mon Sep  7 21:34:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.74.28.6 2009/09/06 22:36:16 matt Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.74.28.7 2009/09/07 21:34:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -103,8 +103,8 @@
 #define	MIPS_KSEG1_TO_PHYS(x)	((uintptr_t)(x) & MIPS_PHYS_MASK)
 #define	MIPS_PHYS_TO_KSEG1(x)	((uintptr_t)(x) | (intptr_t)MIPS_KSEG1_START)
 
-#define	MIPS_KSEG0_P(x)		(((uintptr_t)(x) & ~MIPS_PHYS_MASK) == MIPS_KSEG0_START)
-#define	MIPS_KSEG1_P(x)		(((uintptr_t)(x) & ~MIPS_PHYS_MASK) == MIPS_KSEG1_START)
+#define	MIPS_KSEG0_P(x)		(((intptr_t)(x) & ~MIPS_PHYS_MASK) == MIPS_KSEG0_START)
+#define	MIPS_KSEG1_P(x)		(((intptr_t)(x) & ~MIPS_PHYS_MASK) == MIPS_KSEG1_START)
 #define	MIPS_KSEG2_P(x)		((uintptr_t)MIPS_KSEG2_START <= (uintptr_t)(x))
 
 /* Map virtual address to index in mips3 r4k virtually-indexed cache */
@@ -118,8 +118,8 @@
 #define	MIPS_XKPHYS_START	(0x2ULL << 62)
 #define	MIPS_PHYS_TO_XKPHYS(cca,x) \
 	(MIPS_XKPHYS_START | ((uint64_t)(cca) << 59) | (x))
-#define	MIPS_XKPHYS_TO_PHYS(x)	((x) & 0x0effffffffffffffLL)
-#define	MIPS_XKPHYS_TO_CCA(x)	(((x) >> 59) & 7)
+#define	MIPS_XKPHYS_TO_PHYS(x)	((uintptr_t)(x) & 0x0effffffffffffffLL)
+#define	MIPS_XKPHYS_TO_CCA(x)	(((uintptr_t)(x) >> 59) & 7)
 #define	MIPS_XKPHYS_P(x)	(((uint64_t)(x) >> 62) == 2)
 
 #define	CCA_UNCACHED		2

Reply via email to