Module Name: src
Committed By: palle
Date: Mon May 16 20:03:07 UTC 2016
Modified Files:
src/sys/arch/sparc64/sparc64: genassym.cf locore.s mp_subr.S
Log Message:
Avoid assembler-specific defines by using the export keyword in genassym.cf
instead
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/sparc64/sparc64/genassym.cf
cvs rdiff -u -r1.394 -r1.395 src/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc64/sparc64/mp_subr.S
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/sparc64/sparc64/genassym.cf
diff -u src/sys/arch/sparc64/sparc64/genassym.cf:1.77 src/sys/arch/sparc64/sparc64/genassym.cf:1.78
--- src/sys/arch/sparc64/sparc64/genassym.cf:1.77 Tue May 10 19:24:00 2016
+++ src/sys/arch/sparc64/sparc64/genassym.cf Mon May 16 20:03:07 2016
@@ -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_PHYS offsetof(struct pmap, pm
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)
Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.394 src/sys/arch/sparc64/sparc64/locore.s:1.395
--- src/sys/arch/sparc64/sparc64/locore.s:1.394 Sun May 15 23:54:58 2016
+++ src/sys/arch/sparc64/sparc64/locore.s Mon May 16 20:03:07 2016
@@ -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 @@ sun4v_dtsb_miss:
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
+ or %g4, SUN4V_TLB_ACCESS, %g7 ! Update the access bit
- btst A_SUN4V_TLB_ACCESS, %g4 ! Need to update 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 @@ ENTRY(pseg_set_real)
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
Index: src/sys/arch/sparc64/sparc64/mp_subr.S
diff -u src/sys/arch/sparc64/sparc64/mp_subr.S:1.9 src/sys/arch/sparc64/sparc64/mp_subr.S:1.10
--- src/sys/arch/sparc64/sparc64/mp_subr.S:1.9 Mon Jun 15 07:48:08 2015
+++ src/sys/arch/sparc64/sparc64/mp_subr.S Mon May 16 20:03:07 2016
@@ -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>