1 diff -Nur linux-2.4.30/arch/mips/kernel/signal.c linux-2.4.30.openwrt/arch/mips/kernel/signal.c
2 --- linux-2.4.30/arch/mips/kernel/signal.c 2005-07-02 13:00:13.000000000 +0200
3 +++ linux-2.4.30.openwrt/arch/mips/kernel/signal.c 2005-07-02 13:00:49.000000000 +0200
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 * Copyright (C) 1994 - 1999 Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 + * Copyright (C) 2004 Maciej W. Rozycki
10 #include <linux/config.h>
11 +#include <linux/compiler.h>
12 #include <linux/sched.h>
14 #include <linux/smp.h>
16 * Atomically swap in the new signal mask, and wait for a signal.
18 save_static_function(sys_sigsuspend);
19 -static_unused int _sys_sigsuspend(struct pt_regs regs)
20 +static int _sys_sigsuspend(struct pt_regs regs)
21 + __asm__("_sys_sigsuspend") __attribute_used__;
22 +static int _sys_sigsuspend(struct pt_regs regs)
24 sigset_t *uset, saveset, newset;
29 save_static_function(sys_rt_sigsuspend);
30 -static_unused int _sys_rt_sigsuspend(struct pt_regs regs)
31 +static int _sys_rt_sigsuspend(struct pt_regs regs)
32 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
33 +static int _sys_rt_sigsuspend(struct pt_regs regs)
35 sigset_t *unewset, saveset, newset;
37 diff -Nur linux-2.4.30/arch/mips/kernel/syscall.c linux-2.4.30.openwrt/arch/mips/kernel/syscall.c
38 --- linux-2.4.30/arch/mips/kernel/syscall.c 2005-07-02 13:00:13.000000000 +0200
39 +++ linux-2.4.30.openwrt/arch/mips/kernel/syscall.c 2005-07-02 13:00:49.000000000 +0200
42 * Copyright (C) 1995 - 2000 by Ralf Baechle
43 * Copyright (C) 2000 Silicon Graphics, Inc.
44 + * Copyright (C) 2004 Maciej W. Rozycki
46 * TODO: Implement the compatibility syscalls.
47 * Don't waste that much memory for empty entries in the syscall
51 save_static_function(sys_fork);
52 -static_unused int _sys_fork(struct pt_regs regs)
53 +static int _sys_fork(struct pt_regs regs)
54 + __asm__("_sys_fork") __attribute_used__;
55 +static int _sys_fork(struct pt_regs regs)
62 save_static_function(sys_clone);
63 -static_unused int _sys_clone(struct pt_regs regs)
64 +static int _sys_clone(struct pt_regs regs)
65 + __asm__("_sys_clone") __attribute_used__;
66 +static int _sys_clone(struct pt_regs regs)
68 unsigned long clone_flags;
70 diff -Nur linux-2.4.30/arch/mips/ld.script.in linux-2.4.30.openwrt/arch/mips/ld.script.in
71 --- linux-2.4.30/arch/mips/ld.script.in 2005-07-02 13:00:22.000000000 +0200
72 +++ linux-2.4.30.openwrt/arch/mips/ld.script.in 2005-07-02 13:00:42.000000000 +0200
81 diff -Nur linux-2.4.30/arch/mips64/kernel/signal.c linux-2.4.30.openwrt/arch/mips64/kernel/signal.c
82 --- linux-2.4.30/arch/mips64/kernel/signal.c 2005-07-02 13:00:13.000000000 +0200
83 +++ linux-2.4.30.openwrt/arch/mips64/kernel/signal.c 2005-07-02 13:00:49.000000000 +0200
85 * Copyright (C) 1991, 1992 Linus Torvalds
86 * Copyright (C) 1994 - 2000 Ralf Baechle
87 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
88 + * Copyright (C) 2004 Maciej W. Rozycki
90 #include <linux/config.h>
91 +#include <linux/compiler.h>
92 #include <linux/sched.h>
94 #include <linux/smp.h>
96 * Atomically swap in the new signal mask, and wait for a signal.
98 save_static_function(sys_rt_sigsuspend);
99 -static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
100 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
101 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
102 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
104 sigset_t *unewset, saveset, newset;
106 diff -Nur linux-2.4.30/arch/mips64/kernel/signal32.c linux-2.4.30.openwrt/arch/mips64/kernel/signal32.c
107 --- linux-2.4.30/arch/mips64/kernel/signal32.c 2005-07-02 13:00:13.000000000 +0200
108 +++ linux-2.4.30.openwrt/arch/mips64/kernel/signal32.c 2005-07-02 13:00:49.000000000 +0200
110 * Copyright (C) 1991, 1992 Linus Torvalds
111 * Copyright (C) 1994 - 2000 Ralf Baechle
112 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
113 + * Copyright (C) 2004 Maciej W. Rozycki
115 +#include <linux/compiler.h>
116 #include <linux/sched.h>
117 #include <linux/mm.h>
118 #include <linux/smp.h>
120 * Atomically swap in the new signal mask, and wait for a signal.
122 save_static_function(sys32_sigsuspend);
123 -static_unused int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
124 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
125 + __asm__("_sys32_sigsuspend") __attribute_used__;
126 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
129 sigset_t newset, saveset;
133 save_static_function(sys32_rt_sigsuspend);
134 -static_unused int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
135 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
136 + __asm__("_sys32_rt_sigsuspend") __attribute_used__;
137 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
140 sigset_t newset, saveset;
141 diff -Nur linux-2.4.30/arch/mips64/kernel/syscall.c linux-2.4.30.openwrt/arch/mips64/kernel/syscall.c
142 --- linux-2.4.30/arch/mips64/kernel/syscall.c 2005-07-02 13:00:13.000000000 +0200
143 +++ linux-2.4.30.openwrt/arch/mips64/kernel/syscall.c 2005-07-02 13:00:49.000000000 +0200
145 * Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
146 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
147 * Copyright (C) 2001 MIPS Technologies, Inc.
148 + * Copyright (C) 2004 Maciej W. Rozycki
150 +#include <linux/compiler.h>
151 #include <linux/errno.h>
152 #include <linux/linkage.h>
153 #include <linux/mm.h>
157 save_static_function(sys_fork);
158 -static_unused int _sys_fork(abi64_no_regargs, struct pt_regs regs)
159 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
160 + __asm__("_sys_fork") __attribute_used__;
161 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
168 save_static_function(sys_clone);
169 -static_unused int _sys_clone(abi64_no_regargs, struct pt_regs regs)
170 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
171 + __asm__("_sys_clone") __attribute_used__;
172 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
174 unsigned long clone_flags;
176 diff -Nur linux-2.4.30/include/asm-mips/ptrace.h linux-2.4.30.openwrt/include/asm-mips/ptrace.h
177 --- linux-2.4.30/include/asm-mips/ptrace.h 2005-07-02 13:00:13.000000000 +0200
178 +++ linux-2.4.30.openwrt/include/asm-mips/ptrace.h 2005-07-02 13:00:49.000000000 +0200
182 * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
183 + * Copyright (C) 2004 Maciej W. Rozycki
185 * Machine dependent structs and defines to help the user use
186 * the ptrace system call.
188 "sw\t$22,"__str(PT_R22)"($29)\n\t" \
189 "sw\t$23,"__str(PT_R23)"($29)\n\t" \
190 "sw\t$30,"__str(PT_R30)"($29)\n\t" \
191 + "j\t_" #symbol "\n\t" \
192 ".end\t" #symbol "\n\t" \
193 ".size\t" #symbol",. - " #symbol)
195 -/* Used in declaration of save_static functions. */
196 -#define static_unused static __attribute__((unused))
198 #endif /* !__ASSEMBLY__ */
200 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
201 diff -Nur linux-2.4.30/include/asm-mips64/ptrace.h linux-2.4.30.openwrt/include/asm-mips64/ptrace.h
202 --- linux-2.4.30/include/asm-mips64/ptrace.h 2005-07-02 13:00:13.000000000 +0200
203 +++ linux-2.4.30.openwrt/include/asm-mips64/ptrace.h 2005-07-02 13:00:49.000000000 +0200
206 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
207 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
208 + * Copyright (C) 2004 Maciej W. Rozycki
210 #ifndef _ASM_PTRACE_H
211 #define _ASM_PTRACE_H
213 "sd\t$22,"__str(PT_R22)"($29)\n\t" \
214 "sd\t$23,"__str(PT_R23)"($29)\n\t" \
215 "sd\t$30,"__str(PT_R30)"($29)\n\t" \
216 + "j\t_" #symbol "\n\t" \
217 ".end\t" #symbol "\n\t" \
218 ".size\t" #symbol",. - " #symbol)
220 -/* Used in declaration of save_static functions. */
221 -#define static_unused static __attribute__((unused))
223 #define abi64_no_regargs \
224 unsigned long __dummy0, \
225 unsigned long __dummy1, \