From owner-svn-src-stable-7@FreeBSD.ORG Sat Sep 5 05:57:44 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD6E106566C; Sat, 5 Sep 2009 05:57:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63A948FC0A; Sat, 5 Sep 2009 05:57:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n855vius038789; Sat, 5 Sep 2009 05:57:44 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n855viT4038786; Sat, 5 Sep 2009 05:57:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200909050557.n855viT4038786@svn.freebsd.org> From: Alan Cox Date: Sat, 5 Sep 2009 05:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196853 - in stable/7/sys: . contrib/pf i386/include X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 05:57:44 -0000 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_ */