Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jan 2011 12:05:31 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r216997 - in stable/7/sys/sparc64: include sparc64
Message-ID:  <201101051205.p05C5VUq077306@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Wed Jan  5 12:05:31 2011
New Revision: 216997
URL: http://svn.freebsd.org/changeset/base/216997

Log:
  MFC: r216628
  
  Extend the hack of r182730 (MFC'ed to stable/7 in r190033) to trick
  GAS/GCC into compiling access to STICK/STICK_COMPARE independently
  of the selected instruction set by TICK_COMPARE so tick.c once again
  can be compiled with gcc -mcpu=v9 for reference purposes.

Modified:
  stable/7/sys/sparc64/include/cpufunc.h
  stable/7/sys/sparc64/sparc64/tick.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sparc64/include/cpufunc.h
==============================================================================
--- stable/7/sys/sparc64/include/cpufunc.h	Wed Jan  5 12:05:27 2011	(r216996)
+++ stable/7/sys/sparc64/include/cpufunc.h	Wed Jan  5 12:05:31 2011	(r216997)
@@ -174,11 +174,13 @@ int fasword32(u_long asi, void *addr, ui
 } while (0)
 
 /*
- * Trick GAS/GCC into compiling access to STICK/STICK_COMPARE independently
+ * Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently
  * of the selected instruction set.
  */
+#define	rdtickcmpr()		rd(asr23)
 #define	rdstick()		rd(asr24)
 #define	rdstickcmpr()		rd(asr25)
+#define	wrtickcmpr(val, xor)	wr(asr23, (val), (xor))
 #define	wrstick(val, xor)	wr(asr24, (val), (xor))
 #define	wrstickcmpr(val, xor)	wr(asr25, (val), (xor))
 
@@ -191,7 +193,7 @@ int fasword32(u_long asi, void *addr, ui
  * aligned to a quadword boundary in order to ensure that I$ misses won't
  * split them up.
  */
-#define	wrtickcmpr(val, xor) ({						\
+#define	wrtickcmpr_bbwar(val, xor) ({					\
 	__asm __volatile(						\
 	"	ba,pt	%%xcc, 1f ;		"			\
 	"	 nop	 ;			"			\

Modified: stable/7/sys/sparc64/sparc64/tick.c
==============================================================================
--- stable/7/sys/sparc64/sparc64/tick.c	Wed Jan  5 12:05:27 2011	(r216996)
+++ stable/7/sys/sparc64/sparc64/tick.c	Wed Jan  5 12:05:31 2011	(r216997)
@@ -222,7 +222,7 @@ tick_hardclock(struct trapframe *tf)
 	adj = PCPU_GET(tickadj);
 	s = intr_disable();
 	tick = rd(tick);
-	wr(tick_cmpr, tick + tick_increment - adj, 0);
+	wrtickcmpr(tick + tick_increment - adj, 0);
 	intr_restore(s);
 	tick_hardclock_common(tf, tick, adj);
 	critical_exit();
@@ -238,7 +238,7 @@ tick_hardclock_bbwar(struct trapframe *t
 	adj = PCPU_GET(tickadj);
 	s = intr_disable();
 	tick = rd(tick);
-	wrtickcmpr(tick + tick_increment - adj, 0);
+	wrtickcmpr_bbwar(tick + tick_increment - adj, 0);
 	intr_restore(s);
 	tick_hardclock_common(tf, tick, adj);
 	critical_exit();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101051205.p05C5VUq077306>