summaryrefslogtreecommitdiffstats
path: root/arch/sparc/lib
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /arch/sparc/lib
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'arch/sparc/lib')
-rw-r--r--arch/sparc/lib/Makefile32
-rw-r--r--arch/sparc/lib/atomic.S14
-rw-r--r--arch/sparc/lib/blockops.S7
3 files changed, 31 insertions, 22 deletions
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index cefe7a851..6ec986c86 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.24 1997/05/08 17:45:26 davem Exp $
+# $Id: Makefile,v 1.25 1998/01/30 10:58:43 jj Exp $
# Makefile for Sparc library files..
#
@@ -16,19 +16,19 @@ lib.a: $(OBJS)
sync
checksum.o: checksum.S
- $(CC) -ansi -c -o checksum.o checksum.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o checksum.o checksum.S
memcpy.o: memcpy.S
$(CC) -D__ASSEMBLY__ -ansi -c -o memcpy.o memcpy.S
memcmp.o: memcmp.S
- $(CC) -ansi -c -o memcmp.o memcmp.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o memcmp.o memcmp.S
memscan.o: memscan.S
- $(CC) -ansi -c -o memscan.o memscan.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o memscan.o memscan.S
strncmp.o: strncmp.S
- $(CC) -ansi -c -o strncmp.o strncmp.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o strncmp.o strncmp.S
strncpy_from_user.o: strncpy_from_user.S
$(CC) -D__ASSEMBLY__ -ansi -c -o strncpy_from_user.o strncpy_from_user.S
@@ -40,7 +40,7 @@ copy_user.o: copy_user.S
$(CC) -D__ASSEMBLY__ -ansi -c -o copy_user.o copy_user.S
blockops.o: blockops.S
- $(CC) -ansi -c -o blockops.o blockops.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o blockops.o blockops.S
memset.o: memset.S
$(CC) -D__ASSEMBLY__ -ansi -c -o memset.o memset.S
@@ -73,34 +73,34 @@ bitops.o: bitops.S
endif
strlen.o: strlen.S
- $(CC) -ansi -c -o strlen.o strlen.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o strlen.o strlen.S
divdi3.o: divdi3.S
- $(CC) -ansi -c -o divdi3.o divdi3.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o divdi3.o divdi3.S
udivdi3.o: udivdi3.S
- $(CC) -ansi -c -o udivdi3.o udivdi3.S
+ $(CC) -D__ASSEMBLY__ -ansi -c -o udivdi3.o udivdi3.S
mul.o: mul.S
- $(CC) -c -o mul.o mul.S
+ $(CC) -D__ASSEMBLY__ -c -o mul.o mul.S
rem.o: rem.S
- $(CC) -DST_DIV0=0x2 -c -o rem.o rem.S
+ $(CC) -D__ASSEMBLY__ -DST_DIV0=0x2 -c -o rem.o rem.S
sdiv.o: sdiv.S
- $(CC) -DST_DIV0=0x2 -c -o sdiv.o sdiv.S
+ $(CC) -D__ASSEMBLY__ -DST_DIV0=0x2 -c -o sdiv.o sdiv.S
udiv.o: udiv.S
- $(CC) -DST_DIV0=0x2 -c -o udiv.o udiv.S
+ $(CC) -D__ASSEMBLY__ -DST_DIV0=0x2 -c -o udiv.o udiv.S
umul.o: umul.S
- $(CC) -c -o umul.o umul.S
+ $(CC) -D__ASSEMBLY__ -c -o umul.o umul.S
urem.o: urem.S
- $(CC) -DST_DIV0=0x2 -c -o urem.o urem.S
+ $(CC) -D__ASSEMBLY__ -DST_DIV0=0x2 -c -o urem.o urem.S
ashrdi3.o: ashrdi3.S
- $(CC) -c -o ashrdi3.o ashrdi3.S
+ $(CC) -D__ASSEMBLY__ -c -o ashrdi3.o ashrdi3.S
dep:
diff --git a/arch/sparc/lib/atomic.S b/arch/sparc/lib/atomic.S
index 89bf2c5fb..4e4aa0646 100644
--- a/arch/sparc/lib/atomic.S
+++ b/arch/sparc/lib/atomic.S
@@ -10,8 +10,9 @@
.text
.align 4
- .globl ___xchg32
-___xchg32:
+#ifndef __SMP__
+ .globl ___xchg32_sun4c
+___xchg32_sun4c:
rd %psr, %g3
andcc %g3, PSR_PIL, %g0
bne 1f
@@ -27,9 +28,16 @@ ___xchg32:
nop; nop; nop
1:
mov %g7, %g2
- jmpl %o7, %g0 /* Note, not + 0x8, see call in system.h */
+ jmpl %o7 + 8, %g0
mov %g4, %o7
+ .globl ___xchg32_sun4md
+___xchg32_sun4md:
+ swap [%g1], %g2
+ jmpl %o7 + 8, %g0
+ mov %g4, %o7
+#endif
+
/* Read asm-sparc/atomic.h carefully to understand how this works for SMP.
* Really, some things here for SMP are overly clever, go read the header.
*/
diff --git a/arch/sparc/lib/blockops.S b/arch/sparc/lib/blockops.S
index a5a4bffad..3f09ec1db 100644
--- a/arch/sparc/lib/blockops.S
+++ b/arch/sparc/lib/blockops.S
@@ -1,10 +1,11 @@
-/* $Id: blockops.S,v 1.7 1997/05/20 07:58:28 jj Exp $
+/* $Id: blockops.S,v 1.8 1998/01/30 10:58:44 jj Exp $
* blockops.S: Common block zero optimized routines.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
+#include <asm/page.h>
/* Zero out 64 bytes of memory at (buf + offset).
* Assumes %g1 contains zero.
@@ -53,7 +54,7 @@ C_LABEL(bzero_1page):
/* %o0 = buf */
or %g0, %g0, %g1
or %o0, %g0, %o1
- or %g0, 0x10, %g2
+ or %g0, (PAGE_SIZE >> 8), %g2
1:
BLAST_BLOCK(%o0, 0x00)
BLAST_BLOCK(%o0, 0x40)
@@ -70,7 +71,7 @@ C_LABEL(__copy_1page):
/* NOTE: If you change the number of insns of this routine, please check
* arch/sparc/mm/hypersparc.S */
/* %o0 = dst, %o1 = src */
- or %g0, 0x10, %g1
+ or %g0, (PAGE_SIZE >> 8), %g1
1:
MIRROR_BLOCK(%o0, %o1, 0x00, %o2, %o3, %o4, %o5, %g2, %g3, %g4, %g5)
MIRROR_BLOCK(%o0, %o1, 0x20, %o2, %o3, %o4, %o5, %g2, %g3, %g4, %g5)