1 Index: linux-2.4.35.4/arch/mips/kernel/signal.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/arch/mips/kernel/signal.c 2007-12-15 05:19:39.146651877 +0100
4 +++ linux-2.4.35.4/arch/mips/kernel/signal.c 2007-12-15 05:19:59.787828152 +0100
6 * Copyright (C) 1991, 1992 Linus Torvalds
7 * Copyright (C) 1994 - 1999 Ralf Baechle
8 * Copyright (C) 1999 Silicon Graphics, Inc.
9 + * Copyright (C) 2004 Maciej W. Rozycki
11 #include <linux/config.h>
12 +#include <linux/compiler.h>
13 #include <linux/sched.h>
15 #include <linux/smp.h>
17 * Atomically swap in the new signal mask, and wait for a signal.
19 save_static_function(sys_sigsuspend);
20 -static_unused int _sys_sigsuspend(struct pt_regs regs)
21 +static int _sys_sigsuspend(struct pt_regs regs)
22 + __asm__("_sys_sigsuspend") __attribute_used__;
23 +static int _sys_sigsuspend(struct pt_regs regs)
25 sigset_t *uset, saveset, newset;
30 save_static_function(sys_rt_sigsuspend);
31 -static_unused int _sys_rt_sigsuspend(struct pt_regs regs)
32 +static int _sys_rt_sigsuspend(struct pt_regs regs)
33 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
34 +static int _sys_rt_sigsuspend(struct pt_regs regs)
36 sigset_t *unewset, saveset, newset;
38 Index: linux-2.4.35.4/arch/mips/kernel/syscall.c
39 ===================================================================
40 --- linux-2.4.35.4.orig/arch/mips/kernel/syscall.c 2007-12-15 05:19:39.154652335 +0100
41 +++ linux-2.4.35.4/arch/mips/kernel/syscall.c 2007-12-15 05:19:59.795828608 +0100
44 * Copyright (C) 1995 - 2000 by Ralf Baechle
45 * Copyright (C) 2000 Silicon Graphics, Inc.
46 + * Copyright (C) 2004 Maciej W. Rozycki
48 * TODO: Implement the compatibility syscalls.
49 * Don't waste that much memory for empty entries in the syscall
53 save_static_function(sys_fork);
54 -static_unused int _sys_fork(struct pt_regs regs)
55 +static int _sys_fork(struct pt_regs regs)
56 + __asm__("_sys_fork") __attribute_used__;
57 +static int _sys_fork(struct pt_regs regs)
64 save_static_function(sys_clone);
65 -static_unused int _sys_clone(struct pt_regs regs)
66 +static int _sys_clone(struct pt_regs regs)
67 + __asm__("_sys_clone") __attribute_used__;
68 +static int _sys_clone(struct pt_regs regs)
70 unsigned long clone_flags;
72 Index: linux-2.4.35.4/arch/mips/ld.script.in
73 ===================================================================
74 --- linux-2.4.35.4.orig/arch/mips/ld.script.in 2007-12-15 05:19:39.162652791 +0100
75 +++ linux-2.4.35.4/arch/mips/ld.script.in 2007-12-15 05:19:59.799828834 +0100
84 Index: linux-2.4.35.4/arch/mips64/kernel/signal.c
85 ===================================================================
86 --- linux-2.4.35.4.orig/arch/mips64/kernel/signal.c 2007-12-15 05:19:39.170653246 +0100
87 +++ linux-2.4.35.4/arch/mips64/kernel/signal.c 2007-12-15 05:19:59.803829063 +0100
89 * Copyright (C) 1991, 1992 Linus Torvalds
90 * Copyright (C) 1994 - 2000 Ralf Baechle
91 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
92 + * Copyright (C) 2004 Maciej W. Rozycki
94 #include <linux/config.h>
95 +#include <linux/compiler.h>
96 #include <linux/sched.h>
98 #include <linux/smp.h>
100 * Atomically swap in the new signal mask, and wait for a signal.
102 save_static_function(sys_rt_sigsuspend);
103 -static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
104 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
105 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
106 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
108 sigset_t *unewset, saveset, newset;
110 Index: linux-2.4.35.4/arch/mips64/kernel/signal32.c
111 ===================================================================
112 --- linux-2.4.35.4.orig/arch/mips64/kernel/signal32.c 2007-12-15 05:19:39.174653475 +0100
113 +++ linux-2.4.35.4/arch/mips64/kernel/signal32.c 2007-12-15 05:19:59.807829292 +0100
115 * Copyright (C) 1991, 1992 Linus Torvalds
116 * Copyright (C) 1994 - 2000 Ralf Baechle
117 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
118 + * Copyright (C) 2004 Maciej W. Rozycki
120 +#include <linux/compiler.h>
121 #include <linux/sched.h>
122 #include <linux/mm.h>
123 #include <linux/smp.h>
125 * Atomically swap in the new signal mask, and wait for a signal.
127 save_static_function(sys32_sigsuspend);
128 -static_unused int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
129 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
130 + __asm__("_sys32_sigsuspend") __attribute_used__;
131 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
134 sigset_t newset, saveset;
138 save_static_function(sys32_rt_sigsuspend);
139 -static_unused int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
140 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
141 + __asm__("_sys32_rt_sigsuspend") __attribute_used__;
142 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
145 sigset_t newset, saveset;
146 Index: linux-2.4.35.4/arch/mips64/kernel/syscall.c
147 ===================================================================
148 --- linux-2.4.35.4.orig/arch/mips64/kernel/syscall.c 2007-12-15 05:19:39.186654157 +0100
149 +++ linux-2.4.35.4/arch/mips64/kernel/syscall.c 2007-12-15 05:19:59.811829522 +0100
151 * Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
152 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
153 * Copyright (C) 2001 MIPS Technologies, Inc.
154 + * Copyright (C) 2004 Maciej W. Rozycki
156 +#include <linux/compiler.h>
157 #include <linux/errno.h>
158 #include <linux/linkage.h>
159 #include <linux/mm.h>
163 save_static_function(sys_fork);
164 -static_unused int _sys_fork(abi64_no_regargs, struct pt_regs regs)
165 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
166 + __asm__("_sys_fork") __attribute_used__;
167 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
174 save_static_function(sys_clone);
175 -static_unused int _sys_clone(abi64_no_regargs, struct pt_regs regs)
176 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
177 + __asm__("_sys_clone") __attribute_used__;
178 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
180 unsigned long clone_flags;
182 Index: linux-2.4.35.4/include/asm-mips/ptrace.h
183 ===================================================================
184 --- linux-2.4.35.4.orig/include/asm-mips/ptrace.h 2007-12-15 05:19:39.194654615 +0100
185 +++ linux-2.4.35.4/include/asm-mips/ptrace.h 2007-12-15 05:19:59.815829748 +0100
189 * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
190 + * Copyright (C) 2004 Maciej W. Rozycki
192 * Machine dependent structs and defines to help the user use
193 * the ptrace system call.
195 "sw\t$22,"__str(PT_R22)"($29)\n\t" \
196 "sw\t$23,"__str(PT_R23)"($29)\n\t" \
197 "sw\t$30,"__str(PT_R30)"($29)\n\t" \
198 + "j\t_" #symbol "\n\t" \
199 ".end\t" #symbol "\n\t" \
200 ".size\t" #symbol",. - " #symbol)
202 -/* Used in declaration of save_static functions. */
203 -#define static_unused static __attribute__((unused))
205 #endif /* !__ASSEMBLY__ */
207 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
208 Index: linux-2.4.35.4/include/asm-mips64/ptrace.h
209 ===================================================================
210 --- linux-2.4.35.4.orig/include/asm-mips64/ptrace.h 2007-12-15 05:19:39.202655071 +0100
211 +++ linux-2.4.35.4/include/asm-mips64/ptrace.h 2007-12-15 05:19:59.815829748 +0100
214 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
215 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
216 + * Copyright (C) 2004 Maciej W. Rozycki
218 #ifndef _ASM_PTRACE_H
219 #define _ASM_PTRACE_H
221 "sd\t$22,"__str(PT_R22)"($29)\n\t" \
222 "sd\t$23,"__str(PT_R23)"($29)\n\t" \
223 "sd\t$30,"__str(PT_R30)"($29)\n\t" \
224 + "j\t_" #symbol "\n\t" \
225 ".end\t" #symbol "\n\t" \
226 ".size\t" #symbol",. - " #symbol)
228 -/* Used in declaration of save_static functions. */
229 -#define static_unused static __attribute__((unused))
231 #define abi64_no_regargs \
232 unsigned long __dummy0, \
233 unsigned long __dummy1, \