Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Sep 2009 05:57:44 +0000 (UTC)
From:      Alan Cox <alc@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: r196853 - in stable/7/sys: . contrib/pf i386/include
Message-ID:  <200909050557.n855viT4038786@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sat Sep  5 05:57:44 2009
New Revision: 196853
URL: http://svn.freebsd.org/changeset/base/196853

Log:
  MFC r194295
    Move (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h.
    specialreg.h now consists solely of register-related macros.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/i386/include/cpufunc.h
  stable/7/sys/i386/include/specialreg.h

Modified: stable/7/sys/i386/include/cpufunc.h
==============================================================================
--- stable/7/sys/i386/include/cpufunc.h	Sat Sep  5 05:28:07 2009	(r196852)
+++ stable/7/sys/i386/include/cpufunc.h	Sat Sep  5 05:57:44 2009	(r196853)
@@ -646,6 +646,20 @@ load_dr7(u_int dr7)
 	__asm __volatile("movl %0,%%dr7" : : "r" (dr7));
 }
 
+static __inline u_char
+read_cyrix_reg(u_char reg)
+{
+	outb(0x22, reg);
+	return inb(0x23);
+}
+
+static __inline void
+write_cyrix_reg(u_char reg, u_char data)
+{
+	outb(0x22, reg);
+	outb(0x23, data);
+}
+
 static __inline register_t
 intr_disable(void)
 {
@@ -720,6 +734,7 @@ u_int	rdr5(void);
 u_int	rdr6(void);
 u_int	rdr7(void);
 uint64_t rdtsc(void);
+u_char	read_cyrix_reg(u_char reg);
 u_int	read_eflags(void);
 u_int	rfs(void);
 uint64_t rgdt(void);
@@ -728,6 +743,7 @@ uint64_t ridt(void);
 u_short	rldt(void);
 u_short	rtr(void);
 void	wbinvd(void);
+void	write_cyrix_reg(u_char reg, u_char data);
 void	write_eflags(u_int ef);
 void	wrmsr(u_int msr, uint64_t newval);
 

Modified: stable/7/sys/i386/include/specialreg.h
==============================================================================
--- stable/7/sys/i386/include/specialreg.h	Sat Sep  5 05:28:07 2009	(r196852)
+++ stable/7/sys/i386/include/specialreg.h	Sat Sep  5 05:57:44 2009	(r196853)
@@ -540,20 +540,4 @@
 #define	VIA_CRYPT_CWLO_KEY192		0x0000040c	/* 192bit, 12 rds */
 #define	VIA_CRYPT_CWLO_KEY256		0x0000080e	/* 256bit, 15 rds */
 
-#ifndef LOCORE
-static __inline u_char
-read_cyrix_reg(u_char reg)
-{
-	outb(0x22, reg);
-	return inb(0x23);
-}
-
-static __inline void
-write_cyrix_reg(u_char reg, u_char data)
-{
-	outb(0x22, reg);
-	outb(0x23, data);
-}
-#endif
-
 #endif /* !_MACHINE_SPECIALREG_H_ */



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