From owner-svn-src-head@FreeBSD.ORG Mon Mar 12 18:10:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3608A106564A; Mon, 12 Mar 2012 18:10:02 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC4B8FC08; Mon, 12 Mar 2012 18:10:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2CIA1ne078054; Mon, 12 Mar 2012 18:10:01 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2CIA1Be078050; Mon, 12 Mar 2012 18:10:01 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203121810.q2CIA1Be078050@svn.freebsd.org> From: Juli Mallett Date: Mon, 12 Mar 2012 18:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232872 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 18:10:02 -0000 Author: jmallett Date: Mon Mar 12 18:10:01 2012 New Revision: 232872 URL: http://svn.freebsd.org/changeset/base/232872 Log: Remove more unused stuff, primarily a set of (unused, thankfully) PIO functions. Adjust nearby style of one assembly function END(). Modified: head/sys/mips/include/cpufunc.h head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Mon Mar 12 17:56:57 2012 (r232871) +++ head/sys/mips/include/cpufunc.h Mon Mar 12 18:10:01 2012 (r232872) @@ -106,18 +106,6 @@ mips_wbflush(void) #endif } -static __inline void -mips_read_membar(void) -{ - /* Nil */ -} - -static __inline void -mips_write_membar(void) -{ - mips_wbflush(); -} - #ifdef _KERNEL /* * XXX @@ -354,29 +342,8 @@ breakpoint(void) } #if defined(__GNUC__) && !defined(__mips_o32) -static inline uint64_t -mips3_ld(const volatile uint64_t *va) -{ - uint64_t rv; - -#if defined(_LP64) - rv = *va; -#else - __asm volatile("ld %0,0(%1)" : "=d"(rv) : "r"(va)); -#endif - - return (rv); -} - -static inline void -mips3_sd(volatile uint64_t *va, uint64_t v) -{ -#if defined(_LP64) - *va = v; -#else - __asm volatile("sd %0,0(%1)" :: "r"(v), "r"(va)); -#endif -} +#define mips3_ld(a) (*(const volatile uint64_t *)(a)) +#define mips3_sd(a, v) (*(volatile uint64_t *)(a) = (v)) #else uint64_t mips3_ld(volatile uint64_t *va); void mips3_sd(volatile uint64_t *, uint64_t); @@ -392,81 +359,4 @@ void mips3_sd(volatile uint64_t *, uint6 #define writew(va, d) (*(volatile uint16_t *) (va) = (d)) #define writel(va, d) (*(volatile uint32_t *) (va) = (d)) -/* - * I/O macros. - */ - -#define outb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out8(a,v) (*(volatile unsigned char*)(a) = (v)) -#define outw(a,v) (*(volatile unsigned short*)(a) = (v)) -#define out16(a,v) outw(a,v) -#define outl(a,v) (*(volatile unsigned int*)(a) = (v)) -#define out32(a,v) outl(a,v) -#define inb(a) (*(volatile unsigned char*)(a)) -#define in8(a) (*(volatile unsigned char*)(a)) -#define inw(a) (*(volatile unsigned short*)(a)) -#define in16(a) inw(a) -#define inl(a) (*(volatile unsigned int*)(a)) -#define in32(a) inl(a) - -#define out8rb(a,v) (*(volatile unsigned char*)(a) = (v)) -#define out16rb(a,v) (__out16rb((volatile uint16_t *)(a), v)) -#define out32rb(a,v) (__out32rb((volatile uint32_t *)(a), v)) -#define in8rb(a) (*(volatile unsigned char*)(a)) -#define in16rb(a) (__in16rb((volatile uint16_t *)(a))) -#define in32rb(a) (__in32rb((volatile uint32_t *)(a))) - -#define _swap_(x) (((x) >> 24) | ((x) << 24) | \ - (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8)) - -static __inline void __out32rb(volatile uint32_t *, uint32_t); -static __inline void __out16rb(volatile uint16_t *, uint16_t); -static __inline uint32_t __in32rb(volatile uint32_t *); -static __inline uint16_t __in16rb(volatile uint16_t *); - -static __inline void -__out32rb(volatile uint32_t *a, uint32_t v) -{ - uint32_t _v_ = v; - - _v_ = _swap_(_v_); - out32(a, _v_); -} - -static __inline void -__out16rb(volatile uint16_t *a, uint16_t v) -{ - uint16_t _v_; - - _v_ = ((v >> 8) & 0xff) | (v << 8); - out16(a, _v_); -} - -static __inline uint32_t -__in32rb(volatile uint32_t *a) -{ - uint32_t _v_; - - _v_ = in32(a); - _v_ = _swap_(_v_); - return _v_; -} - -static __inline uint16_t -__in16rb(volatile uint16_t *a) -{ - uint16_t _v_; - - _v_ = in16(a); - _v_ = ((_v_ >> 8) & 0xff) | (_v_ << 8); - return _v_; -} - -void insb(uint8_t *, uint8_t *,int); -void insw(uint16_t *, uint16_t *,int); -void insl(uint32_t *, uint32_t *,int); -void outsb(uint8_t *, const uint8_t *,int); -void outsw(uint16_t *, const uint16_t *,int); -void outsl(uint32_t *, const uint32_t *,int); - #endif /* !_MACHINE_CPUFUNC_H_ */ Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Mar 12 17:56:57 2012 (r232871) +++ head/sys/mips/mips/support.S Mon Mar 12 18:10:01 2012 (r232872) @@ -167,148 +167,6 @@ END(copystr) /* - * fillw(pat, addr, count) - */ -LEAF(fillw) -1: - PTR_ADDU a2, a2, -1 - sh a0, 0(a1) - bne a2,zero, 1b - PTR_ADDU a1, a1, 2 - - jr ra - nop -END(fillw) - -/* - * Optimized memory zero code. - * mem_zero_page(addr); - */ -LEAF(mem_zero_page) - li v0, PAGE_SIZE -1: - PTR_SUBU v0, 8 - sd zero, 0(a0) - bne zero, v0, 1b - PTR_ADDU a0, 8 - jr ra - nop -END(mem_zero_page) - -/* - * Block I/O routines mainly used by I/O drivers. - * - * Args as: a0 = port - * a1 = memory address - * a2 = count - */ -LEAF(insb) - beq a2, zero, 2f - PTR_ADDU a2, a1 -1: - lbu v0, 0(a0) - PTR_ADDU a1, 1 - bne a1, a2, 1b - sb v0, -1(a1) -2: - jr ra - nop -END(insb) - -LEAF(insw) - beq a2, zero, 2f - PTR_ADDU a2, a2 - PTR_ADDU a2, a1 -1: - lhu v0, 0(a0) - PTR_ADDU a1, 2 - bne a1, a2, 1b - sh v0, -2(a1) -2: - jr ra - nop -END(insw) - -LEAF(insl) - beq a2, zero, 2f - sll a2, 2 - PTR_ADDU a2, a1 -1: - lw v0, 0(a0) - PTR_ADDU a1, 4 - bne a1, a2, 1b - sw v0, -4(a1) -2: - jr ra - nop -END(insl) - -LEAF(outsb) - beq a2, zero, 2f - PTR_ADDU a2, a1 -1: - lbu v0, 0(a1) - PTR_ADDU a1, 1 - bne a1, a2, 1b - sb v0, 0(a0) -2: - jr ra - nop -END(outsb) - -LEAF(outsw) - beq a2, zero, 2f - addu a2, a2 - li v0, 1 - and v0, a1 - bne v0, zero, 3f # arghh, unaligned. - addu a2, a1 -1: - lhu v0, 0(a1) - addiu a1, 2 - bne a1, a2, 1b - sh v0, 0(a0) -2: - jr ra - nop -3: - LWHI v0, 0(a1) - LWLO v0, 3(a1) - addiu a1, 2 - bne a1, a2, 3b - sh v0, 0(a0) - - jr ra - nop -END(outsw) - -LEAF(outsl) - beq a2, zero, 2f - sll a2, 2 - li v0, 3 - and v0, a1 - bne v0, zero, 3f # arghh, unaligned. - addu a2, a1 -1: - lw v0, 0(a1) - addiu a1, 4 - bne a1, a2, 1b - sw v0, 0(a0) -2: - jr ra - nop -3: - LWHI v0, 0(a1) - LWLO v0, 3(a1) - addiu a1, 4 - bne a1, a2, 3b - sw v0, 0(a0) - - jr ra - nop -END(outsl) - -/* * Copy a null terminated string from the user address space into * the kernel address space. * @@ -1244,7 +1102,7 @@ LEAF(breakpoint) break MIPS_BREAK_SOVER_VAL jr ra nop - END(breakpoint) +END(breakpoint) LEAF(setjmp) mfc0 v0, MIPS_COP_0_STATUS # Later the "real" spl value! Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Mon Mar 12 17:56:57 2012 (r232871) +++ head/sys/mips/mips/swtch.S Mon Mar 12 18:10:01 2012 (r232872) @@ -608,16 +608,6 @@ LEAF(MipsSaveCurFPState) END(MipsSaveCurFPState) /* - * When starting init, call this to configure the process for user - * mode. This will be inherited by other processes. - */ -LEAF_NOPROFILE(prepare_usermode) - j ra - nop -END(prepare_usermode) - - -/* * This code is copied the user's stack for returning from signal handlers * (see sendsig() and sigreturn()). We have to compute the address * of the sigcontext struct for the sigreturn call.