summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/Makefile122
-rw-r--r--arch/sparc64/kernel/check_asm.sh22
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c11
-rw-r--r--arch/sparc64/kernel/systbls.S6
4 files changed, 95 insertions, 66 deletions
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index 7697c63e5..dab4e3bcf 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $
+# $Id: Makefile,v 1.60 2000/07/16 18:21:24 ecd Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
@@ -68,42 +68,41 @@ else
endif
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 -e "#define __ASM_OFFSETS_H__\n" >> asm_offsets.h
@echo -e "#include <linux/config.h>\n" >> asm_offsets.h
- @echo '#if defined(__KERNEL__) && !defined(__ASSEMBLY__)' >> asm_offsets.h
- @if $(CC) -c -m64 -mcmodel=medlow -o /dev/null /dev/null >/dev/null 2>&1; then \
- echo '# if !((__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))' >> asm_offsets.h; \
- else \
- echo '# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)' >> asm_offsets.h; \
- fi
- @echo -e "# error Please issue 'make check_asm' in linux top-level directory first\n# endif\n#endif\n" >> asm_offsets.h
@echo -e "#ifndef CONFIG_SMP\n" >> asm_offsets.h
@echo "#include <linux/config.h>" > tmp.c
@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) $(CPPFLAGS) $(CMODEL_CFLAG) -ffixed-g4 -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) -o check_asm check_asm.c
- # <hack> Until we can do this natively, a hack has to take place
- $(CC) $(CPPFLAGS) $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm.s check_asm.c
- $(HOSTCC) -Wa,-Av9a -o check_asm check_asm.s
- @rm -f check_asm.s
- # </hack>
+ @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 -e "\n#else /* CONFIG_SMP */\n" >> asm_offsets.h
@@ -113,53 +112,59 @@ 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) $(CPPFLAGS) $(CMODEL_CFLAG) -ffixed-g4 -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) -o check_asm check_asm.c
- # <hack> Until we can do this natively, a hack has to take place
- $(CC) $(CPPFLAGS) $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm.s check_asm.c
- $(HOSTCC) -Wa,-Av9a -o check_asm check_asm.s
- @rm -f check_asm.s
- # </hack>
+ @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 -e "\n#else /* SPIN_LOCK_DEBUG */\n" >> asm_offsets.h
@echo "#include <linux/sched.h>" > tmp.c
$(CPP) $(CPPFLAGS) -DSPIN_LOCK_DEBUG 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) $(CPPFLAGS) -DSPIN_LOCK_DEBUG $(CMODEL_CFLAG) -ffixed-g4 -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) -DSPIN_LOCK_DEBUG -o check_asm check_asm.c
- # <hack> Until we can do this natively, a hack has to take place
- $(CC) $(CPPFLAGS) -DSPIN_LOCK_DEBUG $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm.s check_asm.c
- $(HOSTCC) -Wa,-Av9a -o check_asm check_asm.s
- @rm -f check_asm.s
- # </hack>
+ @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 -e "#endif /* SPIN_LOCK_DEBUG */\n" >> asm_offsets.h
@@ -176,5 +181,4 @@ check_asm: dummy
mv -f asm_offsets.h $(HPATH)/asm/asm_offsets.h; \
fi
-
include $(TOPDIR)/Rules.make
diff --git a/arch/sparc64/kernel/check_asm.sh b/arch/sparc64/kernel/check_asm.sh
index fd56d4e3b..5f1ed770e 100644
--- a/arch/sparc64/kernel/check_asm.sh
+++ b/arch/sparc64/kernel/check_asm.sh
@@ -1,4 +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
-echo "printf (\"#define ASIZ_$1\\t0x%08x\\n\", sizeof(_$1));" >> $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/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 7cadb3da5..89c1a90ea 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc32.c,v 1.155 2000/07/10 20:57:35 davem Exp $
+/* $Id: sys_sparc32.c,v 1.156 2000/07/13 10:59:13 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -4177,3 +4177,12 @@ out_sem:
out:
return ret;
}
+
+extern asmlinkage long sys_setpriority(int which, int who, int niceval);
+
+asmlinkage int sys_setpriority32(u32 which, u32 who, u32 niceval)
+{
+ return sys_setpriority((int) which,
+ (int) who,
+ (int) niceval);
+}
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 9c20a2752..f73486541 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -1,4 +1,4 @@
-/* $Id: systbls.S,v 1.73 2000/05/10 14:23:39 jj Exp $
+/* $Id: systbls.S,v 1.74 2000/07/13 10:59:13 davem Exp $
* systbls.S: System call entry point tables for OS compatibility.
* The native Linux system call table lives here also.
*
@@ -38,7 +38,7 @@ sys_call_table32:
/*80*/ .word sys32_setgroups16, sys_getpgrp, sys_setgroups, sys32_setitimer, sys32_ftruncate64
.word sys_swapon, sys32_getitimer, sys_setuid, sys_sethostname, sys_setgid
/*90*/ .word sys_dup2, sys_setfsuid, sys32_fcntl, sys32_select, sys_setfsgid
- .word sys_fsync, sys_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
+ .word sys_fsync, sys_setpriority32, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
/*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending
.word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
/*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall
@@ -170,7 +170,7 @@ sunos_sys_table:
.word sys32_getitimer, sys_gethostname, sys_sethostname
.word sunos_getdtablesize, sys_dup2, sunos_nop
.word sys32_fcntl, sunos_select, sunos_nop
- .word sys_fsync, sys_setpriority, sunos_socket
+ .word sys_fsync, sys_setpriority32, sunos_socket
.word sys_connect, sunos_accept
/*100*/ .word sys_getpriority, sunos_send, sunos_recv
.word sunos_nosys, sys_bind, sunos_setsockopt