summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-03-12 18:10:01 +0000
committerjmallett <jmallett@FreeBSD.org>2012-03-12 18:10:01 +0000
commit89dc636733d07508428d015c5099c0c98a11e8b8 (patch)
tree80783d37a198aedbf86f708087bdde62316a29bd /sys
parent39ac3b03fda114711d0b1c29054d0fd15f552dde (diff)
downloadFreeBSD-src-89dc636733d07508428d015c5099c0c98a11e8b8.zip
FreeBSD-src-89dc636733d07508428d015c5099c0c98a11e8b8.tar.gz
Remove more unused stuff, primarily a set of (unused, thankfully) PIO
functions. Adjust nearby style of one assembly function END().
Diffstat (limited to 'sys')
-rw-r--r--sys/mips/include/cpufunc.h114
-rw-r--r--sys/mips/mips/support.S144
-rw-r--r--sys/mips/mips/swtch.S10
3 files changed, 3 insertions, 265 deletions
diff --git a/sys/mips/include/cpufunc.h b/sys/mips/include/cpufunc.h
index 27694b3..513237f 100644
--- a/sys/mips/include/cpufunc.h
+++ b/sys/mips/include/cpufunc.h
@@ -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 *, uint64_t);
#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_ */
diff --git a/sys/mips/mips/support.S b/sys/mips/mips/support.S
index dba5201..98bc7fe 100644
--- a/sys/mips/mips/support.S
+++ b/sys/mips/mips/support.S
@@ -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!
diff --git a/sys/mips/mips/swtch.S b/sys/mips/mips/swtch.S
index e18f412..8c43f24 100644
--- a/sys/mips/mips/swtch.S
+++ b/sys/mips/mips/swtch.S
@@ -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.
OpenPOWER on IntegriCloud