diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2015-11-13 19:15:59 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2015-11-13 19:15:59 +1000 |
commit | d35b4a3ecca8f9c9479cc75e0b7486940af57727 (patch) | |
tree | e19196d209dcb140b15ad49d8c556f839b0348ad | |
parent | 2b511e06a0b4e410760e36345187e2a5d3c9bc0b (diff) | |
download | meta-xilinx-d35b4a3ecca8f9c9479cc75e0b7486940af57727.tar.gz |
u-boot-xlnx: Backport MicroBlaze patches to fix GCC 5.2 compatiblity
* Backport patches from upstream u-boot which fix compilation issues
when using GCC 5.2 or other non gnu90 standards based compilers
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
3 files changed, 477 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-xlnx-2015.04.inc b/recipes-bsp/u-boot/u-boot-xlnx-2015.04.inc index 9206c2ca..28c4faa1 100644 --- a/recipes-bsp/u-boot/u-boot-xlnx-2015.04.inc +++ b/recipes-bsp/u-boot/u-boot-xlnx-2015.04.inc | |||
@@ -7,6 +7,8 @@ SRC_URI += " \ | |||
7 | file://zynq-Add-Zynq-PicoZed-board-support.patch \ | 7 | file://zynq-Add-Zynq-PicoZed-board-support.patch \ |
8 | file://microblaze-Fix-EMAC-Lite-initialization.patch \ | 8 | file://microblaze-Fix-EMAC-Lite-initialization.patch \ |
9 | file://microblaze-generic_defconfig-Disable-configs.patch \ | 9 | file://microblaze-generic_defconfig-Disable-configs.patch \ |
10 | file://0001-microblaze-Fix-style-issues-in-header-files.patch \ | ||
11 | file://0002-microblaze-Fix-C99-gnu99-compatiblity-for-inline-fun.patch \ | ||
10 | " | 12 | " |
11 | 13 | ||
12 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=6;md5=157ab8408beab40cd8ce1dc69f702a6c" | 14 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=6;md5=157ab8408beab40cd8ce1dc69f702a6c" |
diff --git a/recipes-bsp/u-boot/u-boot-xlnx/0001-microblaze-Fix-style-issues-in-header-files.patch b/recipes-bsp/u-boot/u-boot-xlnx/0001-microblaze-Fix-style-issues-in-header-files.patch new file mode 100644 index 00000000..f81aee4c --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-xlnx/0001-microblaze-Fix-style-issues-in-header-files.patch | |||
@@ -0,0 +1,236 @@ | |||
1 | From 4a4d9396b889686914101607417bc094e43060e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
3 | Date: Fri, 6 Nov 2015 19:25:05 +1000 | ||
4 | Subject: [PATCH 1/2] microblaze: Fix style issues in header files | ||
5 | |||
6 | Fix various style issues in MicroBlaze header files. Specifically fixing | ||
7 | style voilations including '__inline__', 'foo * bar' and 'void foo ('. | ||
8 | |||
9 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
10 | Cc: Michal Simek <monstr@monstr.eu> | ||
11 | Cc: Tom Rini <trini@konsulko.com> | ||
12 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
13 | Upstream-Status: Backport | ||
14 | --- | ||
15 | arch/microblaze/include/asm/bitops.h | 66 ++++++++++++++++++------------------ | ||
16 | arch/microblaze/include/asm/system.h | 2 +- | ||
17 | 2 files changed, 34 insertions(+), 34 deletions(-) | ||
18 | |||
19 | diff --git a/arch/microblaze/include/asm/bitops.h b/arch/microblaze/include/asm/bitops.h | ||
20 | index d24f2cf..178c94f 100644 | ||
21 | --- a/arch/microblaze/include/asm/bitops.h | ||
22 | +++ b/arch/microblaze/include/asm/bitops.h | ||
23 | @@ -21,31 +21,31 @@ | ||
24 | * The __ functions are not atomic | ||
25 | */ | ||
26 | |||
27 | -extern void set_bit(int nr, volatile void * addr); | ||
28 | -extern void __set_bit(int nr, volatile void * addr); | ||
29 | +extern void set_bit(int nr, volatile void *addr); | ||
30 | +extern void __set_bit(int nr, volatile void *addr); | ||
31 | |||
32 | -extern void clear_bit(int nr, volatile void * addr); | ||
33 | +extern void clear_bit(int nr, volatile void *addr); | ||
34 | #define __clear_bit(nr, addr) clear_bit(nr, addr) | ||
35 | #define PLATFORM__CLEAR_BIT | ||
36 | |||
37 | -extern void change_bit(int nr, volatile void * addr); | ||
38 | -extern void __change_bit(int nr, volatile void * addr); | ||
39 | -extern int test_and_set_bit(int nr, volatile void * addr); | ||
40 | -extern int __test_and_set_bit(int nr, volatile void * addr); | ||
41 | -extern int test_and_clear_bit(int nr, volatile void * addr); | ||
42 | -extern int __test_and_clear_bit(int nr, volatile void * addr); | ||
43 | -extern int test_and_change_bit(int nr, volatile void * addr); | ||
44 | -extern int __test_and_change_bit(int nr, volatile void * addr); | ||
45 | -extern int __constant_test_bit(int nr, const volatile void * addr); | ||
46 | -extern int __test_bit(int nr, volatile void * addr); | ||
47 | -extern int find_first_zero_bit(void * addr, unsigned size); | ||
48 | -extern int find_next_zero_bit (void * addr, int size, int offset); | ||
49 | +extern void change_bit(int nr, volatile void *addr); | ||
50 | +extern void __change_bit(int nr, volatile void *addr); | ||
51 | +extern int test_and_set_bit(int nr, volatile void *addr); | ||
52 | +extern int __test_and_set_bit(int nr, volatile void *addr); | ||
53 | +extern int test_and_clear_bit(int nr, volatile void *addr); | ||
54 | +extern int __test_and_clear_bit(int nr, volatile void *addr); | ||
55 | +extern int test_and_change_bit(int nr, volatile void *addr); | ||
56 | +extern int __test_and_change_bit(int nr, volatile void *addr); | ||
57 | +extern int __constant_test_bit(int nr, const volatile void *addr); | ||
58 | +extern int __test_bit(int nr, volatile void *addr); | ||
59 | +extern int find_first_zero_bit(void *addr, unsigned size); | ||
60 | +extern int find_next_zero_bit(void *addr, int size, int offset); | ||
61 | |||
62 | /* | ||
63 | * ffz = Find First Zero in word. Undefined if no zero exists, | ||
64 | * so code should check against ~0UL first.. | ||
65 | */ | ||
66 | -extern __inline__ unsigned long ffz(unsigned long word) | ||
67 | +extern inline unsigned long ffz(unsigned long word) | ||
68 | { | ||
69 | unsigned long result = 0; | ||
70 | |||
71 | @@ -57,7 +57,7 @@ extern __inline__ unsigned long ffz(unsigned long word) | ||
72 | } | ||
73 | |||
74 | |||
75 | -extern __inline__ void set_bit(int nr, volatile void * addr) | ||
76 | +extern inline void set_bit(int nr, volatile void *addr) | ||
77 | { | ||
78 | int * a = (int *) addr; | ||
79 | int mask; | ||
80 | @@ -70,7 +70,7 @@ extern __inline__ void set_bit(int nr, volatile void * addr) | ||
81 | restore_flags(flags); | ||
82 | } | ||
83 | |||
84 | -extern __inline__ void __set_bit(int nr, volatile void * addr) | ||
85 | +extern inline void __set_bit(int nr, volatile void *addr) | ||
86 | { | ||
87 | int * a = (int *) addr; | ||
88 | int mask; | ||
89 | @@ -87,7 +87,7 @@ extern __inline__ void __set_bit(int nr, volatile void * addr) | ||
90 | #define smp_mb__before_clear_bit() barrier() | ||
91 | #define smp_mb__after_clear_bit() barrier() | ||
92 | |||
93 | -extern __inline__ void clear_bit(int nr, volatile void * addr) | ||
94 | +extern inline void clear_bit(int nr, volatile void *addr) | ||
95 | { | ||
96 | int * a = (int *) addr; | ||
97 | int mask; | ||
98 | @@ -100,7 +100,7 @@ extern __inline__ void clear_bit(int nr, volatile void * addr) | ||
99 | restore_flags(flags); | ||
100 | } | ||
101 | |||
102 | -extern __inline__ void change_bit(int nr, volatile void * addr) | ||
103 | +extern inline void change_bit(int nr, volatile void *addr) | ||
104 | { | ||
105 | int mask; | ||
106 | unsigned long flags; | ||
107 | @@ -113,7 +113,7 @@ extern __inline__ void change_bit(int nr, volatile void * addr) | ||
108 | restore_flags(flags); | ||
109 | } | ||
110 | |||
111 | -extern __inline__ void __change_bit(int nr, volatile void * addr) | ||
112 | +extern inline void __change_bit(int nr, volatile void *addr) | ||
113 | { | ||
114 | int mask; | ||
115 | unsigned long *ADDR = (unsigned long *) addr; | ||
116 | @@ -123,7 +123,7 @@ extern __inline__ void __change_bit(int nr, volatile void * addr) | ||
117 | *ADDR ^= mask; | ||
118 | } | ||
119 | |||
120 | -extern __inline__ int test_and_set_bit(int nr, volatile void * addr) | ||
121 | +extern inline int test_and_set_bit(int nr, volatile void *addr) | ||
122 | { | ||
123 | int mask, retval; | ||
124 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
125 | @@ -139,7 +139,7 @@ extern __inline__ int test_and_set_bit(int nr, volatile void * addr) | ||
126 | return retval; | ||
127 | } | ||
128 | |||
129 | -extern __inline__ int __test_and_set_bit(int nr, volatile void * addr) | ||
130 | +extern inline int __test_and_set_bit(int nr, volatile void *addr) | ||
131 | { | ||
132 | int mask, retval; | ||
133 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
134 | @@ -151,7 +151,7 @@ extern __inline__ int __test_and_set_bit(int nr, volatile void * addr) | ||
135 | return retval; | ||
136 | } | ||
137 | |||
138 | -extern __inline__ int test_and_clear_bit(int nr, volatile void * addr) | ||
139 | +extern inline int test_and_clear_bit(int nr, volatile void *addr) | ||
140 | { | ||
141 | int mask, retval; | ||
142 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
143 | @@ -167,7 +167,7 @@ extern __inline__ int test_and_clear_bit(int nr, volatile void * addr) | ||
144 | return retval; | ||
145 | } | ||
146 | |||
147 | -extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr) | ||
148 | +extern inline int __test_and_clear_bit(int nr, volatile void *addr) | ||
149 | { | ||
150 | int mask, retval; | ||
151 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
152 | @@ -179,7 +179,7 @@ extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr) | ||
153 | return retval; | ||
154 | } | ||
155 | |||
156 | -extern __inline__ int test_and_change_bit(int nr, volatile void * addr) | ||
157 | +extern inline int test_and_change_bit(int nr, volatile void *addr) | ||
158 | { | ||
159 | int mask, retval; | ||
160 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
161 | @@ -195,7 +195,7 @@ extern __inline__ int test_and_change_bit(int nr, volatile void * addr) | ||
162 | return retval; | ||
163 | } | ||
164 | |||
165 | -extern __inline__ int __test_and_change_bit(int nr, volatile void * addr) | ||
166 | +extern inline int __test_and_change_bit(int nr, volatile void *addr) | ||
167 | { | ||
168 | int mask, retval; | ||
169 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
170 | @@ -210,12 +210,12 @@ extern __inline__ int __test_and_change_bit(int nr, volatile void * addr) | ||
171 | /* | ||
172 | * This routine doesn't need to be atomic. | ||
173 | */ | ||
174 | -extern __inline__ int __constant_test_bit(int nr, const volatile void * addr) | ||
175 | +extern inline int __constant_test_bit(int nr, const volatile void *addr) | ||
176 | { | ||
177 | return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; | ||
178 | } | ||
179 | |||
180 | -extern __inline__ int __test_bit(int nr, volatile void * addr) | ||
181 | +extern inline int __test_bit(int nr, volatile void *addr) | ||
182 | { | ||
183 | int * a = (int *) addr; | ||
184 | int mask; | ||
185 | @@ -233,7 +233,7 @@ extern __inline__ int __test_bit(int nr, volatile void * addr) | ||
186 | #define find_first_zero_bit(addr, size) \ | ||
187 | find_next_zero_bit((addr), (size), 0) | ||
188 | |||
189 | -extern __inline__ int find_next_zero_bit (void * addr, int size, int offset) | ||
190 | +extern inline int find_next_zero_bit(void *addr, int size, int offset) | ||
191 | { | ||
192 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); | ||
193 | unsigned long result = offset & ~31UL; | ||
194 | @@ -279,7 +279,7 @@ found_middle: | ||
195 | #define hweight8(x) generic_hweight8(x) | ||
196 | |||
197 | |||
198 | -extern __inline__ int ext2_set_bit(int nr, volatile void * addr) | ||
199 | +extern inline int ext2_set_bit(int nr, volatile void *addr) | ||
200 | { | ||
201 | int mask, retval; | ||
202 | unsigned long flags; | ||
203 | @@ -294,7 +294,7 @@ extern __inline__ int ext2_set_bit(int nr, volatile void * addr) | ||
204 | return retval; | ||
205 | } | ||
206 | |||
207 | -extern __inline__ int ext2_clear_bit(int nr, volatile void * addr) | ||
208 | +extern inline int ext2_clear_bit(int nr, volatile void *addr) | ||
209 | { | ||
210 | int mask, retval; | ||
211 | unsigned long flags; | ||
212 | @@ -309,7 +309,7 @@ extern __inline__ int ext2_clear_bit(int nr, volatile void * addr) | ||
213 | return retval; | ||
214 | } | ||
215 | |||
216 | -extern __inline__ int ext2_test_bit(int nr, const volatile void * addr) | ||
217 | +extern inline int ext2_test_bit(int nr, const volatile void *addr) | ||
218 | { | ||
219 | int mask; | ||
220 | const volatile unsigned char *ADDR = (const unsigned char *) addr; | ||
221 | diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h | ||
222 | index 0297a11..3090835 100644 | ||
223 | --- a/arch/microblaze/include/asm/system.h | ||
224 | +++ b/arch/microblaze/include/asm/system.h | ||
225 | @@ -131,7 +131,7 @@ extern void *switch_thread (struct thread_struct *last, | ||
226 | ((__typeof__ (*(ptr)))__xchg ((unsigned long)(with), (ptr), sizeof (*(ptr)))) | ||
227 | #define tas(ptr) (xchg ((ptr), 1)) | ||
228 | |||
229 | -extern inline unsigned long __xchg (unsigned long with, | ||
230 | +extern inline unsigned long __xchg(unsigned long with, | ||
231 | __volatile__ void *ptr, int size) | ||
232 | { | ||
233 | unsigned long tmp, flags; | ||
234 | -- | ||
235 | 2.6.2 | ||
236 | |||
diff --git a/recipes-bsp/u-boot/u-boot-xlnx/0002-microblaze-Fix-C99-gnu99-compatiblity-for-inline-fun.patch b/recipes-bsp/u-boot/u-boot-xlnx/0002-microblaze-Fix-C99-gnu99-compatiblity-for-inline-fun.patch new file mode 100644 index 00000000..d334867b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-xlnx/0002-microblaze-Fix-C99-gnu99-compatiblity-for-inline-fun.patch | |||
@@ -0,0 +1,239 @@ | |||
1 | From ccd0c906131053b11790a6be076e2cf4f71fed10 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
3 | Date: Fri, 6 Nov 2015 19:25:06 +1000 | ||
4 | Subject: [PATCH 2/2] microblaze: Fix C99/gnu99 compatiblity for inline | ||
5 | functions | ||
6 | |||
7 | 'extern inline' is not portable across various C standards. To ensure | ||
8 | compatiblity with various standards/compilers change the functions to | ||
9 | static inline. This is a portable construct and serves as a comparable | ||
10 | definition to 'extern inline' from the gnu90 standard. | ||
11 | |||
12 | Additionally remove the function prototypes as they are not required due | ||
13 | to the functions being declared static and functions are correctly | ||
14 | ordered based on dependence. | ||
15 | |||
16 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
17 | Cc: Michal Simek <monstr@monstr.eu> | ||
18 | Cc: Tom Rini <trini@konsulko.com> | ||
19 | Acked-by: Mans Rullgard <mans@mansr.com> | ||
20 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
21 | Upstream-Status: Backport | ||
22 | --- | ||
23 | arch/microblaze/include/asm/bitops.h | 63 ++++++++++++------------------------ | ||
24 | arch/microblaze/include/asm/system.h | 2 +- | ||
25 | 2 files changed, 22 insertions(+), 43 deletions(-) | ||
26 | |||
27 | diff --git a/arch/microblaze/include/asm/bitops.h b/arch/microblaze/include/asm/bitops.h | ||
28 | index 178c94f..2cab2ac 100644 | ||
29 | --- a/arch/microblaze/include/asm/bitops.h | ||
30 | +++ b/arch/microblaze/include/asm/bitops.h | ||
31 | @@ -14,38 +14,14 @@ | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | /* | ||
35 | - * Function prototypes to keep gcc -Wall happy | ||
36 | - */ | ||
37 | - | ||
38 | -/* | ||
39 | * The __ functions are not atomic | ||
40 | */ | ||
41 | |||
42 | -extern void set_bit(int nr, volatile void *addr); | ||
43 | -extern void __set_bit(int nr, volatile void *addr); | ||
44 | - | ||
45 | -extern void clear_bit(int nr, volatile void *addr); | ||
46 | -#define __clear_bit(nr, addr) clear_bit(nr, addr) | ||
47 | -#define PLATFORM__CLEAR_BIT | ||
48 | - | ||
49 | -extern void change_bit(int nr, volatile void *addr); | ||
50 | -extern void __change_bit(int nr, volatile void *addr); | ||
51 | -extern int test_and_set_bit(int nr, volatile void *addr); | ||
52 | -extern int __test_and_set_bit(int nr, volatile void *addr); | ||
53 | -extern int test_and_clear_bit(int nr, volatile void *addr); | ||
54 | -extern int __test_and_clear_bit(int nr, volatile void *addr); | ||
55 | -extern int test_and_change_bit(int nr, volatile void *addr); | ||
56 | -extern int __test_and_change_bit(int nr, volatile void *addr); | ||
57 | -extern int __constant_test_bit(int nr, const volatile void *addr); | ||
58 | -extern int __test_bit(int nr, volatile void *addr); | ||
59 | -extern int find_first_zero_bit(void *addr, unsigned size); | ||
60 | -extern int find_next_zero_bit(void *addr, int size, int offset); | ||
61 | - | ||
62 | /* | ||
63 | * ffz = Find First Zero in word. Undefined if no zero exists, | ||
64 | * so code should check against ~0UL first.. | ||
65 | */ | ||
66 | -extern inline unsigned long ffz(unsigned long word) | ||
67 | +static inline unsigned long ffz(unsigned long word) | ||
68 | { | ||
69 | unsigned long result = 0; | ||
70 | |||
71 | @@ -57,7 +33,7 @@ extern inline unsigned long ffz(unsigned long word) | ||
72 | } | ||
73 | |||
74 | |||
75 | -extern inline void set_bit(int nr, volatile void *addr) | ||
76 | +static inline void set_bit(int nr, volatile void *addr) | ||
77 | { | ||
78 | int * a = (int *) addr; | ||
79 | int mask; | ||
80 | @@ -70,7 +46,7 @@ extern inline void set_bit(int nr, volatile void *addr) | ||
81 | restore_flags(flags); | ||
82 | } | ||
83 | |||
84 | -extern inline void __set_bit(int nr, volatile void *addr) | ||
85 | +static inline void __set_bit(int nr, volatile void *addr) | ||
86 | { | ||
87 | int * a = (int *) addr; | ||
88 | int mask; | ||
89 | @@ -87,7 +63,7 @@ extern inline void __set_bit(int nr, volatile void *addr) | ||
90 | #define smp_mb__before_clear_bit() barrier() | ||
91 | #define smp_mb__after_clear_bit() barrier() | ||
92 | |||
93 | -extern inline void clear_bit(int nr, volatile void *addr) | ||
94 | +static inline void clear_bit(int nr, volatile void *addr) | ||
95 | { | ||
96 | int * a = (int *) addr; | ||
97 | int mask; | ||
98 | @@ -100,7 +76,10 @@ extern inline void clear_bit(int nr, volatile void *addr) | ||
99 | restore_flags(flags); | ||
100 | } | ||
101 | |||
102 | -extern inline void change_bit(int nr, volatile void *addr) | ||
103 | +#define __clear_bit(nr, addr) clear_bit(nr, addr) | ||
104 | +#define PLATFORM__CLEAR_BIT | ||
105 | + | ||
106 | +static inline void change_bit(int nr, volatile void *addr) | ||
107 | { | ||
108 | int mask; | ||
109 | unsigned long flags; | ||
110 | @@ -113,7 +92,7 @@ extern inline void change_bit(int nr, volatile void *addr) | ||
111 | restore_flags(flags); | ||
112 | } | ||
113 | |||
114 | -extern inline void __change_bit(int nr, volatile void *addr) | ||
115 | +static inline void __change_bit(int nr, volatile void *addr) | ||
116 | { | ||
117 | int mask; | ||
118 | unsigned long *ADDR = (unsigned long *) addr; | ||
119 | @@ -123,7 +102,7 @@ extern inline void __change_bit(int nr, volatile void *addr) | ||
120 | *ADDR ^= mask; | ||
121 | } | ||
122 | |||
123 | -extern inline int test_and_set_bit(int nr, volatile void *addr) | ||
124 | +static inline int test_and_set_bit(int nr, volatile void *addr) | ||
125 | { | ||
126 | int mask, retval; | ||
127 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
128 | @@ -139,7 +118,7 @@ extern inline int test_and_set_bit(int nr, volatile void *addr) | ||
129 | return retval; | ||
130 | } | ||
131 | |||
132 | -extern inline int __test_and_set_bit(int nr, volatile void *addr) | ||
133 | +static inline int __test_and_set_bit(int nr, volatile void *addr) | ||
134 | { | ||
135 | int mask, retval; | ||
136 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
137 | @@ -151,7 +130,7 @@ extern inline int __test_and_set_bit(int nr, volatile void *addr) | ||
138 | return retval; | ||
139 | } | ||
140 | |||
141 | -extern inline int test_and_clear_bit(int nr, volatile void *addr) | ||
142 | +static inline int test_and_clear_bit(int nr, volatile void *addr) | ||
143 | { | ||
144 | int mask, retval; | ||
145 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
146 | @@ -167,7 +146,7 @@ extern inline int test_and_clear_bit(int nr, volatile void *addr) | ||
147 | return retval; | ||
148 | } | ||
149 | |||
150 | -extern inline int __test_and_clear_bit(int nr, volatile void *addr) | ||
151 | +static inline int __test_and_clear_bit(int nr, volatile void *addr) | ||
152 | { | ||
153 | int mask, retval; | ||
154 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
155 | @@ -179,7 +158,7 @@ extern inline int __test_and_clear_bit(int nr, volatile void *addr) | ||
156 | return retval; | ||
157 | } | ||
158 | |||
159 | -extern inline int test_and_change_bit(int nr, volatile void *addr) | ||
160 | +static inline int test_and_change_bit(int nr, volatile void *addr) | ||
161 | { | ||
162 | int mask, retval; | ||
163 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
164 | @@ -195,7 +174,7 @@ extern inline int test_and_change_bit(int nr, volatile void *addr) | ||
165 | return retval; | ||
166 | } | ||
167 | |||
168 | -extern inline int __test_and_change_bit(int nr, volatile void *addr) | ||
169 | +static inline int __test_and_change_bit(int nr, volatile void *addr) | ||
170 | { | ||
171 | int mask, retval; | ||
172 | volatile unsigned int *a = (volatile unsigned int *) addr; | ||
173 | @@ -210,12 +189,12 @@ extern inline int __test_and_change_bit(int nr, volatile void *addr) | ||
174 | /* | ||
175 | * This routine doesn't need to be atomic. | ||
176 | */ | ||
177 | -extern inline int __constant_test_bit(int nr, const volatile void *addr) | ||
178 | +static inline int __constant_test_bit(int nr, const volatile void *addr) | ||
179 | { | ||
180 | return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; | ||
181 | } | ||
182 | |||
183 | -extern inline int __test_bit(int nr, volatile void *addr) | ||
184 | +static inline int __test_bit(int nr, volatile void *addr) | ||
185 | { | ||
186 | int * a = (int *) addr; | ||
187 | int mask; | ||
188 | @@ -233,7 +212,7 @@ extern inline int __test_bit(int nr, volatile void *addr) | ||
189 | #define find_first_zero_bit(addr, size) \ | ||
190 | find_next_zero_bit((addr), (size), 0) | ||
191 | |||
192 | -extern inline int find_next_zero_bit(void *addr, int size, int offset) | ||
193 | +static inline int find_next_zero_bit(void *addr, int size, int offset) | ||
194 | { | ||
195 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); | ||
196 | unsigned long result = offset & ~31UL; | ||
197 | @@ -279,7 +258,7 @@ found_middle: | ||
198 | #define hweight8(x) generic_hweight8(x) | ||
199 | |||
200 | |||
201 | -extern inline int ext2_set_bit(int nr, volatile void *addr) | ||
202 | +static inline int ext2_set_bit(int nr, volatile void *addr) | ||
203 | { | ||
204 | int mask, retval; | ||
205 | unsigned long flags; | ||
206 | @@ -294,7 +273,7 @@ extern inline int ext2_set_bit(int nr, volatile void *addr) | ||
207 | return retval; | ||
208 | } | ||
209 | |||
210 | -extern inline int ext2_clear_bit(int nr, volatile void *addr) | ||
211 | +static inline int ext2_clear_bit(int nr, volatile void *addr) | ||
212 | { | ||
213 | int mask, retval; | ||
214 | unsigned long flags; | ||
215 | @@ -309,7 +288,7 @@ extern inline int ext2_clear_bit(int nr, volatile void *addr) | ||
216 | return retval; | ||
217 | } | ||
218 | |||
219 | -extern inline int ext2_test_bit(int nr, const volatile void *addr) | ||
220 | +static inline int ext2_test_bit(int nr, const volatile void *addr) | ||
221 | { | ||
222 | int mask; | ||
223 | const volatile unsigned char *ADDR = (const unsigned char *) addr; | ||
224 | diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h | ||
225 | index 3090835..3107748 100644 | ||
226 | --- a/arch/microblaze/include/asm/system.h | ||
227 | +++ b/arch/microblaze/include/asm/system.h | ||
228 | @@ -131,7 +131,7 @@ extern void *switch_thread (struct thread_struct *last, | ||
229 | ((__typeof__ (*(ptr)))__xchg ((unsigned long)(with), (ptr), sizeof (*(ptr)))) | ||
230 | #define tas(ptr) (xchg ((ptr), 1)) | ||
231 | |||
232 | -extern inline unsigned long __xchg(unsigned long with, | ||
233 | +static inline unsigned long __xchg(unsigned long with, | ||
234 | __volatile__ void *ptr, int size) | ||
235 | { | ||
236 | unsigned long tmp, flags; | ||
237 | -- | ||
238 | 2.6.2 | ||
239 | |||