summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-21 22:00:56 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-21 22:00:56 +0000
commit168660f24dfc46c2702acbe4701a446f42a59578 (patch)
treef431368afbf6b1b71809cf3fd904d800ea126f4d /arch/sparc
parent6420f767924fa73b0ea267864d96820815f4ba5a (diff)
Merge with Linux 2.4.0-test5-pre3.
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/Makefile5
-rw-r--r--arch/sparc/kernel/Makefile67
-rw-r--r--arch/sparc/kernel/check_asm.sh21
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c2
-rw-r--r--arch/sparc/mm/hypersparc.S13
-rw-r--r--arch/sparc/mm/swift.S13
-rw-r--r--arch/sparc/mm/tsunami.S13
-rw-r--r--arch/sparc/mm/viking.S13
9 files changed, 71 insertions, 78 deletions
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 2fe7a2c18..b7156415a 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.46 2000/03/21 06:12:26 davem Exp $
+# $Id: Makefile,v 1.47 2000/07/15 00:04:27 davem Exp $
# sparc/Makefile
#
# Makefile for the architecture dependent flags and dependencies on the
@@ -56,8 +56,9 @@ archclean:
-$(MAKE) -C arch/sparc/boot clean
archmrproper:
+ rm -f $(TOPDIR)/include/asm-sparc/asm_offsets.h
-archdep:
+archdep: check_asm
check_asm:
$(MAKE) -C arch/sparc/kernel check_asm
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index 623ab7958..615445364 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $
+# $Id: Makefile,v 1.59 2000/07/16 18:21:24 ecd Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
@@ -50,6 +50,9 @@ head.o: head.S
$(CC) $(AFLAGS) -ansi -c $*.S -o $*.o
check_asm: dummy
+ @if [ ! -r $(HPATH)/asm/asm_offsets.h ] ; then \
+ touch $(HPATH)/asm/asm_offsets.h ; \
+ fi
@echo "/* Automatically generated. Do not edit. */" > asm_offsets.h
@echo "#ifndef __ASM_OFFSETS_H__" >> asm_offsets.h
@echo "#define __ASM_OFFSETS_H__" >> asm_offsets.h
@@ -62,21 +65,29 @@ check_asm: dummy
@echo "#undef CONFIG_SMP" >> tmp.c
@echo "#include <linux/sched.h>" >> tmp.c
$(CPP) $(CPPFLAGS) tmp.c -o tmp.i
+ @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c
+ @echo "#include <linux/config.h>" >> check_asm_data.c
+ @echo "#undef CONFIG_SMP" >> check_asm_data.c
+ @echo "#include <linux/sched.h>" >> check_asm_data.c
+ @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c
+ $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c
+ $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c
+ $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c
+ @echo '};' >> check_asm_data.c
+ $(CC) $(CFLAGS) -S -o check_asm_data.s check_asm_data.c
@echo "/* Automatically generated. Do not edit. */" > check_asm.c
- @echo "#include <linux/config.h>" >> check_asm.c
- @echo "#undef CONFIG_SMP" >> check_asm.c
- @echo "#include <linux/sched.h>" >> check_asm.c
- @echo 'struct task_struct _task;' >> check_asm.c
- @echo 'struct mm_struct _mm;' >> check_asm.c
- @echo 'struct thread_struct _thread;' >> check_asm.c
@echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
+ @echo "unsigned int check_asm_data[] = {" >> check_asm.c
+ $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c
+ @echo "};" >> check_asm.c
@echo 'int main(void) {' >> check_asm.c
- $(SH) ./check_asm.sh task tmp.i check_asm.c
- $(SH) ./check_asm.sh mm tmp.i check_asm.c
- $(SH) ./check_asm.sh thread tmp.i check_asm.c
+ @echo 'int i = 0;' >> check_asm.c
+ $(SH) ./check_asm.sh -printf task tmp.i check_asm.c
+ $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c
+ $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c
@echo 'return 0; }' >> check_asm.c
- @rm -f tmp.[ci]
- $(CC) $(CFLAGS) -o check_asm check_asm.c
+ @rm -f tmp.[ci] check_asm_data.[cs]
+ $(HOSTCC) -o check_asm check_asm.c
./check_asm >> asm_offsets.h
@rm -f check_asm check_asm.c
@echo "" >> asm_offsets.h
@@ -87,22 +98,30 @@ check_asm: dummy
@echo "#define CONFIG_SMP 1" >> tmp.c
@echo "#include <linux/sched.h>" >> tmp.c
$(CPP) $(CPPFLAGS) tmp.c -o tmp.i
+ @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c
+ @echo "#include <linux/config.h>" >> check_asm_data.c
+ @echo "#undef CONFIG_SMP" >> check_asm_data.c
+ @echo "#define CONFIG_SMP 1" >> check_asm_data.c
+ @echo "#include <linux/sched.h>" >> check_asm_data.c
+ @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c
+ $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c
+ $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c
+ $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c
+ @echo '};' >> check_asm_data.c
+ $(CC) $(CFLAGS) -S -o check_asm_data.s check_asm_data.c
@echo "/* Automatically generated. Do not edit. */" > check_asm.c
- @echo "#include <linux/config.h>" >> check_asm.c
- @echo "#undef CONFIG_SMP" >> check_asm.c
- @echo "#define CONFIG_SMP 1" >> check_asm.c
- @echo "#include <linux/sched.h>" >> check_asm.c
- @echo 'struct task_struct _task;' >> check_asm.c
- @echo 'struct mm_struct _mm;' >> check_asm.c
- @echo 'struct thread_struct _thread;' >> check_asm.c
@echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
+ @echo "unsigned int check_asm_data[] = {" >> check_asm.c
+ $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c
+ @echo "};" >> check_asm.c
@echo 'int main(void) {' >> check_asm.c
- $(SH) ./check_asm.sh task tmp.i check_asm.c
- $(SH) ./check_asm.sh mm tmp.i check_asm.c
- $(SH) ./check_asm.sh thread tmp.i check_asm.c
+ @echo 'int i = 0;' >> check_asm.c
+ $(SH) ./check_asm.sh -printf task tmp.i check_asm.c
+ $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c
+ $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c
@echo 'return 0; }' >> check_asm.c
- @rm -f tmp.[ci]
- $(CC) $(CFLAGS) -o check_asm check_asm.c
+ @rm -f tmp.[ci] check_asm_data.[cs]
+ $(HOSTCC) -o check_asm check_asm.c
./check_asm >> asm_offsets.h
@rm -f check_asm check_asm.c
@echo "" >> asm_offsets.h
diff --git a/arch/sparc/kernel/check_asm.sh b/arch/sparc/kernel/check_asm.sh
index 2d2fbd224..5f1ed770e 100644
--- a/arch/sparc/kernel/check_asm.sh
+++ b/arch/sparc/kernel/check_asm.sh
@@ -1,3 +1,20 @@
#!/bin/sh
-sed -n -e '/struct[ ]*'$1'_struct[ ]*{/,/};/p' < $2 | sed '/struct[ ]*'$1'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\
-/g' | sed 's/^[ *]*//;s/[ ]*$//;s/^.*$/printf ("#define AOFF_'$1'_\0 0x%08x\\n#define ASIZ_'$1'_\0 0x%08x\\n", ((char *)\&_'$1'.\0) - ((char *)\&_'$1'), sizeof(_'$1'.\0));/' >> $3
+case $1 in
+ -printf)
+ sed -n -e '/struct[ ]*'$2'_struct[ ]*{/,/};/p' < $3 | sed '/struct[ ]*'$2'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\
+/g' | sed 's/^[ *]*//;s/[ ]*$//;s/^.*$/printf ("#define AOFF_'$2'_\0 0x%08x\\n", check_asm_data[i++]); printf("#define ASIZ_'$2'_\0 0x%08x\\n", check_asm_data[i++]);/' >> $4
+ echo "printf (\"#define ASIZ_$2\\t0x%08x\\n\", check_asm_data[i++]);" >> $4
+ ;;
+ -data)
+ sed -n -e '/struct[ ]*'$2'_struct[ ]*{/,/};/p' < $3 | sed '/struct[ ]*'$2'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\
+/g' | sed 's/^[ *]*//;s/[ ]*$//;s/^.*$/ ((char *)\&((struct '$2'_struct *)0)->\0) - ((char *)((struct '$2'_struct *)0)), sizeof(((struct '$2'_struct *)0)->\0),/' >> $4
+ echo " sizeof(struct $2_struct)," >> $4
+ ;;
+ -ints)
+ sed -n -e '/check_asm_data:/,/\.size/p' <$2 | sed -e 's/check_asm_data://' -e 's/\.size.*//' -e 's/\.long[ ]\([0-9]*\)/\1,/' >>$3
+ ;;
+ *)
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index c0480ab5a..0e05908fe 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -187,7 +187,7 @@ void free_irq(unsigned int irq, void *dev_id)
else
*(cpu_irq + irq_action) = action->next;
- kfree_s(action, sizeof(struct irqaction));
+ kfree(action);
if (!(*(cpu_irq + irq_action)))
disable_irq(irq);
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 192a6bb03..59f014efc 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -173,7 +173,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id)
else
*actionp = action->next;
- kfree_s(action, sizeof(struct irqaction));
+ kfree(action);
if (!(*actionp))
disable_irq(irq);
diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S
index e5920a801..44441b6b5 100644
--- a/arch/sparc/mm/hypersparc.S
+++ b/arch/sparc/mm/hypersparc.S
@@ -1,4 +1,4 @@
-/* $Id: hypersparc.S,v 1.16 2000/06/04 06:23:52 anton Exp $
+/* $Id: hypersparc.S,v 1.17 2000/07/16 21:48:52 anton Exp $
* hypersparc.S: High speed Hypersparc mmu/cache operations.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -12,17 +12,6 @@
#include <linux/config.h>
#include <linux/init.h>
-#define WINDOW_FLUSH(tmp1, tmp2) \
- mov 0, tmp1; \
-98: ld [%g6 + AOFF_task_thread + AOFF_thread_uwinmask], tmp2; \
- orcc %g0, tmp2, %g0; \
- add tmp1, 1, tmp1; \
- bne 98b; \
- save %sp, -64, %sp; \
-99: subcc tmp1, 1, tmp1; \
- bne 99b; \
- restore %g0, %g0, %g0;
-
.text
.align 4
diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S
index 2ba8a6610..1699bca41 100644
--- a/arch/sparc/mm/swift.S
+++ b/arch/sparc/mm/swift.S
@@ -1,4 +1,4 @@
-/* $Id: swift.S,v 1.6 2000/06/04 06:23:53 anton Exp $
+/* $Id: swift.S,v 1.7 2000/07/16 21:48:52 anton Exp $
* swift.S: MicroSparc-II mmu/cache operations.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
@@ -11,17 +11,6 @@
#include <asm/pgtsrmmu.h>
#include <asm/asm_offsets.h>
-#define WINDOW_FLUSH(tmp1, tmp2) \
- mov 0, tmp1; \
-98: ld [%g6 + AOFF_task_thread + AOFF_thread_uwinmask], tmp2; \
- orcc %g0, tmp2, %g0; \
- add tmp1, 1, tmp1; \
- bne 98b; \
- save %sp, -64, %sp; \
-99: subcc tmp1, 1, tmp1; \
- bne 99b; \
- restore %g0, %g0, %g0;
-
.text
.align 4
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
index 316e00e3a..f3678c0ed 100644
--- a/arch/sparc/mm/tsunami.S
+++ b/arch/sparc/mm/tsunami.S
@@ -1,4 +1,4 @@
-/* $Id: tsunami.S,v 1.5 2000/06/04 06:23:53 anton Exp $
+/* $Id: tsunami.S,v 1.6 2000/07/16 21:48:52 anton Exp $
* tsunami.S: High speed MicroSparc-I mmu/cache operations.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -11,17 +11,6 @@
#include <asm/page.h>
#include <asm/pgtsrmmu.h>
-#define WINDOW_FLUSH(tmp1, tmp2) \
- mov 0, tmp1; \
-98: ld [%g6 + AOFF_task_thread + AOFF_thread_uwinmask], tmp2; \
- orcc %g0, tmp2, %g0; \
- add tmp1, 1, tmp1; \
- bne 98b; \
- save %sp, -64, %sp; \
-99: subcc tmp1, 1, tmp1; \
- bne 99b; \
- restore %g0, %g0, %g0;
-
.text
.align 4
diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S
index ffbec2342..e03ec9803 100644
--- a/arch/sparc/mm/viking.S
+++ b/arch/sparc/mm/viking.S
@@ -1,4 +1,4 @@
-/* $Id: viking.S,v 1.17 2000/06/04 06:23:53 anton Exp $
+/* $Id: viking.S,v 1.18 2000/07/16 21:48:52 anton Exp $
* viking.S: High speed Viking cache/mmu operations
*
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
@@ -107,17 +107,6 @@ viking_mxcc_flush_page:
9: retl
nop
-#define WINDOW_FLUSH(tmp1, tmp2) \
- mov 0, tmp1; \
-98: ld [%g6 + AOFF_task_thread + AOFF_thread_uwinmask], tmp2; \
- orcc %g0, tmp2, %g0; \
- add tmp1, 1, tmp1; \
- bne 98b; \
- save %sp, -64, %sp; \
-99: subcc tmp1, 1, tmp1; \
- bne 99b; \
- restore %g0, %g0, %g0;
-
viking_flush_cache_page:
#ifndef CONFIG_SMP
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */