Module Name: src
Committed By: nakayama
Date: Sat Jul 16 11:15:52 UTC 2011
Modified Files:
src/sys/arch/sparc/include: psl.h
Log Message:
Bring some fixes and minor differences from sparc64 version.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h
diff -u src/sys/arch/sparc/include/psl.h:1.46 src/sys/arch/sparc/include/psl.h:1.47
--- src/sys/arch/sparc/include/psl.h:1.46 Fri Jul 15 19:30:08 2011
+++ src/sys/arch/sparc/include/psl.h Sat Jul 16 11:15:52 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.46 2011/07/15 19:30:08 riz Exp $ */
+/* $NetBSD: psl.h,v 1.47 2011/07/16 11:15:52 nakayama Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -142,6 +142,7 @@
#define PSTATE_USER (PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE)
#endif
+
/*
* SPARC V9 TSTATE register
*
@@ -149,7 +150,7 @@
* +-----+-----+-----+--------+---+-----+
* | CCR | ASI | - | PSTATE | - | CWP |
* +-----+-----+-----+--------+---+-----+
- * */
+ */
#define TSTATE_CWP 0x01f
#define TSTATE_PSTATE 0x6ff00
@@ -159,8 +160,8 @@
#define TSTATE_CCR 0xff00000000LL
#define TSTATE_CCR_SHIFT 32
-#define PSRCC_TO_TSTATE(x) (((int64_t)(x)&PSR_ICC)<<(TSTATE_CCR_SHIFT-19))
-#define TSTATECCR_TO_PSR(x) (((x)&TSTATE_CCR)>>(TSTATE_CCR_SHIFT-19))
+#define PSRCC_TO_TSTATE(x) (((int64_t)(x)&PSR_ICC)<<(TSTATE_CCR_SHIFT-20))
+#define TSTATECCR_TO_PSR(x) (((x)&TSTATE_CCR)>>(TSTATE_CCR_SHIFT-20))
/*
* These are here to simplify life.
@@ -182,8 +183,8 @@
#define TSTATE_BITS "\20\14IG\13MG\12CLE\11TLE\10\7MM\6RED\5PEF\4AM\3PRIV\2IE\1AG"
-#define TSTATE_KERN ((TSTATE_KERN)<<TSTATE_PSTATE_SHIFT)
-#define TSTATE_USER ((TSTATE_USER)<<TSTATE_PSTATE_SHIFT)
+#define TSTATE_KERN ((PSTATE_KERN)<<TSTATE_PSTATE_SHIFT)
+#define TSTATE_USER ((PSTATE_USER)<<TSTATE_PSTATE_SHIFT)
/*
* SPARC V9 VER version register.
*