add oleg's fix for ethtool
[openwrt.git] / package / linux / kernel-patches / 307-gcc-3.4-fix.patch
1 diff -Nur linux-2.4.29/arch/mips/kernel/signal.c linux-2.4.29-gcc3.4/arch/mips/kernel/signal.c
2 --- linux-2.4.29/arch/mips/kernel/signal.c 2005-01-19 15:09:29.000000000 +0100
3 +++ linux-2.4.29-gcc3.4/arch/mips/kernel/signal.c 2005-03-27 23:09:57.000000000 +0200
4 @@ -6,8 +6,10 @@
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
9 */
10 #include <linux/config.h>
11 +#include <linux/compiler.h>
12 #include <linux/sched.h>
13 #include <linux/mm.h>
14 #include <linux/smp.h>
15 @@ -76,7 +78,9 @@
16 * Atomically swap in the new signal mask, and wait for a signal.
17 */
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)
23 {
24 sigset_t *uset, saveset, newset;
25
26 @@ -102,7 +106,9 @@
27 }
28
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)
34 {
35 sigset_t *unewset, saveset, newset;
36 size_t sigsetsize;
37 diff -Nur linux-2.4.29/arch/mips/kernel/syscall.c linux-2.4.29-gcc3.4/arch/mips/kernel/syscall.c
38 --- linux-2.4.29/arch/mips/kernel/syscall.c 2005-01-19 15:09:29.000000000 +0100
39 +++ linux-2.4.29-gcc3.4/arch/mips/kernel/syscall.c 2005-03-27 23:09:57.000000000 +0200
40 @@ -5,6 +5,7 @@
41 *
42 * Copyright (C) 1995 - 2000 by Ralf Baechle
43 * Copyright (C) 2000 Silicon Graphics, Inc.
44 + * Copyright (C) 2004 Maciej W. Rozycki
45 *
46 * TODO: Implement the compatibility syscalls.
47 * Don't waste that much memory for empty entries in the syscall
48 @@ -158,7 +159,9 @@
49 }
50
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)
56 {
57 int res;
58
59 @@ -168,7 +171,9 @@
60
61
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)
67 {
68 unsigned long clone_flags;
69 unsigned long newsp;
70 diff -Nur linux-2.4.29/arch/mips64/kernel/signal.c linux-2.4.29-gcc3.4/arch/mips64/kernel/signal.c
71 --- linux-2.4.29/arch/mips64/kernel/signal.c 2005-01-19 15:09:32.000000000 +0100
72 +++ linux-2.4.29-gcc3.4/arch/mips64/kernel/signal.c 2005-03-27 23:09:57.000000000 +0200
73 @@ -6,8 +6,10 @@
74 * Copyright (C) 1991, 1992 Linus Torvalds
75 * Copyright (C) 1994 - 2000 Ralf Baechle
76 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
77 + * Copyright (C) 2004 Maciej W. Rozycki
78 */
79 #include <linux/config.h>
80 +#include <linux/compiler.h>
81 #include <linux/sched.h>
82 #include <linux/mm.h>
83 #include <linux/smp.h>
84 @@ -75,7 +77,9 @@
85 * Atomically swap in the new signal mask, and wait for a signal.
86 */
87 save_static_function(sys_rt_sigsuspend);
88 -static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
89 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
90 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
91 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
92 {
93 sigset_t *unewset, saveset, newset;
94 size_t sigsetsize;
95 diff -Nur linux-2.4.29/arch/mips64/kernel/signal32.c linux-2.4.29-gcc3.4/arch/mips64/kernel/signal32.c
96 --- linux-2.4.29/arch/mips64/kernel/signal32.c 2005-01-19 15:09:33.000000000 +0100
97 +++ linux-2.4.29-gcc3.4/arch/mips64/kernel/signal32.c 2005-03-27 23:09:57.000000000 +0200
98 @@ -6,7 +6,9 @@
99 * Copyright (C) 1991, 1992 Linus Torvalds
100 * Copyright (C) 1994 - 2000 Ralf Baechle
101 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
102 + * Copyright (C) 2004 Maciej W. Rozycki
103 */
104 +#include <linux/compiler.h>
105 #include <linux/sched.h>
106 #include <linux/mm.h>
107 #include <linux/smp.h>
108 @@ -192,7 +194,9 @@
109 * Atomically swap in the new signal mask, and wait for a signal.
110 */
111 save_static_function(sys32_sigsuspend);
112 -static_unused int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
113 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
114 + __asm__("_sys32_sigsuspend") __attribute_used__;
115 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
116 {
117 sigset32_t *uset;
118 sigset_t newset, saveset;
119 @@ -219,7 +223,9 @@
120 }
121
122 save_static_function(sys32_rt_sigsuspend);
123 -static_unused int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
124 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
125 + __asm__("_sys32_rt_sigsuspend") __attribute_used__;
126 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
127 {
128 sigset32_t *uset;
129 sigset_t newset, saveset;
130 diff -Nur linux-2.4.29/arch/mips64/kernel/syscall.c linux-2.4.29-gcc3.4/arch/mips64/kernel/syscall.c
131 --- linux-2.4.29/arch/mips64/kernel/syscall.c 2005-01-19 15:09:33.000000000 +0100
132 +++ linux-2.4.29-gcc3.4/arch/mips64/kernel/syscall.c 2005-03-27 23:09:57.000000000 +0200
133 @@ -6,7 +6,9 @@
134 * Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
135 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
136 * Copyright (C) 2001 MIPS Technologies, Inc.
137 + * Copyright (C) 2004 Maciej W. Rozycki
138 */
139 +#include <linux/compiler.h>
140 #include <linux/errno.h>
141 #include <linux/linkage.h>
142 #include <linux/mm.h>
143 @@ -151,7 +153,9 @@
144 }
145
146 save_static_function(sys_fork);
147 -static_unused int _sys_fork(abi64_no_regargs, struct pt_regs regs)
148 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
149 + __asm__("_sys_fork") __attribute_used__;
150 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
151 {
152 int res;
153
154 @@ -160,7 +164,9 @@
155 }
156
157 save_static_function(sys_clone);
158 -static_unused int _sys_clone(abi64_no_regargs, struct pt_regs regs)
159 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
160 + __asm__("_sys_clone") __attribute_used__;
161 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
162 {
163 unsigned long clone_flags;
164 unsigned long newsp;
165 diff -Nur linux-2.4.29/include/asm-mips/ptrace.h linux-2.4.29-gcc3.4/include/asm-mips/ptrace.h
166 --- linux-2.4.29/include/asm-mips/ptrace.h 2004-02-18 14:36:32.000000000 +0100
167 +++ linux-2.4.29-gcc3.4/include/asm-mips/ptrace.h 2005-03-27 23:09:57.000000000 +0200
168 @@ -4,6 +4,7 @@
169 * for more details.
170 *
171 * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
172 + * Copyright (C) 2004 Maciej W. Rozycki
173 *
174 * Machine dependent structs and defines to help the user use
175 * the ptrace system call.
176 @@ -64,12 +65,10 @@
177 "sw\t$22,"__str(PT_R22)"($29)\n\t" \
178 "sw\t$23,"__str(PT_R23)"($29)\n\t" \
179 "sw\t$30,"__str(PT_R30)"($29)\n\t" \
180 + "j\t_" #symbol "\n\t" \
181 ".end\t" #symbol "\n\t" \
182 ".size\t" #symbol",. - " #symbol)
183
184 -/* Used in declaration of save_static functions. */
185 -#define static_unused static __attribute__((unused))
186 -
187 #endif /* !__ASSEMBLY__ */
188
189 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
190 diff -Nur linux-2.4.29/include/asm-mips64/ptrace.h linux-2.4.29-gcc3.4/include/asm-mips64/ptrace.h
191 --- linux-2.4.29/include/asm-mips64/ptrace.h 2004-02-18 14:36:32.000000000 +0100
192 +++ linux-2.4.29-gcc3.4/include/asm-mips64/ptrace.h 2005-03-27 23:09:57.000000000 +0200
193 @@ -5,6 +5,7 @@
194 *
195 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
196 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
197 + * Copyright (C) 2004 Maciej W. Rozycki
198 */
199 #ifndef _ASM_PTRACE_H
200 #define _ASM_PTRACE_H
201 @@ -61,12 +62,10 @@
202 "sd\t$22,"__str(PT_R22)"($29)\n\t" \
203 "sd\t$23,"__str(PT_R23)"($29)\n\t" \
204 "sd\t$30,"__str(PT_R30)"($29)\n\t" \
205 + "j\t_" #symbol "\n\t" \
206 ".end\t" #symbol "\n\t" \
207 ".size\t" #symbol",. - " #symbol)
208
209 -/* Used in declaration of save_static functions. */
210 -#define static_unused static __attribute__((unused))
211 -
212 #define abi64_no_regargs \
213 unsigned long __dummy0, \
214 unsigned long __dummy1, \
This page took 0.047995 seconds and 5 git commands to generate.