From: NIIBE Y. <gn...@m1...> - 2002-03-22 05:40:01
|
Follow up to 2.5.7. 2002-03-22 NIIBE Yutaka <gn...@m1...> * include/asm-sh/mman.h (PROT_SEM): Added. * arch/sh/kernel/signal.c (do_signal): Follow the name change of p_ptr -> parent of the task. * include/asm-sh/unistd.h (__NR_futex): Added. * arch/sh/kernel/entry.S (sys_call_table): Added sys_futex. (syscall_exit_work): Move up. (Near work_pending.) (sys_nfsservctl): Define to sys_ni_syscall, when not NFSD. * include/asm-sh/pgalloc.h (check_pgt_cache): New macro. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.7 diff -u -3 -p -r1.7 entry.S --- arch/sh/kernel/entry.S 22 Mar 2002 04:44:45 -0000 1.7 +++ arch/sh/kernel/entry.S 22 Mar 2002 05:37:34 -0000 @@ -2,7 +2,7 @@ * * linux/arch/sh/entry.S * - * Copyright (C) 1999, 2000 Niibe Yutaka + * Copyright (C) 1999, 2000, 2002 Niibe Yutaka * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -15,6 +15,9 @@ #include <linux/config.h> #include <asm/thread_info.h> +#if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE) +#define sys_nfsservctl sys_ni_syscall +#endif ! NOTE: ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address @@ -327,6 +330,19 @@ ENTRY(resume_userspace) 2: .long SYMBOL_NAME(do_signal) + .align 2 +syscall_exit_work: + ! r0: current_thread_info->flags + tst #_TIF_SYSCALL_TRACE, r0 + bt work_pending + STI() + ! XXX setup arguments... + mov.l 1f, r0 + jsr @r0 + nop + bra resume_userspace + nop + /* * Syscall interface: * @@ -499,19 +515,6 @@ syscall_trace_entry: mov #-ENOSYS, r0 .align 2 -syscall_exit_work: - ! r0: current_thread_info->flags - tst #_TIF_SYSCALL_TRACE, r0 - bt work_pending - STI() - ! XXX setup arguments... - mov.l 1f, r0 - jsr @r0 - nop - bra resume_userspace - nop - - .align 2 1: .long SYMBOL_NAME(do_syscall_trace) 2: .long NR_syscalls __INV_IMASK: @@ -1123,6 +1126,7 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_fremovexattr) .long SYMBOL_NAME(sys_tkill) .long SYMBOL_NAME(sys_sendfile64) + .long SYMBOL_NAME(sys_futex) /* 240 */ .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) Index: arch/sh/kernel/signal.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/signal.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 signal.c --- arch/sh/kernel/signal.c 22 Mar 2002 00:59:15 -0000 1.4 +++ arch/sh/kernel/signal.c 22 Mar 2002 05:37:34 -0000 @@ -620,8 +620,8 @@ int do_signal(struct pt_regs *regs, sigs info.si_signo = signr; info.si_errno = 0; info.si_code = SI_USER; - info.si_pid = current->p_pptr->pid; - info.si_uid = current->p_pptr->uid; + info.si_pid = current->parent->pid; + info.si_uid = current->parent->uid; } /* If the (new) signal is now blocked, requeue it. */ @@ -660,7 +660,7 @@ int do_signal(struct pt_regs *regs, sigs case SIGSTOP: current->state = TASK_STOPPED; current->exit_code = signr; - if (!(current->p_pptr->sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) + if (!(current->parent->sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) notify_parent(current, SIGCHLD); schedule(); continue; Index: include/asm-sh/mman.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mman.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 mman.h --- include/asm-sh/mman.h 15 Oct 2001 20:45:10 -0000 1.1.1.1 +++ include/asm-sh/mman.h 22 Mar 2002 05:37:34 -0000 @@ -4,6 +4,7 @@ #define PROT_READ 0x1 /* page can be read */ #define PROT_WRITE 0x2 /* page can be written */ #define PROT_EXEC 0x4 /* page can be executed */ +#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_NONE 0x0 /* page can not be accessed */ #define MAP_SHARED 0x01 /* Share changes */ Index: include/asm-sh/pgalloc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgalloc.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 pgalloc.h --- include/asm-sh/pgalloc.h 22 Mar 2002 04:44:46 -0000 1.4 +++ include/asm-sh/pgalloc.h 22 Mar 2002 05:37:35 -0000 @@ -173,4 +173,7 @@ static inline void ptep_mkdirty(pte_t *p pte_t old_pte = *ptep; set_pte(ptep, pte_mkdirty(old_pte)); } + +#define check_pgt_cache() do { } while (0) + #endif /* __ASM_SH_PGALLOC_H */ Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 unistd.h --- include/asm-sh/unistd.h 22 Mar 2002 04:44:46 -0000 1.3 +++ include/asm-sh/unistd.h 22 Mar 2002 05:37:35 -0000 @@ -247,6 +247,7 @@ #define __NR_fremovexattr 237 #define __NR_tkill 238 #define __NR_sendfile64 239 +#define __NR_futex 240 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */ |