From 7b3e2fc847c8325a7b35185fa1fc2f1729ed9c5b Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 8 Feb 2006 12:58:41 +0000 Subject: [MIPS] Add support for TIF_RESTORE_SIGMASK. Signed-off-by: Ralf Baechle --- --- include/asm-mips/abi.h | 4 ++-- include/asm-mips/thread_info.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-mips/abi.h b/include/asm-mips/abi.h index 2e7e651c3e3fa7..5edd69bf0f24db 100644 --- a/include/asm-mips/abi.h +++ b/include/asm-mips/abi.h @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2005 by Ralf Baechle + * Copyright (C) 2005, 06 by Ralf Baechle (ralf@linux-mips.org) * Copyright (C) 2005 MIPS Technologies, Inc. */ #ifndef _ASM_ABI_H @@ -13,7 +13,7 @@ #include struct mips_abi { - int (* const do_signal)(sigset_t *oldset, struct pt_regs *regs); + int (* const do_signal)(struct pt_regs *regs); int (* const setup_frame)(struct k_sigaction * ka, struct pt_regs *regs, int signr, sigset_t *set); diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 1612b3fe108014..fa193f861e7162 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h @@ -114,6 +114,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ #define TIF_SECCOMP 5 /* secure computing */ +#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_MEMDIE 18 @@ -125,6 +126,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); #define _TIF_NEED_RESCHED (1< Date: Wed, 8 Feb 2006 13:38:18 +0000 Subject: [MIPS] Make do_signal return void. It's return value is ignored everywhere. Signed-off-by: Ralf Baechle --- --- arch/mips/kernel/process.c | 5 +++-- arch/mips/kernel/signal.c | 6 ++---- include/asm-mips/abi.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 02adc7384153d3..5232fc75293538 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -4,6 +4,7 @@ * for more details. * * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others. + * Copyright (C) 2005, 2006 by Ralf Baechle (ralf@linux-mips.org) * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2004 Thiemo Seufer */ @@ -58,8 +59,8 @@ ATTRIB_NORET void cpu_idle(void) } } -extern int do_signal(struct pt_regs *regs); -extern int do_signal32(struct pt_regs *regs); +extern void do_signal(struct pt_regs *regs); +extern void do_signal32(struct pt_regs *regs); /* * Native o32 and N64 ABI without DSP ASE diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 86a14d7b8534f6..c974cc9b30eb73 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -410,7 +410,7 @@ static inline int handle_signal(unsigned long sig, siginfo_t *info, return ret; } -int do_signal(struct pt_regs *regs) +void do_signal(struct pt_regs *regs) { struct k_sigaction ka; sigset_t *oldset; @@ -423,7 +423,7 @@ int do_signal(struct pt_regs *regs) * if so. */ if (!user_mode(regs)) - return 1; + return; if (try_to_freeze()) goto no_signal; @@ -477,8 +477,6 @@ no_signal: clear_thread_flag(TIF_RESTORE_SIGMASK); sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); } - - return 0; } /* diff --git a/include/asm-mips/abi.h b/include/asm-mips/abi.h index 5edd69bf0f24db..1ce0518ace2e65 100644 --- a/include/asm-mips/abi.h +++ b/include/asm-mips/abi.h @@ -13,7 +13,7 @@ #include struct mips_abi { - int (* const do_signal)(struct pt_regs *regs); + void (* const do_signal)(struct pt_regs *regs); int (* const setup_frame)(struct k_sigaction * ka, struct pt_regs *regs, int signr, sigset_t *set); -- cgit 1.2.3-korg From 72bf891421e261262c4e614c051a68093baddd21 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 8 Feb 2006 13:38:50 +0000 Subject: [MIPS] Wire up new syscalls. Signed-off-by: Ralf Baechle --- --- arch/mips/kernel/scall32-o32.S | 17 +++++++++++ arch/mips/kernel/scall64-64.S | 17 +++++++++++ arch/mips/kernel/scall64-n32.S | 17 +++++++++++ arch/mips/kernel/scall64-o32.S | 17 +++++++++++ include/asm-mips/unistd.h | 64 +++++++++++++++++++++++++++++++++++++----- 5 files changed, 125 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index a42e0e8caa7b22..d7c4a38ed5aee4 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -617,6 +617,23 @@ einval: li v0, -EINVAL sys sys_inotify_init 0 sys sys_inotify_add_watch 3 /* 4285 */ sys sys_inotify_rm_watch 2 + sys sys_migrate_pages 4 + sys sys_openat 4 + sys sys_mkdirat 3 + sys sys_mknodat 4 /* 4290 */ + sys sys_fchownat 5 + sys sys_futimesat 3 + sys sys_newfstatat 4 + sys sys_unlinkat 3 + sys sys_renameat 4 /* 4295 */ + sys sys_linkat 4 + sys sys_symlinkat 3 + sys sys_readlinkat 4 + sys sys_fchmodat 3 + sys sys_faccessat 3 /* 4300 */ + sys sys_pselect6 6 + sys sys_ppoll 5 + sys sys_unshare 1 .endm /* We pre-compute the number of _instruction_ bytes needed to diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 47bfbd416709ca..98bf25df56f39f 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S @@ -443,3 +443,20 @@ sys_call_table: PTR sys_inotify_init PTR sys_inotify_add_watch PTR sys_inotify_rm_watch /* 5245 */ + PTR sys_migrate_pages + PTR sys_openat + PTR sys_mkdirat + PTR sys_mknodat + PTR sys_fchownat /* 5250 */ + PTR sys_futimesat + PTR sys_newfstatat + PTR sys_unlinkat + PTR sys_renameat + PTR sys_linkat /* 5255 */ + PTR sys_symlinkat + PTR sys_readlinkat + PTR sys_fchmodat + PTR sys_faccessat + PTR sys_pselect6 /* 5260 */ + PTR sys_ppoll + PTR sys_unshare diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index b465ced1758f7a..bc4980cefc8bc5 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -369,3 +369,20 @@ EXPORT(sysn32_call_table) PTR sys_inotify_init PTR sys_inotify_add_watch PTR sys_inotify_rm_watch + PTR sys_migrate_pages /* 6250 */ + PTR sys_openat + PTR sys_mkdirat + PTR sys_mknodat + PTR sys_fchownat + PTR sys_futimesat /* 6255 */ + PTR sys_newfstatat + PTR sys_unlinkat + PTR sys_renameat + PTR sys_linkat + PTR sys_symlinkat /* 6260 */ + PTR sys_readlinkat + PTR sys_fchmodat + PTR sys_faccessat + PTR sys_pselect6 + PTR sys_ppoll /* 6265 */ + PTR sys_unshare diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 3d338ca7eeeb1c..5b0414018c9a14 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@ -491,4 +491,21 @@ sys_call_table: PTR sys_inotify_init PTR sys_inotify_add_watch /* 4285 */ PTR sys_inotify_rm_watch + PTR sys_migrate_pages + PTR compat_sys_openat + PTR sys_mkdirat + PTR sys_mknodat /* 4290 */ + PTR sys_fchownat + PTR compat_sys_futimesat + PTR compat_sys_newfstatat + PTR sys_unlinkat + PTR sys_renameat /* 4295 */ + PTR sys_linkat + PTR sys_symlinkat + PTR sys_readlinkat + PTR sys_fchmodat + PTR sys_faccessat /* 4300 */ + PTR sys_pselect6 + PTR sys_ppoll + PTR sys_unshare .size sys_call_table,.-sys_call_table diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 89ea8b60e945cb..e7ff9b1877835c 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -307,17 +307,33 @@ #define __NR_inotify_init (__NR_Linux + 284) #define __NR_inotify_add_watch (__NR_Linux + 285) #define __NR_inotify_rm_watch (__NR_Linux + 286) - +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_newfstatat (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) /* * Offset of the last Linux o32 flavoured syscall */ -#define __NR_Linux_syscalls 286 +#define __NR_Linux_syscalls 303 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #define __NR_O32_Linux 4000 -#define __NR_O32_Linux_syscalls 283 +#define __NR_O32_Linux_syscalls 303 #if _MIPS_SIM == _MIPS_SIM_ABI64 @@ -571,16 +587,33 @@ #define __NR_inotify_init (__NR_Linux + 243) #define __NR_inotify_add_watch (__NR_Linux + 244) #define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_newfstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) /* * Offset of the last Linux 64-bit flavoured syscall */ -#define __NR_Linux_syscalls 245 +#define __NR_Linux_syscalls 262 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ #define __NR_64_Linux 5000 -#define __NR_64_Linux_syscalls 242 +#define __NR_64_Linux_syscalls 262 #if _MIPS_SIM == _MIPS_SIM_NABI32 @@ -838,16 +871,33 @@ #define __NR_inotify_init (__NR_Linux + 247) #define __NR_inotify_add_watch (__NR_Linux + 248) #define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_newfstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) /* * Offset of the last N32 flavoured syscall */ -#define __NR_Linux_syscalls 249 +#define __NR_Linux_syscalls 266 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ #define __NR_N32_Linux 6000 -#define __NR_N32_Linux_syscalls 246 +#define __NR_N32_Linux_syscalls 266 #ifndef __ASSEMBLY__ -- cgit 1.2.3-korg From b887d3f2c63543dce1a0825e41be3a8d3ebef78d Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Thu, 9 Feb 2006 00:57:44 +0900 Subject: [MIPS] Add 'const' to readb and friends Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle --- --- include/asm-mips/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index a9fa1254894aa0..05de7c174e6773 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h @@ -342,7 +342,7 @@ static inline void pfx##write##bwlq(type val, \ BUG(); \ } \ \ -static inline type pfx##read##bwlq(volatile void __iomem *mem) \ +static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ { \ volatile type *__mem; \ type __val; \ -- cgit 1.2.3-korg