2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips/kernel/signal.c
|
|
|
|
+++ b/arch/mips/kernel/signal.c
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -6,8 +6,10 @@
|
|
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
|
|
* Copyright (C) 1994 - 1999 Ralf Baechle
|
|
|
|
* Copyright (C) 1999 Silicon Graphics, Inc.
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*/
|
|
|
|
#include <linux/config.h>
|
|
|
|
+#include <linux/compiler.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#include <linux/smp.h>
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -76,7 +78,9 @@ int copy_siginfo_to_user(siginfo_t *to,
|
2005-04-02 16:40:48 +00:00
|
|
|
* Atomically swap in the new signal mask, and wait for a signal.
|
|
|
|
*/
|
|
|
|
save_static_function(sys_sigsuspend);
|
|
|
|
-static_unused int _sys_sigsuspend(struct pt_regs regs)
|
|
|
|
+static int _sys_sigsuspend(struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_sigsuspend") __attribute_used__;
|
|
|
|
+static int _sys_sigsuspend(struct pt_regs regs)
|
|
|
|
{
|
|
|
|
sigset_t *uset, saveset, newset;
|
|
|
|
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -102,7 +106,9 @@ static_unused int _sys_sigsuspend(struct
|
2005-04-02 16:40:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
save_static_function(sys_rt_sigsuspend);
|
|
|
|
-static_unused int _sys_rt_sigsuspend(struct pt_regs regs)
|
|
|
|
+static int _sys_rt_sigsuspend(struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_rt_sigsuspend") __attribute_used__;
|
|
|
|
+static int _sys_rt_sigsuspend(struct pt_regs regs)
|
|
|
|
{
|
|
|
|
sigset_t *unewset, saveset, newset;
|
|
|
|
size_t sigsetsize;
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips/kernel/syscall.c
|
|
|
|
+++ b/arch/mips/kernel/syscall.c
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -5,6 +5,7 @@
|
|
|
|
*
|
|
|
|
* Copyright (C) 1995 - 2000 by Ralf Baechle
|
|
|
|
* Copyright (C) 2000 Silicon Graphics, Inc.
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*
|
|
|
|
* TODO: Implement the compatibility syscalls.
|
|
|
|
* Don't waste that much memory for empty entries in the syscall
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -158,7 +159,9 @@ sys_mmap2(unsigned long addr, unsigned l
|
2005-04-02 16:40:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
save_static_function(sys_fork);
|
|
|
|
-static_unused int _sys_fork(struct pt_regs regs)
|
|
|
|
+static int _sys_fork(struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_fork") __attribute_used__;
|
|
|
|
+static int _sys_fork(struct pt_regs regs)
|
|
|
|
{
|
|
|
|
int res;
|
|
|
|
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -168,7 +171,9 @@ static_unused int _sys_fork(struct pt_re
|
2005-04-02 16:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
save_static_function(sys_clone);
|
|
|
|
-static_unused int _sys_clone(struct pt_regs regs)
|
|
|
|
+static int _sys_clone(struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_clone") __attribute_used__;
|
|
|
|
+static int _sys_clone(struct pt_regs regs)
|
|
|
|
{
|
|
|
|
unsigned long clone_flags;
|
|
|
|
unsigned long newsp;
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips/ld.script.in
|
|
|
|
+++ b/arch/mips/ld.script.in
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -9,6 +9,7 @@ SECTIONS
|
2005-07-02 11:08:39 +00:00
|
|
|
{
|
|
|
|
_ftext = . ;
|
|
|
|
*(.text)
|
|
|
|
+ *(.fixup)
|
|
|
|
*(.rodata)
|
|
|
|
*(.rodata.*)
|
|
|
|
*(.rodata1)
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips64/kernel/signal.c
|
|
|
|
+++ b/arch/mips64/kernel/signal.c
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -6,8 +6,10 @@
|
|
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
|
|
* Copyright (C) 1994 - 2000 Ralf Baechle
|
|
|
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*/
|
|
|
|
#include <linux/config.h>
|
|
|
|
+#include <linux/compiler.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#include <linux/smp.h>
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -75,7 +77,9 @@ int copy_siginfo_to_user(siginfo_t *to,
|
2005-04-02 16:40:48 +00:00
|
|
|
* Atomically swap in the new signal mask, and wait for a signal.
|
|
|
|
*/
|
|
|
|
save_static_function(sys_rt_sigsuspend);
|
|
|
|
-static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_rt_sigsuspend") __attribute_used__;
|
|
|
|
+static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
{
|
|
|
|
sigset_t *unewset, saveset, newset;
|
|
|
|
size_t sigsetsize;
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips64/kernel/signal32.c
|
|
|
|
+++ b/arch/mips64/kernel/signal32.c
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -6,7 +6,9 @@
|
|
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
|
|
* Copyright (C) 1994 - 2000 Ralf Baechle
|
|
|
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*/
|
|
|
|
+#include <linux/compiler.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#include <linux/smp.h>
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -192,7 +194,9 @@ static inline int get_sigset(sigset_t *k
|
2005-04-02 16:40:48 +00:00
|
|
|
* Atomically swap in the new signal mask, and wait for a signal.
|
|
|
|
*/
|
|
|
|
save_static_function(sys32_sigsuspend);
|
|
|
|
-static_unused int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+ __asm__("_sys32_sigsuspend") __attribute_used__;
|
|
|
|
+static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
{
|
|
|
|
sigset32_t *uset;
|
|
|
|
sigset_t newset, saveset;
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -219,7 +223,9 @@ static_unused int _sys32_sigsuspend(abi6
|
2005-04-02 16:40:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
save_static_function(sys32_rt_sigsuspend);
|
|
|
|
-static_unused int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+ __asm__("_sys32_rt_sigsuspend") __attribute_used__;
|
|
|
|
+static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
{
|
|
|
|
sigset32_t *uset;
|
|
|
|
sigset_t newset, saveset;
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/arch/mips64/kernel/syscall.c
|
|
|
|
+++ b/arch/mips64/kernel/syscall.c
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -6,7 +6,9 @@
|
|
|
|
* Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
|
|
|
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
|
|
|
* Copyright (C) 2001 MIPS Technologies, Inc.
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*/
|
|
|
|
+#include <linux/compiler.h>
|
|
|
|
#include <linux/errno.h>
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <linux/mm.h>
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -151,7 +153,9 @@ out:
|
2005-04-02 16:40:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
save_static_function(sys_fork);
|
|
|
|
-static_unused int _sys_fork(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_fork") __attribute_used__;
|
|
|
|
+static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
{
|
|
|
|
int res;
|
|
|
|
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -160,7 +164,9 @@ static_unused int _sys_fork(abi64_no_reg
|
2005-04-02 16:40:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
save_static_function(sys_clone);
|
|
|
|
-static_unused int _sys_clone(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
+ __asm__("_sys_clone") __attribute_used__;
|
|
|
|
+static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
|
|
|
|
{
|
|
|
|
unsigned long clone_flags;
|
|
|
|
unsigned long newsp;
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/include/asm-mips/ptrace.h
|
|
|
|
+++ b/include/asm-mips/ptrace.h
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -4,6 +4,7 @@
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*
|
|
|
|
* Machine dependent structs and defines to help the user use
|
|
|
|
* the ptrace system call.
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -64,12 +65,10 @@ __asm__ (
|
2005-04-02 16:40:48 +00:00
|
|
|
"sw\t$22,"__str(PT_R22)"($29)\n\t" \
|
|
|
|
"sw\t$23,"__str(PT_R23)"($29)\n\t" \
|
|
|
|
"sw\t$30,"__str(PT_R30)"($29)\n\t" \
|
|
|
|
+ "j\t_" #symbol "\n\t" \
|
|
|
|
".end\t" #symbol "\n\t" \
|
|
|
|
".size\t" #symbol",. - " #symbol)
|
|
|
|
|
|
|
|
-/* Used in declaration of save_static functions. */
|
|
|
|
-#define static_unused static __attribute__((unused))
|
|
|
|
-
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
|
|
|
|
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
|
2009-05-15 10:36:04 +00:00
|
|
|
--- a/include/asm-mips64/ptrace.h
|
|
|
|
+++ b/include/asm-mips64/ptrace.h
|
2005-04-02 16:40:48 +00:00
|
|
|
@@ -5,6 +5,7 @@
|
|
|
|
*
|
|
|
|
* Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
|
|
|
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
|
|
|
+ * Copyright (C) 2004 Maciej W. Rozycki
|
|
|
|
*/
|
|
|
|
#ifndef _ASM_PTRACE_H
|
|
|
|
#define _ASM_PTRACE_H
|
2008-05-19 13:44:11 +00:00
|
|
|
@@ -61,12 +62,10 @@ __asm__ (
|
2005-04-02 16:40:48 +00:00
|
|
|
"sd\t$22,"__str(PT_R22)"($29)\n\t" \
|
|
|
|
"sd\t$23,"__str(PT_R23)"($29)\n\t" \
|
|
|
|
"sd\t$30,"__str(PT_R30)"($29)\n\t" \
|
|
|
|
+ "j\t_" #symbol "\n\t" \
|
|
|
|
".end\t" #symbol "\n\t" \
|
|
|
|
".size\t" #symbol",. - " #symbol)
|
|
|
|
|
|
|
|
-/* Used in declaration of save_static functions. */
|
|
|
|
-#define static_unused static __attribute__((unused))
|
|
|
|
-
|
|
|
|
#define abi64_no_regargs \
|
|
|
|
unsigned long __dummy0, \
|
|
|
|
unsigned long __dummy1, \
|