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 Avoid assembler-specific defines by...
details: https://anonhg.NetBSD.org/src/rev/37d2be3da09b
branches: trunk
changeset: 345281:37d2be3da09b
user: palle <palle%NetBSD.org@localhost>
date: Mon May 16 20:03:07 2016 +0000
description:
Avoid assembler-specific defines by using the export keyword in genassym.cf instead
diffstat:
sys/arch/sparc64/sparc64/genassym.cf | 25 ++++++++++++++++++-------
sys/arch/sparc64/sparc64/locore.s | 15 +++++++--------
sys/arch/sparc64/sparc64/mp_subr.S | 3 +--
3 files changed, 26 insertions(+), 17 deletions(-)
diffs (109 lines):
diff -r 020c72a59944 -r 37d2be3da09b sys/arch/sparc64/sparc64/genassym.cf
--- a/sys/arch/sparc64/sparc64/genassym.cf Mon May 16 16:31:07 2016 +0000
+++ b/sys/arch/sparc64/sparc64/genassym.cf Mon May 16 20:03:07 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.77 2016/05/10 19:24:00 palle Exp $
+# $NetBSD: genassym.cf,v 1.78 2016/05/16 20:03:07 palle Exp $
#
# Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -136,12 +136,23 @@
define PM_RESIDENT offsetof(struct pmap, pm_stats.resident_count)
define PM_WIRED offsetof(struct pmap, pm_stats.wired_count)
-# the assembler doesn't grok C constants with LL suffix
-define A_SUN4U_TLB_TSB_LOCK SUN4U_TLB_TSB_LOCK
-ifdef SUN4V
-define A_SUN4V_TLB_ACCESS SUN4V_TLB_ACCESS
-define A_SUN4V_TLB_TSB_LOCK SUN4V_TLB_TSB_LOCK
-endif
+# TLB/TTE defines
+export SUN4U_TLB_TSB_LOCK
+export SUN4U_TTE_MODIFY
+export SUN4U_TTE_ACCESS
+export SUN4U_TTE_REAL_W
+export SUN4U_TTE_W
+export SUN4U_TTE_L
+export SUN4U_TTE_CP
+export SUN4U_TTE_CV
+export SUN4U_TTE_P
+export SUN4U_TTE_EXEC
+export SUN4V_TLB_ACCESS
+export SUN4V_TLB_TSB_LOCK
+
+export PG_SHIFT4U
+
+export CTX_MASK
# CPU info structure
define CI_SELF offsetof(struct cpu_info, ci_self)
diff -r 020c72a59944 -r 37d2be3da09b sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Mon May 16 16:31:07 2016 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Mon May 16 20:03:07 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.394 2016/05/15 23:54:58 nakayama Exp $ */
+/* $NetBSD: locore.s,v 1.395 2016/05/16 20:03:07 palle Exp $ */
/*
* Copyright (c) 2006-2010 Matthew R. Green
@@ -83,7 +83,6 @@
#include <machine/signal.h>
#include <machine/trap.h>
#include <machine/frame.h>
-#include <machine/pte.h>
#include <machine/pmap.h>
#include <machine/intr.h>
#include <machine/asm.h>
@@ -2785,15 +2784,15 @@
1:
LDPTRA [%g6] ASI_PHYS_CACHED, %g4 ! Fetch TTE
brgez,pn %g4, sun4v_datatrap ! Entry invalid? Punt
- or %g4, A_SUN4V_TLB_ACCESS, %g7 ! Update the access bit
-
- btst A_SUN4V_TLB_ACCESS, %g4 ! Need to update access bit?
+ or %g4, SUN4V_TLB_ACCESS, %g7 ! Update the access bit
+
+ btst SUN4V_TLB_ACCESS, %g4 ! Need to update access bit?
bne,pt %xcc, 2f
nop
casxa [%g6] ASI_PHYS_CACHED, %g4, %g7 ! and write it out
cmp %g4, %g7
bne,pn %xcc, 1b
- or %g4, A_SUN4V_TLB_ACCESS, %g4 ! Update the access bit
+ or %g4, SUN4V_TLB_ACCESS, %g4 ! Update the access bit
2:
GET_TSB_DMMU %g2
@@ -6441,13 +6440,13 @@
cmp %g5, CPU_SUN4V
bne,pt %icc, 0f
nop
- sethi %hh(A_SUN4V_TLB_TSB_LOCK), %g5
+ sethi %hh(SUN4V_TLB_TSB_LOCK), %g5
sllx %g5, 32, %g5
ba 1f
nop
0:
#endif
- set A_SUN4U_TLB_TSB_LOCK, %g5
+ set SUN4U_TLB_TSB_LOCK, %g5
1:
xor %o2, %o5, %o3 ! %o3 - what changed
diff -r 020c72a59944 -r 37d2be3da09b sys/arch/sparc64/sparc64/mp_subr.S
--- a/sys/arch/sparc64/sparc64/mp_subr.S Mon May 16 16:31:07 2016 +0000
+++ b/sys/arch/sparc64/sparc64/mp_subr.S Mon May 16 20:03:07 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mp_subr.S,v 1.9 2015/06/15 07:48:08 martin Exp $ */
+/* $NetBSD: mp_subr.S,v 1.10 2016/05/16 20:03:07 palle Exp $ */
/*
* Copyright (c) 2006-2010 Matthew R. Green
@@ -72,7 +72,6 @@
#include <machine/signal.h>
#include <machine/trap.h>
#include <machine/frame.h>
-#include <machine/pte.h>
#include <machine/pmap.h>
#include <machine/intr.h>
#include <machine/asm.h>
Home |
Main Index |
Thread Index |
Old Index