X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fsyscall.c;h=146b452dde74b70d65f1ff07ff5efd9fbd8eb098;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c45bf3948245a926956c53624697aa2ed5f12436;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index c45bf3948..146b452dd 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -3,10 +3,11 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1995, 1996, 1997, 2000, 2001 by Ralf Baechle + * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. */ +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #include #include @@ -37,7 +39,7 @@ #include #include -asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs) +asmlinkage int sys_pipe(nabi_no_regargs volatile struct pt_regs regs) { int fd[2]; int error, res; @@ -66,11 +68,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, int do_color_align; unsigned long task_size; -#if CONFIG_MIPS32 - task_size = TASK_SIZE; -#else - task_size = (current->thread.mflags & MF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE; -#endif + task_size = STACK_TOP; if (flags & MAP_FIXED) { /* @@ -116,7 +114,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, } /* common code for old and new mmaps */ -static inline long +static inline unsigned long do_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff) { @@ -140,8 +138,9 @@ out: return error; } -asmlinkage unsigned long old_mmap(unsigned long addr, size_t len, int prot, - int flags, int fd, off_t offset) +asmlinkage unsigned long +old_mmap(unsigned long addr, unsigned long len, int prot, + int flags, int fd, off_t offset) { unsigned long result; @@ -155,7 +154,7 @@ out: return result; } -asmlinkage long +asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff) { @@ -163,13 +162,15 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, } save_static_function(sys_fork); -static_unused int _sys_fork(nabi_no_regargs struct pt_regs regs) +__attribute_used__ noinline static int +_sys_fork(nabi_no_regargs struct pt_regs regs) { return do_fork(SIGCHLD, regs.regs[29], ®s, 0, NULL, NULL); } save_static_function(sys_clone); -static_unused int _sys_clone(nabi_no_regargs struct pt_regs regs) +__attribute_used__ noinline static int +_sys_clone(nabi_no_regargs struct pt_regs regs) { unsigned long clone_flags; unsigned long newsp; @@ -181,7 +182,7 @@ static_unused int _sys_clone(nabi_no_regargs struct pt_regs regs) newsp = regs.regs[29]; parent_tidptr = (int *) regs.regs[6]; child_tidptr = (int *) regs.regs[7]; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, + return do_fork(clone_flags, newsp, ®s, 0, parent_tidptr, child_tidptr); } @@ -266,7 +267,7 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) strncpy(vx_new_uts(nodename), nodename, len); nodename[__NEW_UTS_LEN] = '\0'; strlcpy(vx_new_uts(nodename), nodename, - sizeof(vx_new_uts(nodename))); + sizeof(vx_new_uts(nodename))); up_write(&uts_sem); return 0; }