Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 sun4v: Introduce a NORMAL_GLOBALS m...
details: https://anonhg.NetBSD.org/src/rev/063ec8497add
branches: trunk
changeset: 330741:063ec8497add
user: palle <palle%NetBSD.org@localhost>
date: Sat Jul 19 20:58:12 2014 +0000
description:
sun4v: Introduce a NORMAL_GLOBALS macro - first used in sparc_interrupt - other relevant uses will be handled as the sun4v work is progressesing - ok martin@
diffstat:
sys/arch/sparc64/sparc64/locore.s | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 36a89a54c2d4 -r 063ec8497add sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Sat Jul 19 20:21:52 2014 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Sat Jul 19 20:58:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.364 2014/07/16 19:53:18 palle Exp $ */
+/* $NetBSD: locore.s,v 1.365 2014/07/19 20:58:12 palle Exp $ */
/*
* Copyright (c) 2006-2010 Matthew R. Green
@@ -141,6 +141,24 @@
.endm
+ .macro NORMAL_GLOBALS scratch
+#ifdef SUN4V
+ sethi %hi(cputyp), \scratch
+ ld [\scratch + %lo(cputyp)], \scratch
+ cmp \scratch, CPU_SUN4V
+ bne,pt %icc, 2f
+ nop
+ /* sun4v */
+ ba 3f
+ wrpr %g0, 0, %gl
+2:
+#endif
+ /* sun4u */
+ wrpr %g0, PSTATE_KERN, %pstate
+3:
+ .endm
+
+
#ifdef SUN4V
/* Misc. sun4v macros */
@@ -3582,7 +3600,7 @@
#endif
INTR_SETUP(-CC64FSZ-TF_SIZE)
! Switch to normal globals so we can save them
- wrpr %g0, PSTATE_KERN, %pstate
+ NORMAL_GLOBALS %g5
stx %g1, [%sp + CC64FSZ + STKB + TF_G + ( 1*8)]
stx %g2, [%sp + CC64FSZ + STKB + TF_G + ( 2*8)]
stx %g3, [%sp + CC64FSZ + STKB + TF_G + ( 3*8)]
Home |
Main Index |
Thread Index |
Old Index