[kernel] add simple prom emulator for MIPS
[openwrt.git] / target / linux / generic-2.4 / patches / 206-gcc_3.4_fixes.patch
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
4 +++ linux-2.4.35.4/arch/mips/kernel/signal.c
5 @@ -6,8 +6,10 @@
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
10 */
11 #include <linux/config.h>
12 +#include <linux/compiler.h>
13 #include <linux/sched.h>
14 #include <linux/mm.h>
15 #include <linux/smp.h>
16 @@ -76,7 +78,9 @@ int copy_siginfo_to_user(siginfo_t *to,
17 * Atomically swap in the new signal mask, and wait for a signal.
18 */
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)
24 {
25 sigset_t *uset, saveset, newset;
26
27 @@ -102,7 +106,9 @@ static_unused int _sys_sigsuspend(struct
28 }
29
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)
35 {
36 sigset_t *unewset, saveset, newset;
37 size_t sigsetsize;
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
41 +++ linux-2.4.35.4/arch/mips/kernel/syscall.c
42 @@ -5,6 +5,7 @@
43 *
44 * Copyright (C) 1995 - 2000 by Ralf Baechle
45 * Copyright (C) 2000 Silicon Graphics, Inc.
46 + * Copyright (C) 2004 Maciej W. Rozycki
47 *
48 * TODO: Implement the compatibility syscalls.
49 * Don't waste that much memory for empty entries in the syscall
50 @@ -158,7 +159,9 @@ sys_mmap2(unsigned long addr, unsigned l
51 }
52
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)
58 {
59 int res;
60
61 @@ -168,7 +171,9 @@ static_unused int _sys_fork(struct pt_re
62
63
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)
69 {
70 unsigned long clone_flags;
71 unsigned long newsp;
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
75 +++ linux-2.4.35.4/arch/mips/ld.script.in
76 @@ -9,6 +9,7 @@ SECTIONS
77 {
78 _ftext = . ;
79 *(.text)
80 + *(.fixup)
81 *(.rodata)
82 *(.rodata.*)
83 *(.rodata1)
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
87 +++ linux-2.4.35.4/arch/mips64/kernel/signal.c
88 @@ -6,8 +6,10 @@
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
93 */
94 #include <linux/config.h>
95 +#include <linux/compiler.h>
96 #include <linux/sched.h>
97 #include <linux/mm.h>
98 #include <linux/smp.h>
99 @@ -75,7 +77,9 @@ int copy_siginfo_to_user(siginfo_t *to,
100 * Atomically swap in the new signal mask, and wait for a signal.
101 */
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)
107 {
108 sigset_t *unewset, saveset, newset;
109 size_t sigsetsize;
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
113 +++ linux-2.4.35.4/arch/mips64/kernel/signal32.c
114 @@ -6,7 +6,9 @@
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
119 */
120 +#include <linux/compiler.h>
121 #include <linux/sched.h>
122 #include <linux/mm.h>
123 #include <linux/smp.h>
124 @@ -192,7 +194,9 @@ static inline int get_sigset(sigset_t *k
125 * Atomically swap in the new signal mask, and wait for a signal.
126 */
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)
132 {
133 sigset32_t *uset;
134 sigset_t newset, saveset;
135 @@ -219,7 +223,9 @@ static_unused int _sys32_sigsuspend(abi6
136 }
137
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)
143 {
144 sigset32_t *uset;
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
149 +++ linux-2.4.35.4/arch/mips64/kernel/syscall.c
150 @@ -6,7 +6,9 @@
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
155 */
156 +#include <linux/compiler.h>
157 #include <linux/errno.h>
158 #include <linux/linkage.h>
159 #include <linux/mm.h>
160 @@ -151,7 +153,9 @@ out:
161 }
162
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)
168 {
169 int res;
170
171 @@ -160,7 +164,9 @@ static_unused int _sys_fork(abi64_no_reg
172 }
173
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)
179 {
180 unsigned long clone_flags;
181 unsigned long newsp;
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
185 +++ linux-2.4.35.4/include/asm-mips/ptrace.h
186 @@ -4,6 +4,7 @@
187 * for more details.
188 *
189 * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
190 + * Copyright (C) 2004 Maciej W. Rozycki
191 *
192 * Machine dependent structs and defines to help the user use
193 * the ptrace system call.
194 @@ -64,12 +65,10 @@ __asm__ (
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)
201
202 -/* Used in declaration of save_static functions. */
203 -#define static_unused static __attribute__((unused))
204 -
205 #endif /* !__ASSEMBLY__ */
206
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
211 +++ linux-2.4.35.4/include/asm-mips64/ptrace.h
212 @@ -5,6 +5,7 @@
213 *
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
217 */
218 #ifndef _ASM_PTRACE_H
219 #define _ASM_PTRACE_H
220 @@ -61,12 +62,10 @@ __asm__ (
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)
227
228 -/* Used in declaration of save_static functions. */
229 -#define static_unused static __attribute__((unused))
230 -
231 #define abi64_no_regargs \
232 unsigned long __dummy0, \
233 unsigned long __dummy1, \
This page took 0.050859 seconds and 5 git commands to generate.