diff options
Diffstat (limited to 'include')
43 files changed, 635 insertions, 547 deletions
diff --git a/include/asm-ppc64/abs_addr.h b/include/asm-powerpc/abs_addr.h index dc3fc3fefef2..18415108fc56 100644 --- a/include/asm-ppc64/abs_addr.h +++ b/include/asm-powerpc/abs_addr.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ABS_ADDR_H | 1 | #ifndef _ASM_POWERPC_ABS_ADDR_H |
2 | #define _ABS_ADDR_H | 2 | #define _ASM_POWERPC_ABS_ADDR_H |
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
@@ -70,4 +70,4 @@ static inline unsigned long phys_to_abs(unsigned long pa) | |||
70 | #define iseries_hv_addr(virtaddr) \ | 70 | #define iseries_hv_addr(virtaddr) \ |
71 | (0x8000000000000000 | virt_to_abs(virtaddr)) | 71 | (0x8000000000000000 | virt_to_abs(virtaddr)) |
72 | 72 | ||
73 | #endif /* _ABS_ADDR_H */ | 73 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ |
diff --git a/include/asm-powerpc/asm-compat.h b/include/asm-powerpc/asm-compat.h new file mode 100644 index 000000000000..8b133efc9f79 --- /dev/null +++ b/include/asm-powerpc/asm-compat.h | |||
@@ -0,0 +1,55 @@ | |||
1 | #ifndef _ASM_POWERPC_ASM_COMPAT_H | ||
2 | #define _ASM_POWERPC_ASM_COMPAT_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | #include <asm/types.h> | ||
6 | |||
7 | #ifdef __ASSEMBLY__ | ||
8 | # define stringify_in_c(...) __VA_ARGS__ | ||
9 | # define ASM_CONST(x) x | ||
10 | #else | ||
11 | /* This version of stringify will deal with commas... */ | ||
12 | # define __stringify_in_c(...) #__VA_ARGS__ | ||
13 | # define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " " | ||
14 | # define __ASM_CONST(x) x##UL | ||
15 | # define ASM_CONST(x) __ASM_CONST(x) | ||
16 | #endif | ||
17 | |||
18 | #ifdef __powerpc64__ | ||
19 | |||
20 | /* operations for longs and pointers */ | ||
21 | #define PPC_LL stringify_in_c(ld) | ||
22 | #define PPC_STL stringify_in_c(std) | ||
23 | #define PPC_LCMPI stringify_in_c(cmpdi) | ||
24 | #define PPC_LONG stringify_in_c(.llong) | ||
25 | #define PPC_TLNEI stringify_in_c(tdnei) | ||
26 | #define PPC_LLARX stringify_in_c(ldarx) | ||
27 | #define PPC_STLCX stringify_in_c(stdcx.) | ||
28 | #define PPC_CNTLZL stringify_in_c(cntlzd) | ||
29 | |||
30 | #else /* 32-bit */ | ||
31 | |||
32 | /* operations for longs and pointers */ | ||
33 | #define PPC_LL stringify_in_c(lwz) | ||
34 | #define PPC_STL stringify_in_c(stw) | ||
35 | #define PPC_LCMPI stringify_in_c(cmpwi) | ||
36 | #define PPC_LONG stringify_in_c(.long) | ||
37 | #define PPC_TLNEI stringify_in_c(twnei) | ||
38 | #define PPC_LLARX stringify_in_c(lwarx) | ||
39 | #define PPC_STLCX stringify_in_c(stwcx.) | ||
40 | #define PPC_CNTLZL stringify_in_c(cntlzw) | ||
41 | |||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_IBM405_ERR77 | ||
45 | /* Erratum #77 on the 405 means we need a sync or dcbt before every | ||
46 | * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this. | ||
47 | */ | ||
48 | #define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;) | ||
49 | #define PPC405_ERR77_SYNC stringify_in_c(sync;) | ||
50 | #else | ||
51 | #define PPC405_ERR77(ra,rb) | ||
52 | #define PPC405_ERR77_SYNC | ||
53 | #endif | ||
54 | |||
55 | #endif /* _ASM_POWERPC_ASM_COMPAT_H */ | ||
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index ed4b345ed75d..9c0b372a46e1 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h | |||
@@ -9,21 +9,13 @@ typedef struct { volatile int counter; } atomic_t; | |||
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | #include <asm/synch.h> | 11 | #include <asm/synch.h> |
12 | #include <asm/asm-compat.h> | ||
12 | 13 | ||
13 | #define ATOMIC_INIT(i) { (i) } | 14 | #define ATOMIC_INIT(i) { (i) } |
14 | 15 | ||
15 | #define atomic_read(v) ((v)->counter) | 16 | #define atomic_read(v) ((v)->counter) |
16 | #define atomic_set(v,i) (((v)->counter) = (i)) | 17 | #define atomic_set(v,i) (((v)->counter) = (i)) |
17 | 18 | ||
18 | /* Erratum #77 on the 405 means we need a sync or dcbt before every stwcx. | ||
19 | * The old ATOMIC_SYNC_FIX covered some but not all of this. | ||
20 | */ | ||
21 | #ifdef CONFIG_IBM405_ERR77 | ||
22 | #define PPC405_ERR77(ra,rb) "dcbt " #ra "," #rb ";" | ||
23 | #else | ||
24 | #define PPC405_ERR77(ra,rb) | ||
25 | #endif | ||
26 | |||
27 | static __inline__ void atomic_add(int a, atomic_t *v) | 19 | static __inline__ void atomic_add(int a, atomic_t *v) |
28 | { | 20 | { |
29 | int t; | 21 | int t; |
@@ -205,5 +197,183 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
205 | #define smp_mb__before_atomic_inc() smp_mb() | 197 | #define smp_mb__before_atomic_inc() smp_mb() |
206 | #define smp_mb__after_atomic_inc() smp_mb() | 198 | #define smp_mb__after_atomic_inc() smp_mb() |
207 | 199 | ||
200 | #ifdef __powerpc64__ | ||
201 | |||
202 | typedef struct { volatile long counter; } atomic64_t; | ||
203 | |||
204 | #define ATOMIC64_INIT(i) { (i) } | ||
205 | |||
206 | #define atomic64_read(v) ((v)->counter) | ||
207 | #define atomic64_set(v,i) (((v)->counter) = (i)) | ||
208 | |||
209 | static __inline__ void atomic64_add(long a, atomic64_t *v) | ||
210 | { | ||
211 | long t; | ||
212 | |||
213 | __asm__ __volatile__( | ||
214 | "1: ldarx %0,0,%3 # atomic64_add\n\ | ||
215 | add %0,%2,%0\n\ | ||
216 | stdcx. %0,0,%3 \n\ | ||
217 | bne- 1b" | ||
218 | : "=&r" (t), "=m" (v->counter) | ||
219 | : "r" (a), "r" (&v->counter), "m" (v->counter) | ||
220 | : "cc"); | ||
221 | } | ||
222 | |||
223 | static __inline__ long atomic64_add_return(long a, atomic64_t *v) | ||
224 | { | ||
225 | long t; | ||
226 | |||
227 | __asm__ __volatile__( | ||
228 | EIEIO_ON_SMP | ||
229 | "1: ldarx %0,0,%2 # atomic64_add_return\n\ | ||
230 | add %0,%1,%0\n\ | ||
231 | stdcx. %0,0,%2 \n\ | ||
232 | bne- 1b" | ||
233 | ISYNC_ON_SMP | ||
234 | : "=&r" (t) | ||
235 | : "r" (a), "r" (&v->counter) | ||
236 | : "cc", "memory"); | ||
237 | |||
238 | return t; | ||
239 | } | ||
240 | |||
241 | #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) | ||
242 | |||
243 | static __inline__ void atomic64_sub(long a, atomic64_t *v) | ||
244 | { | ||
245 | long t; | ||
246 | |||
247 | __asm__ __volatile__( | ||
248 | "1: ldarx %0,0,%3 # atomic64_sub\n\ | ||
249 | subf %0,%2,%0\n\ | ||
250 | stdcx. %0,0,%3 \n\ | ||
251 | bne- 1b" | ||
252 | : "=&r" (t), "=m" (v->counter) | ||
253 | : "r" (a), "r" (&v->counter), "m" (v->counter) | ||
254 | : "cc"); | ||
255 | } | ||
256 | |||
257 | static __inline__ long atomic64_sub_return(long a, atomic64_t *v) | ||
258 | { | ||
259 | long t; | ||
260 | |||
261 | __asm__ __volatile__( | ||
262 | EIEIO_ON_SMP | ||
263 | "1: ldarx %0,0,%2 # atomic64_sub_return\n\ | ||
264 | subf %0,%1,%0\n\ | ||
265 | stdcx. %0,0,%2 \n\ | ||
266 | bne- 1b" | ||
267 | ISYNC_ON_SMP | ||
268 | : "=&r" (t) | ||
269 | : "r" (a), "r" (&v->counter) | ||
270 | : "cc", "memory"); | ||
271 | |||
272 | return t; | ||
273 | } | ||
274 | |||
275 | static __inline__ void atomic64_inc(atomic64_t *v) | ||
276 | { | ||
277 | long t; | ||
278 | |||
279 | __asm__ __volatile__( | ||
280 | "1: ldarx %0,0,%2 # atomic64_inc\n\ | ||
281 | addic %0,%0,1\n\ | ||
282 | stdcx. %0,0,%2 \n\ | ||
283 | bne- 1b" | ||
284 | : "=&r" (t), "=m" (v->counter) | ||
285 | : "r" (&v->counter), "m" (v->counter) | ||
286 | : "cc"); | ||
287 | } | ||
288 | |||
289 | static __inline__ long atomic64_inc_return(atomic64_t *v) | ||
290 | { | ||
291 | long t; | ||
292 | |||
293 | __asm__ __volatile__( | ||
294 | EIEIO_ON_SMP | ||
295 | "1: ldarx %0,0,%1 # atomic64_inc_return\n\ | ||
296 | addic %0,%0,1\n\ | ||
297 | stdcx. %0,0,%1 \n\ | ||
298 | bne- 1b" | ||
299 | ISYNC_ON_SMP | ||
300 | : "=&r" (t) | ||
301 | : "r" (&v->counter) | ||
302 | : "cc", "memory"); | ||
303 | |||
304 | return t; | ||
305 | } | ||
306 | |||
307 | /* | ||
308 | * atomic64_inc_and_test - increment and test | ||
309 | * @v: pointer of type atomic64_t | ||
310 | * | ||
311 | * Atomically increments @v by 1 | ||
312 | * and returns true if the result is zero, or false for all | ||
313 | * other cases. | ||
314 | */ | ||
315 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) | ||
316 | |||
317 | static __inline__ void atomic64_dec(atomic64_t *v) | ||
318 | { | ||
319 | long t; | ||
320 | |||
321 | __asm__ __volatile__( | ||
322 | "1: ldarx %0,0,%2 # atomic64_dec\n\ | ||
323 | addic %0,%0,-1\n\ | ||
324 | stdcx. %0,0,%2\n\ | ||
325 | bne- 1b" | ||
326 | : "=&r" (t), "=m" (v->counter) | ||
327 | : "r" (&v->counter), "m" (v->counter) | ||
328 | : "cc"); | ||
329 | } | ||
330 | |||
331 | static __inline__ long atomic64_dec_return(atomic64_t *v) | ||
332 | { | ||
333 | long t; | ||
334 | |||
335 | __asm__ __volatile__( | ||
336 | EIEIO_ON_SMP | ||
337 | "1: ldarx %0,0,%1 # atomic64_dec_return\n\ | ||
338 | addic %0,%0,-1\n\ | ||
339 | stdcx. %0,0,%1\n\ | ||
340 | bne- 1b" | ||
341 | ISYNC_ON_SMP | ||
342 | : "=&r" (t) | ||
343 | : "r" (&v->counter) | ||
344 | : "cc", "memory"); | ||
345 | |||
346 | return t; | ||
347 | } | ||
348 | |||
349 | #define atomic64_sub_and_test(a, v) (atomic64_sub_return((a), (v)) == 0) | ||
350 | #define atomic64_dec_and_test(v) (atomic64_dec_return((v)) == 0) | ||
351 | |||
352 | /* | ||
353 | * Atomically test *v and decrement if it is greater than 0. | ||
354 | * The function returns the old value of *v minus 1. | ||
355 | */ | ||
356 | static __inline__ long atomic64_dec_if_positive(atomic64_t *v) | ||
357 | { | ||
358 | long t; | ||
359 | |||
360 | __asm__ __volatile__( | ||
361 | EIEIO_ON_SMP | ||
362 | "1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ | ||
363 | addic. %0,%0,-1\n\ | ||
364 | blt- 2f\n\ | ||
365 | stdcx. %0,0,%1\n\ | ||
366 | bne- 1b" | ||
367 | ISYNC_ON_SMP | ||
368 | "\n\ | ||
369 | 2:" : "=&r" (t) | ||
370 | : "r" (&v->counter) | ||
371 | : "cc", "memory"); | ||
372 | |||
373 | return t; | ||
374 | } | ||
375 | |||
376 | #endif /* __powerpc64__ */ | ||
377 | |||
208 | #endif /* __KERNEL__ */ | 378 | #endif /* __KERNEL__ */ |
209 | #endif /* _ASM_POWERPC_ATOMIC_H_ */ | 379 | #endif /* _ASM_POWERPC_ATOMIC_H_ */ |
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h index dc25c53704d5..5727229b0444 100644 --- a/include/asm-powerpc/bitops.h +++ b/include/asm-powerpc/bitops.h | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include <linux/compiler.h> | 41 | #include <linux/compiler.h> |
42 | #include <asm/atomic.h> | 42 | #include <asm/atomic.h> |
43 | #include <asm/asm-compat.h> | ||
43 | #include <asm/synch.h> | 44 | #include <asm/synch.h> |
44 | 45 | ||
45 | /* | 46 | /* |
@@ -52,16 +53,6 @@ | |||
52 | #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) | 53 | #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) |
53 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) | 54 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) |
54 | 55 | ||
55 | #ifdef CONFIG_PPC64 | ||
56 | #define LARXL "ldarx" | ||
57 | #define STCXL "stdcx." | ||
58 | #define CNTLZL "cntlzd" | ||
59 | #else | ||
60 | #define LARXL "lwarx" | ||
61 | #define STCXL "stwcx." | ||
62 | #define CNTLZL "cntlzw" | ||
63 | #endif | ||
64 | |||
65 | static __inline__ void set_bit(int nr, volatile unsigned long *addr) | 56 | static __inline__ void set_bit(int nr, volatile unsigned long *addr) |
66 | { | 57 | { |
67 | unsigned long old; | 58 | unsigned long old; |
@@ -69,10 +60,10 @@ static __inline__ void set_bit(int nr, volatile unsigned long *addr) | |||
69 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | 60 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); |
70 | 61 | ||
71 | __asm__ __volatile__( | 62 | __asm__ __volatile__( |
72 | "1:" LARXL " %0,0,%3 # set_bit\n" | 63 | "1:" PPC_LLARX "%0,0,%3 # set_bit\n" |
73 | "or %0,%0,%2\n" | 64 | "or %0,%0,%2\n" |
74 | PPC405_ERR77(0,%3) | 65 | PPC405_ERR77(0,%3) |
75 | STCXL " %0,0,%3\n" | 66 | PPC_STLCX "%0,0,%3\n" |
76 | "bne- 1b" | 67 | "bne- 1b" |
77 | : "=&r"(old), "=m"(*p) | 68 | : "=&r"(old), "=m"(*p) |
78 | : "r"(mask), "r"(p), "m"(*p) | 69 | : "r"(mask), "r"(p), "m"(*p) |
@@ -86,10 +77,10 @@ static __inline__ void clear_bit(int nr, volatile unsigned long *addr) | |||
86 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | 77 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); |
87 | 78 | ||
88 | __asm__ __volatile__( | 79 | __asm__ __volatile__( |
89 | "1:" LARXL " %0,0,%3 # set_bit\n" | 80 | "1:" PPC_LLARX "%0,0,%3 # clear_bit\n" |
90 | "andc %0,%0,%2\n" | 81 | "andc %0,%0,%2\n" |
91 | PPC405_ERR77(0,%3) | 82 | PPC405_ERR77(0,%3) |
92 | STCXL " %0,0,%3\n" | 83 | PPC_STLCX "%0,0,%3\n" |
93 | "bne- 1b" | 84 | "bne- 1b" |
94 | : "=&r"(old), "=m"(*p) | 85 | : "=&r"(old), "=m"(*p) |
95 | : "r"(mask), "r"(p), "m"(*p) | 86 | : "r"(mask), "r"(p), "m"(*p) |
@@ -103,10 +94,10 @@ static __inline__ void change_bit(int nr, volatile unsigned long *addr) | |||
103 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); | 94 | unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); |
104 | 95 | ||
105 | __asm__ __volatile__( | 96 | __asm__ __volatile__( |
106 | "1:" LARXL " %0,0,%3 # set_bit\n" | 97 | "1:" PPC_LLARX "%0,0,%3 # change_bit\n" |
107 | "xor %0,%0,%2\n" | 98 | "xor %0,%0,%2\n" |
108 | PPC405_ERR77(0,%3) | 99 | PPC405_ERR77(0,%3) |
109 | STCXL " %0,0,%3\n" | 100 | PPC_STLCX "%0,0,%3\n" |
110 | "bne- 1b" | 101 | "bne- 1b" |
111 | : "=&r"(old), "=m"(*p) | 102 | : "=&r"(old), "=m"(*p) |
112 | : "r"(mask), "r"(p), "m"(*p) | 103 | : "r"(mask), "r"(p), "m"(*p) |
@@ -122,10 +113,10 @@ static __inline__ int test_and_set_bit(unsigned long nr, | |||
122 | 113 | ||
123 | __asm__ __volatile__( | 114 | __asm__ __volatile__( |
124 | EIEIO_ON_SMP | 115 | EIEIO_ON_SMP |
125 | "1:" LARXL " %0,0,%3 # test_and_set_bit\n" | 116 | "1:" PPC_LLARX "%0,0,%3 # test_and_set_bit\n" |
126 | "or %1,%0,%2 \n" | 117 | "or %1,%0,%2 \n" |
127 | PPC405_ERR77(0,%3) | 118 | PPC405_ERR77(0,%3) |
128 | STCXL " %1,0,%3 \n" | 119 | PPC_STLCX "%1,0,%3 \n" |
129 | "bne- 1b" | 120 | "bne- 1b" |
130 | ISYNC_ON_SMP | 121 | ISYNC_ON_SMP |
131 | : "=&r" (old), "=&r" (t) | 122 | : "=&r" (old), "=&r" (t) |
@@ -144,10 +135,10 @@ static __inline__ int test_and_clear_bit(unsigned long nr, | |||
144 | 135 | ||
145 | __asm__ __volatile__( | 136 | __asm__ __volatile__( |
146 | EIEIO_ON_SMP | 137 | EIEIO_ON_SMP |
147 | "1:" LARXL " %0,0,%3 # test_and_clear_bit\n" | 138 | "1:" PPC_LLARX "%0,0,%3 # test_and_clear_bit\n" |
148 | "andc %1,%0,%2 \n" | 139 | "andc %1,%0,%2 \n" |
149 | PPC405_ERR77(0,%3) | 140 | PPC405_ERR77(0,%3) |
150 | STCXL " %1,0,%3 \n" | 141 | PPC_STLCX "%1,0,%3 \n" |
151 | "bne- 1b" | 142 | "bne- 1b" |
152 | ISYNC_ON_SMP | 143 | ISYNC_ON_SMP |
153 | : "=&r" (old), "=&r" (t) | 144 | : "=&r" (old), "=&r" (t) |
@@ -166,10 +157,10 @@ static __inline__ int test_and_change_bit(unsigned long nr, | |||
166 | 157 | ||
167 | __asm__ __volatile__( | 158 | __asm__ __volatile__( |
168 | EIEIO_ON_SMP | 159 | EIEIO_ON_SMP |
169 | "1:" LARXL " %0,0,%3 # test_and_change_bit\n" | 160 | "1:" PPC_LLARX "%0,0,%3 # test_and_change_bit\n" |
170 | "xor %1,%0,%2 \n" | 161 | "xor %1,%0,%2 \n" |
171 | PPC405_ERR77(0,%3) | 162 | PPC405_ERR77(0,%3) |
172 | STCXL " %1,0,%3 \n" | 163 | PPC_STLCX "%1,0,%3 \n" |
173 | "bne- 1b" | 164 | "bne- 1b" |
174 | ISYNC_ON_SMP | 165 | ISYNC_ON_SMP |
175 | : "=&r" (old), "=&r" (t) | 166 | : "=&r" (old), "=&r" (t) |
@@ -184,9 +175,9 @@ static __inline__ void set_bits(unsigned long mask, unsigned long *addr) | |||
184 | unsigned long old; | 175 | unsigned long old; |
185 | 176 | ||
186 | __asm__ __volatile__( | 177 | __asm__ __volatile__( |
187 | "1:" LARXL " %0,0,%3 # set_bit\n" | 178 | "1:" PPC_LLARX "%0,0,%3 # set_bits\n" |
188 | "or %0,%0,%2\n" | 179 | "or %0,%0,%2\n" |
189 | STCXL " %0,0,%3\n" | 180 | PPC_STLCX "%0,0,%3\n" |
190 | "bne- 1b" | 181 | "bne- 1b" |
191 | : "=&r" (old), "=m" (*addr) | 182 | : "=&r" (old), "=m" (*addr) |
192 | : "r" (mask), "r" (addr), "m" (*addr) | 183 | : "r" (mask), "r" (addr), "m" (*addr) |
@@ -268,7 +259,7 @@ static __inline__ int __ilog2(unsigned long x) | |||
268 | { | 259 | { |
269 | int lz; | 260 | int lz; |
270 | 261 | ||
271 | asm (CNTLZL " %0,%1" : "=r" (lz) : "r" (x)); | 262 | asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r" (x)); |
272 | return BITS_PER_LONG - 1 - lz; | 263 | return BITS_PER_LONG - 1 - lz; |
273 | } | 264 | } |
274 | 265 | ||
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index d625ee55f957..b001ecb3cd99 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_POWERPC_BUG_H | 1 | #ifndef _ASM_POWERPC_BUG_H |
2 | #define _ASM_POWERPC_BUG_H | 2 | #define _ASM_POWERPC_BUG_H |
3 | 3 | ||
4 | #include <asm/asm-compat.h> | ||
4 | /* | 5 | /* |
5 | * Define an illegal instr to trap on the bug. | 6 | * Define an illegal instr to trap on the bug. |
6 | * We don't use 0 because that marks the end of a function | 7 | * We don't use 0 because that marks the end of a function |
@@ -11,14 +12,6 @@ | |||
11 | 12 | ||
12 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
13 | 14 | ||
14 | #ifdef __powerpc64__ | ||
15 | #define BUG_TABLE_ENTRY ".llong" | ||
16 | #define BUG_TRAP_OP "tdnei" | ||
17 | #else | ||
18 | #define BUG_TABLE_ENTRY ".long" | ||
19 | #define BUG_TRAP_OP "twnei" | ||
20 | #endif /* __powerpc64__ */ | ||
21 | |||
22 | struct bug_entry { | 15 | struct bug_entry { |
23 | unsigned long bug_addr; | 16 | unsigned long bug_addr; |
24 | long line; | 17 | long line; |
@@ -40,16 +33,16 @@ struct bug_entry *find_bug(unsigned long bugaddr); | |||
40 | __asm__ __volatile__( \ | 33 | __asm__ __volatile__( \ |
41 | "1: twi 31,0,0\n" \ | 34 | "1: twi 31,0,0\n" \ |
42 | ".section __bug_table,\"a\"\n" \ | 35 | ".section __bug_table,\"a\"\n" \ |
43 | "\t"BUG_TABLE_ENTRY" 1b,%0,%1,%2\n" \ | 36 | "\t"PPC_LONG" 1b,%0,%1,%2\n" \ |
44 | ".previous" \ | 37 | ".previous" \ |
45 | : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \ | 38 | : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \ |
46 | } while (0) | 39 | } while (0) |
47 | 40 | ||
48 | #define BUG_ON(x) do { \ | 41 | #define BUG_ON(x) do { \ |
49 | __asm__ __volatile__( \ | 42 | __asm__ __volatile__( \ |
50 | "1: "BUG_TRAP_OP" %0,0\n" \ | 43 | "1: "PPC_TLNEI" %0,0\n" \ |
51 | ".section __bug_table,\"a\"\n" \ | 44 | ".section __bug_table,\"a\"\n" \ |
52 | "\t"BUG_TABLE_ENTRY" 1b,%1,%2,%3\n" \ | 45 | "\t"PPC_LONG" 1b,%1,%2,%3\n" \ |
53 | ".previous" \ | 46 | ".previous" \ |
54 | : : "r" ((long)(x)), "i" (__LINE__), \ | 47 | : : "r" ((long)(x)), "i" (__LINE__), \ |
55 | "i" (__FILE__), "i" (__FUNCTION__)); \ | 48 | "i" (__FILE__), "i" (__FUNCTION__)); \ |
@@ -57,9 +50,9 @@ struct bug_entry *find_bug(unsigned long bugaddr); | |||
57 | 50 | ||
58 | #define WARN_ON(x) do { \ | 51 | #define WARN_ON(x) do { \ |
59 | __asm__ __volatile__( \ | 52 | __asm__ __volatile__( \ |
60 | "1: "BUG_TRAP_OP" %0,0\n" \ | 53 | "1: "PPC_TLNEI" %0,0\n" \ |
61 | ".section __bug_table,\"a\"\n" \ | 54 | ".section __bug_table,\"a\"\n" \ |
62 | "\t"BUG_TABLE_ENTRY" 1b,%1,%2,%3\n" \ | 55 | "\t"PPC_LONG" 1b,%1,%2,%3\n" \ |
63 | ".previous" \ | 56 | ".previous" \ |
64 | : : "r" ((long)(x)), \ | 57 | : : "r" ((long)(x)), \ |
65 | "i" (__LINE__ + BUG_WARNING_TRAP), \ | 58 | "i" (__LINE__ + BUG_WARNING_TRAP), \ |
diff --git a/include/asm-powerpc/cache.h b/include/asm-powerpc/cache.h new file mode 100644 index 000000000000..26ce502e76e8 --- /dev/null +++ b/include/asm-powerpc/cache.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _ASM_POWERPC_CACHE_H | ||
2 | #define _ASM_POWERPC_CACHE_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/config.h> | ||
7 | |||
8 | /* bytes per L1 cache line */ | ||
9 | #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) | ||
10 | #define L1_CACHE_SHIFT 4 | ||
11 | #define MAX_COPY_PREFETCH 1 | ||
12 | #elif defined(CONFIG_PPC32) | ||
13 | #define L1_CACHE_SHIFT 5 | ||
14 | #define MAX_COPY_PREFETCH 4 | ||
15 | #else /* CONFIG_PPC64 */ | ||
16 | #define L1_CACHE_SHIFT 7 | ||
17 | #endif | ||
18 | |||
19 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
20 | |||
21 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
22 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
23 | |||
24 | #if defined(__powerpc64__) && !defined(__ASSEMBLY__) | ||
25 | struct ppc64_caches { | ||
26 | u32 dsize; /* L1 d-cache size */ | ||
27 | u32 dline_size; /* L1 d-cache line size */ | ||
28 | u32 log_dline_size; | ||
29 | u32 dlines_per_page; | ||
30 | u32 isize; /* L1 i-cache size */ | ||
31 | u32 iline_size; /* L1 i-cache line size */ | ||
32 | u32 log_iline_size; | ||
33 | u32 ilines_per_page; | ||
34 | }; | ||
35 | |||
36 | extern struct ppc64_caches ppc64_caches; | ||
37 | #endif /* __powerpc64__ && ! __ASSEMBLY__ */ | ||
38 | |||
39 | #endif /* __KERNEL__ */ | ||
40 | #endif /* _ASM_POWERPC_CACHE_H */ | ||
diff --git a/include/asm-ppc64/cacheflush.h b/include/asm-powerpc/cacheflush.h index ffbc08be8e52..8a740c88d93d 100644 --- a/include/asm-ppc64/cacheflush.h +++ b/include/asm-powerpc/cacheflush.h | |||
@@ -1,13 +1,20 @@ | |||
1 | #ifndef _PPC64_CACHEFLUSH_H | 1 | /* |
2 | #define _PPC64_CACHEFLUSH_H | 2 | * This program is free software; you can redistribute it and/or |
3 | * modify it under the terms of the GNU General Public License | ||
4 | * as published by the Free Software Foundation; either version | ||
5 | * 2 of the License, or (at your option) any later version. | ||
6 | */ | ||
7 | #ifndef _ASM_POWERPC_CACHEFLUSH_H | ||
8 | #define _ASM_POWERPC_CACHEFLUSH_H | ||
9 | |||
10 | #ifdef __KERNEL__ | ||
3 | 11 | ||
4 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
5 | #include <asm/cputable.h> | 13 | #include <asm/cputable.h> |
6 | 14 | ||
7 | /* | 15 | /* |
8 | * No cache flushing is required when address mappings are | 16 | * No cache flushing is required when address mappings are changed, |
9 | * changed, because the caches on PowerPCs are physically | 17 | * because the caches on PowerPCs are physically addressed. |
10 | * addressed. | ||
11 | */ | 18 | */ |
12 | #define flush_cache_all() do { } while (0) | 19 | #define flush_cache_all() do { } while (0) |
13 | #define flush_cache_mm(mm) do { } while (0) | 20 | #define flush_cache_mm(mm) do { } while (0) |
@@ -22,27 +29,40 @@ extern void flush_dcache_page(struct page *page); | |||
22 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 29 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
23 | 30 | ||
24 | extern void __flush_icache_range(unsigned long, unsigned long); | 31 | extern void __flush_icache_range(unsigned long, unsigned long); |
32 | static inline void flush_icache_range(unsigned long start, unsigned long stop) | ||
33 | { | ||
34 | if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | ||
35 | __flush_icache_range(start, stop); | ||
36 | } | ||
37 | |||
25 | extern void flush_icache_user_range(struct vm_area_struct *vma, | 38 | extern void flush_icache_user_range(struct vm_area_struct *vma, |
26 | struct page *page, unsigned long addr, | 39 | struct page *page, unsigned long addr, |
27 | int len); | 40 | int len); |
41 | extern void __flush_dcache_icache(void *page_va); | ||
42 | extern void flush_dcache_icache_page(struct page *page); | ||
43 | #if defined(CONFIG_PPC32) && !defined(CONFIG_BOOKE) | ||
44 | extern void __flush_dcache_icache_phys(unsigned long physaddr); | ||
45 | #endif /* CONFIG_PPC32 && !CONFIG_BOOKE */ | ||
28 | 46 | ||
29 | extern void flush_dcache_range(unsigned long start, unsigned long stop); | 47 | extern void flush_dcache_range(unsigned long start, unsigned long stop); |
30 | extern void flush_dcache_phys_range(unsigned long start, unsigned long stop); | 48 | #ifdef CONFIG_PPC32 |
49 | extern void clean_dcache_range(unsigned long start, unsigned long stop); | ||
50 | extern void invalidate_dcache_range(unsigned long start, unsigned long stop); | ||
51 | #endif /* CONFIG_PPC32 */ | ||
52 | #ifdef CONFIG_PPC64 | ||
31 | extern void flush_inval_dcache_range(unsigned long start, unsigned long stop); | 53 | extern void flush_inval_dcache_range(unsigned long start, unsigned long stop); |
54 | extern void flush_dcache_phys_range(unsigned long start, unsigned long stop); | ||
55 | #endif | ||
32 | 56 | ||
33 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 57 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
34 | do { memcpy(dst, src, len); \ | 58 | do { \ |
35 | flush_icache_user_range(vma, page, vaddr, len); \ | 59 | memcpy(dst, src, len); \ |
36 | } while (0) | 60 | flush_icache_user_range(vma, page, vaddr, len); \ |
61 | } while (0) | ||
37 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 62 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
38 | memcpy(dst, src, len) | 63 | memcpy(dst, src, len) |
39 | 64 | ||
40 | extern void __flush_dcache_icache(void *page_va); | ||
41 | 65 | ||
42 | static inline void flush_icache_range(unsigned long start, unsigned long stop) | 66 | #endif /* __KERNEL__ */ |
43 | { | ||
44 | if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | ||
45 | __flush_icache_range(start, stop); | ||
46 | } | ||
47 | 67 | ||
48 | #endif /* _PPC64_CACHEFLUSH_H */ | 68 | #endif /* _ASM_POWERPC_CACHEFLUSH_H */ |
diff --git a/include/asm-ppc64/compat.h b/include/asm-powerpc/compat.h index 6ec62cd2d1d1..4db4360c4d4a 100644 --- a/include/asm-ppc64/compat.h +++ b/include/asm-powerpc/compat.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_PPC64_COMPAT_H | 1 | #ifndef _ASM_POWERPC_COMPAT_H |
2 | #define _ASM_PPC64_COMPAT_H | 2 | #define _ASM_POWERPC_COMPAT_H |
3 | /* | 3 | /* |
4 | * Architecture specific compatibility types | 4 | * Architecture specific compatibility types |
5 | */ | 5 | */ |
@@ -49,7 +49,7 @@ struct compat_stat { | |||
49 | compat_dev_t st_dev; | 49 | compat_dev_t st_dev; |
50 | compat_ino_t st_ino; | 50 | compat_ino_t st_ino; |
51 | compat_mode_t st_mode; | 51 | compat_mode_t st_mode; |
52 | compat_nlink_t st_nlink; | 52 | compat_nlink_t st_nlink; |
53 | __compat_uid32_t st_uid; | 53 | __compat_uid32_t st_uid; |
54 | __compat_gid32_t st_gid; | 54 | __compat_gid32_t st_gid; |
55 | compat_dev_t st_rdev; | 55 | compat_dev_t st_rdev; |
@@ -202,4 +202,4 @@ struct compat_shmid64_ds { | |||
202 | compat_ulong_t __unused6; | 202 | compat_ulong_t __unused6; |
203 | }; | 203 | }; |
204 | 204 | ||
205 | #endif /* _ASM_PPC64_COMPAT_H */ | 205 | #endif /* _ASM_POWERPC_COMPAT_H */ |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 79a0556a0ab8..04e2726002cf 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __ASM_POWERPC_CPUTABLE_H | 2 | #define __ASM_POWERPC_CPUTABLE_H |
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/ppc_asm.h> /* for ASM_CONST */ | 5 | #include <asm/asm-compat.h> |
6 | 6 | ||
7 | #define PPC_FEATURE_32 0x80000000 | 7 | #define PPC_FEATURE_32 0x80000000 |
8 | #define PPC_FEATURE_64 0x40000000 | 8 | #define PPC_FEATURE_64 0x40000000 |
@@ -16,6 +16,10 @@ | |||
16 | #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 | 16 | #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 |
17 | #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 | 17 | #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 |
18 | #define PPC_FEATURE_NO_TB 0x00100000 | 18 | #define PPC_FEATURE_NO_TB 0x00100000 |
19 | #define PPC_FEATURE_POWER4 0x00080000 | ||
20 | #define PPC_FEATURE_POWER5 0x00040000 | ||
21 | #define PPC_FEATURE_POWER5_PLUS 0x00020000 | ||
22 | #define PPC_FEATURE_CELL 0x00010000 | ||
19 | 23 | ||
20 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
21 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h new file mode 100644 index 000000000000..82cd4a9ca99a --- /dev/null +++ b/include/asm-powerpc/current.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _ASM_POWERPC_CURRENT_H | ||
2 | #define _ASM_POWERPC_CURRENT_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | struct task_struct; | ||
12 | |||
13 | #ifdef __powerpc64__ | ||
14 | #include <asm/paca.h> | ||
15 | |||
16 | #define current (get_paca()->__current) | ||
17 | |||
18 | #else | ||
19 | |||
20 | /* | ||
21 | * We keep `current' in r2 for speed. | ||
22 | */ | ||
23 | register struct task_struct *current asm ("r2"); | ||
24 | |||
25 | #endif | ||
26 | |||
27 | #endif /* _ASM_POWERPC_CURRENT_H */ | ||
diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h new file mode 100644 index 000000000000..d168a30b3866 --- /dev/null +++ b/include/asm-powerpc/eeh_event.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * eeh_event.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | * | ||
18 | * Copyright (c) 2005 Linas Vepstas <linas@linas.org> | ||
19 | */ | ||
20 | |||
21 | #ifndef ASM_PPC64_EEH_EVENT_H | ||
22 | #define ASM_PPC64_EEH_EVENT_H | ||
23 | |||
24 | /** EEH event -- structure holding pci controller data that describes | ||
25 | * a change in the isolation status of a PCI slot. A pointer | ||
26 | * to this struct is passed as the data pointer in a notify callback. | ||
27 | */ | ||
28 | struct eeh_event { | ||
29 | struct list_head list; | ||
30 | struct device_node *dn; /* struct device node */ | ||
31 | struct pci_dev *dev; /* affected device */ | ||
32 | int state; | ||
33 | int time_unavail; /* milliseconds until device might be available */ | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * eeh_send_failure_event - generate a PCI error event | ||
38 | * @dev pci device | ||
39 | * | ||
40 | * This routine builds a PCI error event which will be delivered | ||
41 | * to all listeners on the peh_notifier_chain. | ||
42 | * | ||
43 | * This routine can be called within an interrupt context; | ||
44 | * the actual event will be delivered in a normal context | ||
45 | * (from a workqueue). | ||
46 | */ | ||
47 | int eeh_send_failure_event (struct device_node *dn, | ||
48 | struct pci_dev *dev, | ||
49 | int reset_state, | ||
50 | int time_unavail); | ||
51 | |||
52 | #endif /* ASM_PPC64_EEH_EVENT_H */ | ||
diff --git a/include/asm-powerpc/firmware.h b/include/asm-powerpc/firmware.h index 806c142ae9ea..12fabbcb04f0 100644 --- a/include/asm-powerpc/firmware.h +++ b/include/asm-powerpc/firmware.h | |||
@@ -43,6 +43,7 @@ | |||
43 | #define FW_FEATURE_ISERIES (1UL<<21) | 43 | #define FW_FEATURE_ISERIES (1UL<<21) |
44 | 44 | ||
45 | enum { | 45 | enum { |
46 | #ifdef CONFIG_PPC64 | ||
46 | FW_FEATURE_PSERIES_POSSIBLE = FW_FEATURE_PFT | FW_FEATURE_TCE | | 47 | FW_FEATURE_PSERIES_POSSIBLE = FW_FEATURE_PFT | FW_FEATURE_TCE | |
47 | FW_FEATURE_SPRG0 | FW_FEATURE_DABR | FW_FEATURE_COPY | | 48 | FW_FEATURE_SPRG0 | FW_FEATURE_DABR | FW_FEATURE_COPY | |
48 | FW_FEATURE_ASR | FW_FEATURE_DEBUG | FW_FEATURE_TERM | | 49 | FW_FEATURE_ASR | FW_FEATURE_DEBUG | FW_FEATURE_TERM | |
@@ -70,6 +71,11 @@ enum { | |||
70 | FW_FEATURE_ISERIES_ALWAYS & | 71 | FW_FEATURE_ISERIES_ALWAYS & |
71 | #endif | 72 | #endif |
72 | FW_FEATURE_POSSIBLE, | 73 | FW_FEATURE_POSSIBLE, |
74 | |||
75 | #else /* CONFIG_PPC64 */ | ||
76 | FW_FEATURE_POSSIBLE = 0, | ||
77 | FW_FEATURE_ALWAYS = 0, | ||
78 | #endif | ||
73 | }; | 79 | }; |
74 | 80 | ||
75 | /* This is used to identify firmware features which are available | 81 | /* This is used to identify firmware features which are available |
diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h index 37c94e52ab6d..f0319d50b129 100644 --- a/include/asm-powerpc/futex.h +++ b/include/asm-powerpc/futex.h | |||
@@ -7,13 +7,14 @@ | |||
7 | #include <asm/errno.h> | 7 | #include <asm/errno.h> |
8 | #include <asm/synch.h> | 8 | #include <asm/synch.h> |
9 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
10 | #include <asm/ppc_asm.h> | 10 | #include <asm/asm-compat.h> |
11 | 11 | ||
12 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 12 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
13 | __asm__ __volatile ( \ | 13 | __asm__ __volatile ( \ |
14 | SYNC_ON_SMP \ | 14 | SYNC_ON_SMP \ |
15 | "1: lwarx %0,0,%2\n" \ | 15 | "1: lwarx %0,0,%2\n" \ |
16 | insn \ | 16 | insn \ |
17 | PPC405_ERR77(0, %2) \ | ||
17 | "2: stwcx. %1,0,%2\n" \ | 18 | "2: stwcx. %1,0,%2\n" \ |
18 | "bne- 1b\n" \ | 19 | "bne- 1b\n" \ |
19 | "li %1,0\n" \ | 20 | "li %1,0\n" \ |
@@ -23,7 +24,7 @@ | |||
23 | ".previous\n" \ | 24 | ".previous\n" \ |
24 | ".section __ex_table,\"a\"\n" \ | 25 | ".section __ex_table,\"a\"\n" \ |
25 | ".align 3\n" \ | 26 | ".align 3\n" \ |
26 | DATAL " 1b,4b,2b,4b\n" \ | 27 | PPC_LONG "1b,4b,2b,4b\n" \ |
27 | ".previous" \ | 28 | ".previous" \ |
28 | : "=&r" (oldval), "=&r" (ret) \ | 29 | : "=&r" (oldval), "=&r" (ret) \ |
29 | : "b" (uaddr), "i" (-EFAULT), "1" (oparg) \ | 30 | : "b" (uaddr), "i" (-EFAULT), "1" (oparg) \ |
diff --git a/include/asm-ppc64/hvcall.h b/include/asm-powerpc/hvcall.h index ab7c3cf24888..d36da61dbc53 100644 --- a/include/asm-ppc64/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _PPC64_HVCALL_H | 1 | #ifndef _ASM_POWERPC_HVCALL_H |
2 | #define _PPC64_HVCALL_H | 2 | #define _ASM_POWERPC_HVCALL_H |
3 | 3 | ||
4 | #define HVSC .long 0x44000022 | 4 | #define HVSC .long 0x44000022 |
5 | 5 | ||
@@ -138,7 +138,7 @@ long plpar_hcall(unsigned long opcode, | |||
138 | */ | 138 | */ |
139 | long plpar_hcall_norets(unsigned long opcode, ...); | 139 | long plpar_hcall_norets(unsigned long opcode, ...); |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * Special hcall interface for ibmveth support. | 142 | * Special hcall interface for ibmveth support. |
143 | * Takes 8 input parms. Returns a rc and stores the | 143 | * Takes 8 input parms. Returns a rc and stores the |
144 | * R4 return value in *out1. | 144 | * R4 return value in *out1. |
@@ -153,11 +153,11 @@ long plpar_hcall_8arg_2ret(unsigned long opcode, | |||
153 | unsigned long arg7, | 153 | unsigned long arg7, |
154 | unsigned long arg8, | 154 | unsigned long arg8, |
155 | unsigned long *out1); | 155 | unsigned long *out1); |
156 | 156 | ||
157 | /* plpar_hcall_4out() | 157 | /* plpar_hcall_4out() |
158 | * | 158 | * |
159 | * same as plpar_hcall except with 4 output arguments. | 159 | * same as plpar_hcall except with 4 output arguments. |
160 | * | 160 | * |
161 | */ | 161 | */ |
162 | long plpar_hcall_4out(unsigned long opcode, | 162 | long plpar_hcall_4out(unsigned long opcode, |
163 | unsigned long arg1, | 163 | unsigned long arg1, |
@@ -170,4 +170,4 @@ long plpar_hcall_4out(unsigned long opcode, | |||
170 | unsigned long *out4); | 170 | unsigned long *out4); |
171 | 171 | ||
172 | #endif /* __ASSEMBLY__ */ | 172 | #endif /* __ASSEMBLY__ */ |
173 | #endif /* _PPC64_HVCALL_H */ | 173 | #endif /* _ASM_POWERPC_HVCALL_H */ |
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h index c37b31b96337..26b89d859c56 100644 --- a/include/asm-powerpc/hw_irq.h +++ b/include/asm-powerpc/hw_irq.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
13 | 13 | ||
14 | extern void timer_interrupt(struct pt_regs *); | 14 | extern void timer_interrupt(struct pt_regs *); |
15 | extern void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq); | ||
16 | 15 | ||
17 | #ifdef CONFIG_PPC_ISERIES | 16 | #ifdef CONFIG_PPC_ISERIES |
18 | 17 | ||
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index b3935ea28fff..c9fbcede0ef9 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -429,7 +429,6 @@ extern u64 ppc64_interrupt_controller; | |||
429 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 429 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) |
430 | /* pedantic: these are long because they are used with set_bit --RR */ | 430 | /* pedantic: these are long because they are used with set_bit --RR */ |
431 | extern unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | 431 | extern unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; |
432 | extern unsigned long ppc_lost_interrupts[NR_MASK_WORDS]; | ||
433 | extern atomic_t ppc_n_lost_interrupts; | 432 | extern atomic_t ppc_n_lost_interrupts; |
434 | 433 | ||
435 | #define virt_irq_create_mapping(x) (x) | 434 | #define virt_irq_create_mapping(x) (x) |
@@ -488,8 +487,8 @@ extern struct thread_info *softirq_ctx[NR_CPUS]; | |||
488 | 487 | ||
489 | extern void irq_ctx_init(void); | 488 | extern void irq_ctx_init(void); |
490 | extern void call_do_softirq(struct thread_info *tp); | 489 | extern void call_do_softirq(struct thread_info *tp); |
491 | extern int call_handle_IRQ_event(int irq, struct pt_regs *regs, | 490 | extern int call___do_IRQ(int irq, struct pt_regs *regs, |
492 | struct irqaction *action, struct thread_info *tp); | 491 | struct thread_info *tp); |
493 | 492 | ||
494 | #define __ARCH_HAS_DO_SOFTIRQ | 493 | #define __ARCH_HAS_DO_SOFTIRQ |
495 | 494 | ||
diff --git a/include/asm-ppc64/lppaca.h b/include/asm-powerpc/lppaca.h index 9e2a6c0649a0..c1bedab1515b 100644 --- a/include/asm-ppc64/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
@@ -16,8 +16,8 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #ifndef _ASM_LPPACA_H | 19 | #ifndef _ASM_POWERPC_LPPACA_H |
20 | #define _ASM_LPPACA_H | 20 | #define _ASM_POWERPC_LPPACA_H |
21 | 21 | ||
22 | //============================================================================= | 22 | //============================================================================= |
23 | // | 23 | // |
@@ -28,8 +28,7 @@ | |||
28 | //---------------------------------------------------------------------------- | 28 | //---------------------------------------------------------------------------- |
29 | #include <asm/types.h> | 29 | #include <asm/types.h> |
30 | 30 | ||
31 | struct lppaca | 31 | struct lppaca { |
32 | { | ||
33 | //============================================================================= | 32 | //============================================================================= |
34 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data | 33 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data |
35 | // NOTE: The xDynXyz fields are fields that will be dynamically changed by | 34 | // NOTE: The xDynXyz fields are fields that will be dynamically changed by |
@@ -129,4 +128,4 @@ struct lppaca | |||
129 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF | 128 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF |
130 | }; | 129 | }; |
131 | 130 | ||
132 | #endif /* _ASM_LPPACA_H */ | 131 | #endif /* _ASM_POWERPC_LPPACA_H */ |
diff --git a/include/asm-ppc64/paca.h b/include/asm-powerpc/paca.h index bccacd6aa93a..92c765c35bd0 100644 --- a/include/asm-ppc64/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -1,11 +1,8 @@ | |||
1 | #ifndef _PPC64_PACA_H | ||
2 | #define _PPC64_PACA_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * include/asm-ppc64/paca.h | 2 | * include/asm-powerpc/paca.h |
6 | * | 3 | * |
7 | * This control block defines the PACA which defines the processor | 4 | * This control block defines the PACA which defines the processor |
8 | * specific data for each logical processor on the system. | 5 | * specific data for each logical processor on the system. |
9 | * There are some pointers defined that are utilized by PLIC. | 6 | * There are some pointers defined that are utilized by PLIC. |
10 | * | 7 | * |
11 | * C 2001 PPC 64 Team, IBM Corp | 8 | * C 2001 PPC 64 Team, IBM Corp |
@@ -14,7 +11,9 @@ | |||
14 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
15 | * as published by the Free Software Foundation; either version | 12 | * as published by the Free Software Foundation; either version |
16 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
17 | */ | 14 | */ |
15 | #ifndef _ASM_POWERPC_PACA_H | ||
16 | #define _ASM_POWERPC_PACA_H | ||
18 | 17 | ||
19 | #include <linux/config.h> | 18 | #include <linux/config.h> |
20 | #include <asm/types.h> | 19 | #include <asm/types.h> |
@@ -118,4 +117,4 @@ struct paca_struct { | |||
118 | 117 | ||
119 | extern struct paca_struct paca[]; | 118 | extern struct paca_struct paca[]; |
120 | 119 | ||
121 | #endif /* _PPC64_PACA_H */ | 120 | #endif /* _ASM_POWERPC_PACA_H */ |
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index 13aacff755f3..9896fade98a7 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h | |||
@@ -26,6 +26,10 @@ extern unsigned long find_and_init_phbs(void); | |||
26 | 26 | ||
27 | extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */ | 27 | extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */ |
28 | 28 | ||
29 | /** Bus Unit ID macros; get low and hi 32-bits of the 64-bit BUID */ | ||
30 | #define BUID_HI(buid) ((buid) >> 32) | ||
31 | #define BUID_LO(buid) ((buid) & 0xffffffff) | ||
32 | |||
29 | /* PCI device_node operations */ | 33 | /* PCI device_node operations */ |
30 | struct device_node; | 34 | struct device_node; |
31 | typedef void *(*traverse_func)(struct device_node *me, void *data); | 35 | typedef void *(*traverse_func)(struct device_node *me, void *data); |
@@ -36,10 +40,6 @@ void pci_devs_phb_init(void); | |||
36 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); | 40 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); |
37 | void __devinit scan_phb(struct pci_controller *hose); | 41 | void __devinit scan_phb(struct pci_controller *hose); |
38 | 42 | ||
39 | /* PCI address cache management routines */ | ||
40 | void pci_addr_cache_insert_device(struct pci_dev *dev); | ||
41 | void pci_addr_cache_remove_device(struct pci_dev *dev); | ||
42 | |||
43 | /* From rtas_pci.h */ | 43 | /* From rtas_pci.h */ |
44 | void init_pci_config_tokens (void); | 44 | void init_pci_config_tokens (void); |
45 | unsigned long get_phb_buid (struct device_node *); | 45 | unsigned long get_phb_buid (struct device_node *); |
@@ -52,4 +52,48 @@ extern unsigned long pci_probe_only; | |||
52 | extern unsigned long pci_assign_all_buses; | 52 | extern unsigned long pci_assign_all_buses; |
53 | extern int pci_read_irq_line(struct pci_dev *pci_dev); | 53 | extern int pci_read_irq_line(struct pci_dev *pci_dev); |
54 | 54 | ||
55 | /* ---- EEH internal-use-only related routines ---- */ | ||
56 | #ifdef CONFIG_EEH | ||
57 | /** | ||
58 | * rtas_set_slot_reset -- unfreeze a frozen slot | ||
59 | * | ||
60 | * Clear the EEH-frozen condition on a slot. This routine | ||
61 | * does this by asserting the PCI #RST line for 1/8th of | ||
62 | * a second; this routine will sleep while the adapter is | ||
63 | * being reset. | ||
64 | */ | ||
65 | void rtas_set_slot_reset (struct pci_dn *); | ||
66 | |||
67 | /** | ||
68 | * eeh_restore_bars - Restore device configuration info. | ||
69 | * | ||
70 | * A reset of a PCI device will clear out its config space. | ||
71 | * This routines will restore the config space for this | ||
72 | * device, and is children, to values previously obtained | ||
73 | * from the firmware. | ||
74 | */ | ||
75 | void eeh_restore_bars(struct pci_dn *); | ||
76 | |||
77 | /** | ||
78 | * rtas_configure_bridge -- firmware initialization of pci bridge | ||
79 | * | ||
80 | * Ask the firmware to configure all PCI bridges devices | ||
81 | * located behind the indicated node. Required after a | ||
82 | * pci device reset. Does essentially the same hing as | ||
83 | * eeh_restore_bars, but for brdges, and lets firmware | ||
84 | * do the work. | ||
85 | */ | ||
86 | void rtas_configure_bridge(struct pci_dn *); | ||
87 | |||
88 | int rtas_write_config(struct pci_dn *, int where, int size, u32 val); | ||
89 | |||
90 | /** | ||
91 | * mark and clear slots: find "partition endpoint" PE and set or | ||
92 | * clear the flags for each subnode of the PE. | ||
93 | */ | ||
94 | void eeh_mark_slot (struct device_node *dn, int mode_flag); | ||
95 | void eeh_clear_slot (struct device_node *dn, int mode_flag); | ||
96 | |||
97 | #endif | ||
98 | |||
55 | #endif /* _ASM_POWERPC_PPC_PCI_H */ | 99 | #endif /* _ASM_POWERPC_PPC_PCI_H */ |
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index c534ca41224b..c27baa0563fe 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h | |||
@@ -6,8 +6,13 @@ | |||
6 | 6 | ||
7 | #include <linux/stringify.h> | 7 | #include <linux/stringify.h> |
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <asm/asm-compat.h> | ||
9 | 10 | ||
10 | #ifdef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | #error __FILE__ should only be used in assembler files | ||
13 | #else | ||
14 | |||
15 | #define SZL (BITS_PER_LONG/8) | ||
11 | 16 | ||
12 | /* | 17 | /* |
13 | * Macros for storing registers into and loading registers from | 18 | * Macros for storing registers into and loading registers from |
@@ -184,12 +189,6 @@ n: | |||
184 | oris reg,reg,(label)@h; \ | 189 | oris reg,reg,(label)@h; \ |
185 | ori reg,reg,(label)@l; | 190 | ori reg,reg,(label)@l; |
186 | 191 | ||
187 | /* operations for longs and pointers */ | ||
188 | #define LDL ld | ||
189 | #define STL std | ||
190 | #define CMPI cmpdi | ||
191 | #define SZL 8 | ||
192 | |||
193 | /* offsets for stack frame layout */ | 192 | /* offsets for stack frame layout */ |
194 | #define LRSAVE 16 | 193 | #define LRSAVE 16 |
195 | 194 | ||
@@ -203,12 +202,6 @@ n: | |||
203 | 202 | ||
204 | #define OFF(name) name@l | 203 | #define OFF(name) name@l |
205 | 204 | ||
206 | /* operations for longs and pointers */ | ||
207 | #define LDL lwz | ||
208 | #define STL stw | ||
209 | #define CMPI cmpwi | ||
210 | #define SZL 4 | ||
211 | |||
212 | /* offsets for stack frame layout */ | 205 | /* offsets for stack frame layout */ |
213 | #define LRSAVE 4 | 206 | #define LRSAVE 4 |
214 | 207 | ||
@@ -266,15 +259,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) | |||
266 | #endif | 259 | #endif |
267 | 260 | ||
268 | 261 | ||
269 | #ifdef CONFIG_IBM405_ERR77 | ||
270 | #define PPC405_ERR77(ra,rb) dcbt ra, rb; | ||
271 | #define PPC405_ERR77_SYNC sync; | ||
272 | #else | ||
273 | #define PPC405_ERR77(ra,rb) | ||
274 | #define PPC405_ERR77_SYNC | ||
275 | #endif | ||
276 | |||
277 | |||
278 | #ifdef CONFIG_IBM440EP_ERR42 | 262 | #ifdef CONFIG_IBM440EP_ERR42 |
279 | #define PPC440EP_ERR42 isync | 263 | #define PPC440EP_ERR42 isync |
280 | #else | 264 | #else |
@@ -502,17 +486,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) | |||
502 | #define N_SLINE 68 | 486 | #define N_SLINE 68 |
503 | #define N_SO 100 | 487 | #define N_SO 100 |
504 | 488 | ||
505 | #define ASM_CONST(x) x | ||
506 | #else | ||
507 | #define __ASM_CONST(x) x##UL | ||
508 | #define ASM_CONST(x) __ASM_CONST(x) | ||
509 | |||
510 | #ifdef CONFIG_PPC64 | ||
511 | #define DATAL ".llong" | ||
512 | #else | ||
513 | #define DATAL ".long" | ||
514 | #endif | ||
515 | |||
516 | #endif /* __ASSEMBLY__ */ | 489 | #endif /* __ASSEMBLY__ */ |
517 | 490 | ||
518 | #endif /* _ASM_POWERPC_PPC_ASM_H */ | 491 | #endif /* _ASM_POWERPC_PPC_ASM_H */ |
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index 1dc4bf7b52b3..f6f186b56b0f 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -17,65 +17,71 @@ | |||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
19 | #include <asm/types.h> | 19 | #include <asm/types.h> |
20 | #ifdef CONFIG_PPC64 | ||
21 | #include <asm/systemcfg.h> | ||
22 | #endif | ||
23 | 20 | ||
24 | #ifdef CONFIG_PPC32 | 21 | /* We do _not_ want to define new machine types at all, those must die |
25 | /* 32-bit platform types */ | 22 | * in favor of using the device-tree |
26 | /* We only need to define a new _MACH_xxx for machines which are part of | 23 | * -- BenH. |
27 | * a configuration which supports more than one type of different machine. | ||
28 | * This is currently limited to CONFIG_PPC_MULTIPLATFORM and CHRP/PReP/PMac. | ||
29 | * -- Tom | ||
30 | */ | 24 | */ |
31 | #define _MACH_prep 0x00000001 | ||
32 | #define _MACH_Pmac 0x00000002 /* pmac or pmac clone (non-chrp) */ | ||
33 | #define _MACH_chrp 0x00000004 /* chrp machine */ | ||
34 | 25 | ||
35 | /* see residual.h for these */ | 26 | /* Platforms codes (to be obsoleted) */ |
27 | #define PLATFORM_PSERIES 0x0100 | ||
28 | #define PLATFORM_PSERIES_LPAR 0x0101 | ||
29 | #define PLATFORM_ISERIES_LPAR 0x0201 | ||
30 | #define PLATFORM_LPAR 0x0001 | ||
31 | #define PLATFORM_POWERMAC 0x0400 | ||
32 | #define PLATFORM_MAPLE 0x0500 | ||
33 | #define PLATFORM_PREP 0x0600 | ||
34 | #define PLATFORM_CHRP 0x0700 | ||
35 | #define PLATFORM_CELL 0x1000 | ||
36 | |||
37 | /* Compat platform codes for 32 bits */ | ||
38 | #define _MACH_prep PLATFORM_PREP | ||
39 | #define _MACH_Pmac PLATFORM_POWERMAC | ||
40 | #define _MACH_chrp PLATFORM_CHRP | ||
41 | |||
42 | /* PREP sub-platform types see residual.h for these */ | ||
36 | #define _PREP_Motorola 0x01 /* motorola prep */ | 43 | #define _PREP_Motorola 0x01 /* motorola prep */ |
37 | #define _PREP_Firm 0x02 /* firmworks prep */ | 44 | #define _PREP_Firm 0x02 /* firmworks prep */ |
38 | #define _PREP_IBM 0x00 /* ibm prep */ | 45 | #define _PREP_IBM 0x00 /* ibm prep */ |
39 | #define _PREP_Bull 0x03 /* bull prep */ | 46 | #define _PREP_Bull 0x03 /* bull prep */ |
40 | 47 | ||
41 | /* these are arbitrary */ | 48 | /* CHRP sub-platform types. These are arbitrary */ |
42 | #define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */ | 49 | #define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */ |
43 | #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */ | 50 | #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */ |
44 | #define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */ | 51 | #define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */ |
45 | 52 | ||
46 | #ifdef CONFIG_PPC_MULTIPLATFORM | 53 | #define platform_is_pseries() (_machine == PLATFORM_PSERIES || \ |
54 | _machine == PLATFORM_PSERIES_LPAR) | ||
55 | #define platform_is_lpar() (!!(_machine & PLATFORM_LPAR)) | ||
56 | |||
57 | #if defined(CONFIG_PPC_MULTIPLATFORM) | ||
47 | extern int _machine; | 58 | extern int _machine; |
48 | 59 | ||
60 | #ifdef CONFIG_PPC32 | ||
61 | |||
49 | /* what kind of prep workstation we are */ | 62 | /* what kind of prep workstation we are */ |
50 | extern int _prep_type; | 63 | extern int _prep_type; |
51 | extern int _chrp_type; | 64 | extern int _chrp_type; |
52 | 65 | ||
53 | /* | 66 | /* |
54 | * This is used to identify the board type from a given PReP board | 67 | * This is used to identify the board type from a given PReP board |
55 | * vendor. Board revision is also made available. | 68 | * vendor. Board revision is also made available. This will be moved |
69 | * elsewhere soon | ||
56 | */ | 70 | */ |
57 | extern unsigned char ucSystemType; | 71 | extern unsigned char ucSystemType; |
58 | extern unsigned char ucBoardRev; | 72 | extern unsigned char ucBoardRev; |
59 | extern unsigned char ucBoardRevMaj, ucBoardRevMin; | 73 | extern unsigned char ucBoardRevMaj, ucBoardRevMin; |
74 | |||
75 | #endif /* CONFIG_PPC32 */ | ||
76 | |||
77 | #elif defined(CONFIG_PPC_ISERIES) | ||
78 | /* | ||
79 | * iSeries is soon to become MULTIPLATFORM hopefully ... | ||
80 | */ | ||
81 | #define _machine PLATFORM_ISERIES_LPAR | ||
60 | #else | 82 | #else |
61 | #define _machine 0 | 83 | #define _machine 0 |
62 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 84 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
63 | #endif /* CONFIG_PPC32 */ | ||
64 | |||
65 | #ifdef CONFIG_PPC64 | ||
66 | /* Platforms supported by PPC64 */ | ||
67 | #define PLATFORM_PSERIES 0x0100 | ||
68 | #define PLATFORM_PSERIES_LPAR 0x0101 | ||
69 | #define PLATFORM_ISERIES_LPAR 0x0201 | ||
70 | #define PLATFORM_LPAR 0x0001 | ||
71 | #define PLATFORM_POWERMAC 0x0400 | ||
72 | #define PLATFORM_MAPLE 0x0500 | ||
73 | #define PLATFORM_CELL 0x1000 | ||
74 | |||
75 | /* Compatibility with drivers coming from PPC32 world */ | ||
76 | #define _machine (systemcfg->platform) | ||
77 | #define _MACH_Pmac PLATFORM_POWERMAC | ||
78 | #endif | ||
79 | 85 | ||
80 | /* | 86 | /* |
81 | * Default implementation of macro that returns current | 87 | * Default implementation of macro that returns current |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 489cf4c99c21..eb392d038ed7 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -16,7 +16,11 @@ | |||
16 | /* Pickup Book E specific registers. */ | 16 | /* Pickup Book E specific registers. */ |
17 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | 17 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
18 | #include <asm/reg_booke.h> | 18 | #include <asm/reg_booke.h> |
19 | #endif | 19 | #endif /* CONFIG_BOOKE || CONFIG_40x */ |
20 | |||
21 | #ifdef CONFIG_8xx | ||
22 | #include <asm/reg_8xx.h> | ||
23 | #endif /* CONFIG_8xx */ | ||
20 | 24 | ||
21 | #define MSR_SF_LG 63 /* Enable 64 bit mode */ | 25 | #define MSR_SF_LG 63 /* Enable 64 bit mode */ |
22 | #define MSR_ISF_LG 61 /* Interrupt 64b mode valid on 630 */ | 26 | #define MSR_ISF_LG 61 /* Interrupt 64b mode valid on 630 */ |
@@ -359,6 +363,7 @@ | |||
359 | #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ | 363 | #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ |
360 | #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ | 364 | #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ |
361 | #define SPRN_SDR1 0x019 /* MMU Hash Base Register */ | 365 | #define SPRN_SDR1 0x019 /* MMU Hash Base Register */ |
366 | #define SPRN_ASR 0x118 /* Address Space Register */ | ||
362 | #define SPRN_SIA 0x3BB /* Sampled Instruction Address Register */ | 367 | #define SPRN_SIA 0x3BB /* Sampled Instruction Address Register */ |
363 | #define SPRN_SPRG0 0x110 /* Special Purpose Register General 0 */ | 368 | #define SPRN_SPRG0 0x110 /* Special Purpose Register General 0 */ |
364 | #define SPRN_SPRG1 0x111 /* Special Purpose Register General 1 */ | 369 | #define SPRN_SPRG1 0x111 /* Special Purpose Register General 1 */ |
diff --git a/include/asm-ppc/cache.h b/include/asm-powerpc/reg_8xx.h index 7a157d0f4b5f..e8ea346b21d3 100644 --- a/include/asm-ppc/cache.h +++ b/include/asm-powerpc/reg_8xx.h | |||
@@ -1,49 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-ppc/cache.h | 2 | * Contains register definitions common to PowerPC 8xx CPUs. Notice |
3 | */ | 3 | */ |
4 | #ifdef __KERNEL__ | 4 | #ifndef _ASM_POWERPC_REG_8xx_H |
5 | #ifndef __ARCH_PPC_CACHE_H | 5 | #define _ASM_POWERPC_REG_8xx_H |
6 | #define __ARCH_PPC_CACHE_H | ||
7 | 6 | ||
8 | #include <linux/config.h> | ||
9 | |||
10 | /* bytes per L1 cache line */ | ||
11 | #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) | ||
12 | #define L1_CACHE_SHIFT 4 | ||
13 | #define MAX_COPY_PREFETCH 1 | ||
14 | #elif defined(CONFIG_PPC64BRIDGE) | ||
15 | #define L1_CACHE_SHIFT 7 | ||
16 | #define MAX_COPY_PREFETCH 1 | ||
17 | #else | ||
18 | #define L1_CACHE_SHIFT 5 | ||
19 | #define MAX_COPY_PREFETCH 4 | ||
20 | #endif | ||
21 | |||
22 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
23 | |||
24 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
25 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
26 | |||
27 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | ||
28 | #define L1_CACHE_PAGES 8 | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | ||
31 | extern void clean_dcache_range(unsigned long start, unsigned long stop); | ||
32 | extern void flush_dcache_range(unsigned long start, unsigned long stop); | ||
33 | extern void invalidate_dcache_range(unsigned long start, unsigned long stop); | ||
34 | extern void flush_dcache_all(void); | ||
35 | #endif /* __ASSEMBLY__ */ | ||
36 | |||
37 | /* prep registers for L2 */ | ||
38 | #define CACHECRBA 0x80000823 /* Cache configuration register address */ | ||
39 | #define L2CACHE_MASK 0x03 /* Mask for 2 L2 Cache bits */ | ||
40 | #define L2CACHE_512KB 0x00 /* 512KB */ | ||
41 | #define L2CACHE_256KB 0x01 /* 256KB */ | ||
42 | #define L2CACHE_1MB 0x02 /* 1MB */ | ||
43 | #define L2CACHE_NONE 0x03 /* NONE */ | ||
44 | #define L2CACHE_PARITY 0x08 /* Mask for L2 Cache Parity Protected bit */ | ||
45 | |||
46 | #ifdef CONFIG_8xx | ||
47 | /* Cache control on the MPC8xx is provided through some additional | 7 | /* Cache control on the MPC8xx is provided through some additional |
48 | * special purpose registers. | 8 | * special purpose registers. |
49 | */ | 9 | */ |
@@ -78,7 +38,5 @@ extern void flush_dcache_all(void); | |||
78 | 38 | ||
79 | #define DC_DFWT 0x40000000 /* Data cache is forced write through */ | 39 | #define DC_DFWT 0x40000000 /* Data cache is forced write through */ |
80 | #define DC_LES 0x20000000 /* Caches are little endian mode */ | 40 | #define DC_LES 0x20000000 /* Caches are little endian mode */ |
81 | #endif /* CONFIG_8xx */ | ||
82 | 41 | ||
83 | #endif | 42 | #endif /* _ASM_POWERPC_REG_8xx_H */ |
84 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc/signal.h b/include/asm-powerpc/signal.h index caf6ede3710f..694c8d2dab87 100644 --- a/include/asm-ppc/signal.h +++ b/include/asm-powerpc/signal.h | |||
@@ -1,18 +1,11 @@ | |||
1 | #ifndef _ASMPPC_SIGNAL_H | 1 | #ifndef _ASM_POWERPC_SIGNAL_H |
2 | #define _ASMPPC_SIGNAL_H | 2 | #define _ASM_POWERPC_SIGNAL_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | #include <linux/types.h> | 4 | #include <linux/types.h> |
6 | #endif /* __KERNEL__ */ | 5 | #include <linux/config.h> |
7 | |||
8 | /* Avoid too many header ordering problems. */ | ||
9 | struct siginfo; | ||
10 | |||
11 | /* Most things should be clean enough to redefine this at will, if care | ||
12 | is taken to make libc match. */ | ||
13 | 6 | ||
14 | #define _NSIG 64 | 7 | #define _NSIG 64 |
15 | #define _NSIG_BPW 32 | 8 | #define _NSIG_BPW BITS_PER_LONG |
16 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 9 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
17 | 10 | ||
18 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | 11 | typedef unsigned long old_sigset_t; /* at least 32 bits */ |
@@ -77,19 +70,19 @@ typedef struct { | |||
77 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | 70 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single |
78 | * Unix names RESETHAND and NODEFER respectively. | 71 | * Unix names RESETHAND and NODEFER respectively. |
79 | */ | 72 | */ |
80 | #define SA_NOCLDSTOP 0x00000001 | 73 | #define SA_NOCLDSTOP 0x00000001U |
81 | #define SA_NOCLDWAIT 0x00000002 | 74 | #define SA_NOCLDWAIT 0x00000002U |
82 | #define SA_SIGINFO 0x00000004 | 75 | #define SA_SIGINFO 0x00000004U |
83 | #define SA_ONSTACK 0x08000000 | 76 | #define SA_ONSTACK 0x08000000U |
84 | #define SA_RESTART 0x10000000 | 77 | #define SA_RESTART 0x10000000U |
85 | #define SA_NODEFER 0x40000000 | 78 | #define SA_NODEFER 0x40000000U |
86 | #define SA_RESETHAND 0x80000000 | 79 | #define SA_RESETHAND 0x80000000U |
87 | 80 | ||
88 | #define SA_NOMASK SA_NODEFER | 81 | #define SA_NOMASK SA_NODEFER |
89 | #define SA_ONESHOT SA_RESETHAND | 82 | #define SA_ONESHOT SA_RESETHAND |
90 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | 83 | #define SA_INTERRUPT 0x20000000u /* dummy -- ignored */ |
91 | 84 | ||
92 | #define SA_RESTORER 0x04000000 | 85 | #define SA_RESTORER 0x04000000U |
93 | 86 | ||
94 | /* | 87 | /* |
95 | * sigaltstack controls | 88 | * sigaltstack controls |
@@ -127,10 +120,13 @@ typedef struct sigaltstack { | |||
127 | } stack_t; | 120 | } stack_t; |
128 | 121 | ||
129 | #ifdef __KERNEL__ | 122 | #ifdef __KERNEL__ |
130 | #include <asm/sigcontext.h> | 123 | struct pt_regs; |
124 | extern int do_signal(sigset_t *oldset, struct pt_regs *regs); | ||
125 | extern int do_signal32(sigset_t *oldset, struct pt_regs *regs); | ||
131 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 126 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
132 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
133 | 128 | ||
129 | #ifndef __powerpc64__ | ||
134 | /* | 130 | /* |
135 | * These are parameters to dbg_sigreturn syscall. They enable or | 131 | * These are parameters to dbg_sigreturn syscall. They enable or |
136 | * disable certain debugging things that can be done from signal | 132 | * disable certain debugging things that can be done from signal |
@@ -149,5 +145,6 @@ struct sig_dbg_op { | |||
149 | 145 | ||
150 | /* Enable or disable branch tracing. The value sets the state. */ | 146 | /* Enable or disable branch tracing. The value sets the state. */ |
151 | #define SIG_DBG_BRANCH_TRACING 2 | 147 | #define SIG_DBG_BRANCH_TRACING 2 |
148 | #endif /* ! __powerpc64__ */ | ||
152 | 149 | ||
153 | #endif | 150 | #endif /* _ASM_POWERPC_SIGNAL_H */ |
diff --git a/include/asm-powerpc/sparsemem.h b/include/asm-powerpc/sparsemem.h index 1c95ab99deb3..58d2aab416f8 100644 --- a/include/asm-powerpc/sparsemem.h +++ b/include/asm-powerpc/sparsemem.h | |||
@@ -11,6 +11,10 @@ | |||
11 | #define MAX_PHYSADDR_BITS 38 | 11 | #define MAX_PHYSADDR_BITS 38 |
12 | #define MAX_PHYSMEM_BITS 36 | 12 | #define MAX_PHYSMEM_BITS 36 |
13 | 13 | ||
14 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
15 | extern void create_section_mapping(unsigned long start, unsigned long end); | ||
16 | #endif /* CONFIG_MEMORY_HOTPLUG */ | ||
17 | |||
14 | #endif /* CONFIG_SPARSEMEM */ | 18 | #endif /* CONFIG_SPARSEMEM */ |
15 | 19 | ||
16 | #endif /* _ASM_POWERPC_SPARSEMEM_H */ | 20 | #endif /* _ASM_POWERPC_SPARSEMEM_H */ |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 3536a5cd7a2d..5341b75c75cb 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | 9 | ||
10 | #include <asm/hw_irq.h> | 10 | #include <asm/hw_irq.h> |
11 | #include <asm/ppc_asm.h> | ||
12 | #include <asm/atomic.h> | 11 | #include <asm/atomic.h> |
13 | 12 | ||
14 | /* | 13 | /* |
@@ -180,6 +179,7 @@ extern struct task_struct *_switch(struct thread_struct *prev, | |||
180 | extern unsigned int rtas_data; | 179 | extern unsigned int rtas_data; |
181 | extern int mem_init_done; /* set on boot once kmalloc can be called */ | 180 | extern int mem_init_done; /* set on boot once kmalloc can be called */ |
182 | extern unsigned long memory_limit; | 181 | extern unsigned long memory_limit; |
182 | extern unsigned long klimit; | ||
183 | 183 | ||
184 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ | 184 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ |
185 | 185 | ||
diff --git a/include/asm-ppc64/systemcfg.h b/include/asm-powerpc/systemcfg.h index 9b86b53129aa..36b5cbe466f1 100644 --- a/include/asm-ppc64/systemcfg.h +++ b/include/asm-powerpc/systemcfg.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _SYSTEMCFG_H | 1 | #ifndef _SYSTEMCFG_H |
2 | #define _SYSTEMCFG_H | 2 | #define _SYSTEMCFG_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM | 5 | * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | /* Change Activity: | 13 | /* Change Activity: |
14 | * 2002/09/30 : bergner : Created | 14 | * 2002/09/30 : bergner : Created |
15 | * End Change Activity | 15 | * End Change Activity |
16 | */ | 16 | */ |
17 | 17 | ||
18 | /* | 18 | /* |
@@ -56,7 +56,7 @@ struct systemcfg { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | #ifdef __KERNEL__ | 58 | #ifdef __KERNEL__ |
59 | extern struct systemcfg *systemcfg; | 59 | extern struct systemcfg *_systemcfg; /* to be renamed */ |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #endif /* __ASSEMBLY__ */ | 62 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-ppc64/tce.h b/include/asm-powerpc/tce.h index d40b6b42ab35..d099d5200f9b 100644 --- a/include/asm-ppc64/tce.h +++ b/include/asm-powerpc/tce.h | |||
@@ -18,8 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef _ASM_TCE_H | 21 | #ifndef _ASM_POWERPC_TCE_H |
22 | #define _ASM_TCE_H | 22 | #define _ASM_POWERPC_TCE_H |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Tces come in two formats, one for the virtual bus and a different | 25 | * Tces come in two formats, one for the virtual bus and a different |
@@ -61,4 +61,4 @@ union tce_entry { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | 63 | ||
64 | #endif | 64 | #endif /* _ASM_POWERPC_TCE_H */ |
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h index 33af730f0d19..3872e924cdd6 100644 --- a/include/asm-powerpc/uaccess.h +++ b/include/asm-powerpc/uaccess.h | |||
@@ -120,14 +120,6 @@ struct exception_table_entry { | |||
120 | 120 | ||
121 | extern long __put_user_bad(void); | 121 | extern long __put_user_bad(void); |
122 | 122 | ||
123 | #ifdef __powerpc64__ | ||
124 | #define __EX_TABLE_ALIGN "3" | ||
125 | #define __EX_TABLE_TYPE "llong" | ||
126 | #else | ||
127 | #define __EX_TABLE_ALIGN "2" | ||
128 | #define __EX_TABLE_TYPE "long" | ||
129 | #endif | ||
130 | |||
131 | /* | 123 | /* |
132 | * We don't tell gcc that we are accessing memory, but this is OK | 124 | * We don't tell gcc that we are accessing memory, but this is OK |
133 | * because we do not write to any memory gcc knows about, so there | 125 | * because we do not write to any memory gcc knows about, so there |
@@ -142,11 +134,12 @@ extern long __put_user_bad(void); | |||
142 | " b 2b\n" \ | 134 | " b 2b\n" \ |
143 | ".previous\n" \ | 135 | ".previous\n" \ |
144 | ".section __ex_table,\"a\"\n" \ | 136 | ".section __ex_table,\"a\"\n" \ |
145 | " .align " __EX_TABLE_ALIGN "\n" \ | 137 | " .balign %5\n" \ |
146 | " ."__EX_TABLE_TYPE" 1b,3b\n" \ | 138 | PPC_LONG "1b,3b\n" \ |
147 | ".previous" \ | 139 | ".previous" \ |
148 | : "=r" (err) \ | 140 | : "=r" (err) \ |
149 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err)) | 141 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ |
142 | "i"(sizeof(unsigned long))) | ||
150 | 143 | ||
151 | #ifdef __powerpc64__ | 144 | #ifdef __powerpc64__ |
152 | #define __put_user_asm2(x, ptr, retval) \ | 145 | #define __put_user_asm2(x, ptr, retval) \ |
@@ -162,12 +155,13 @@ extern long __put_user_bad(void); | |||
162 | " b 3b\n" \ | 155 | " b 3b\n" \ |
163 | ".previous\n" \ | 156 | ".previous\n" \ |
164 | ".section __ex_table,\"a\"\n" \ | 157 | ".section __ex_table,\"a\"\n" \ |
165 | " .align " __EX_TABLE_ALIGN "\n" \ | 158 | " .balign %5\n" \ |
166 | " ." __EX_TABLE_TYPE " 1b,4b\n" \ | 159 | PPC_LONG "1b,4b\n" \ |
167 | " ." __EX_TABLE_TYPE " 2b,4b\n" \ | 160 | PPC_LONG "2b,4b\n" \ |
168 | ".previous" \ | 161 | ".previous" \ |
169 | : "=r" (err) \ | 162 | : "=r" (err) \ |
170 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err)) | 163 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ |
164 | "i"(sizeof(unsigned long))) | ||
171 | #endif /* __powerpc64__ */ | 165 | #endif /* __powerpc64__ */ |
172 | 166 | ||
173 | #define __put_user_size(x, ptr, size, retval) \ | 167 | #define __put_user_size(x, ptr, size, retval) \ |
@@ -213,11 +207,12 @@ extern long __get_user_bad(void); | |||
213 | " b 2b\n" \ | 207 | " b 2b\n" \ |
214 | ".previous\n" \ | 208 | ".previous\n" \ |
215 | ".section __ex_table,\"a\"\n" \ | 209 | ".section __ex_table,\"a\"\n" \ |
216 | " .align "__EX_TABLE_ALIGN "\n" \ | 210 | " .balign %5\n" \ |
217 | " ." __EX_TABLE_TYPE " 1b,3b\n" \ | 211 | PPC_LONG "1b,3b\n" \ |
218 | ".previous" \ | 212 | ".previous" \ |
219 | : "=r" (err), "=r" (x) \ | 213 | : "=r" (err), "=r" (x) \ |
220 | : "b" (addr), "i" (-EFAULT), "0" (err)) | 214 | : "b" (addr), "i" (-EFAULT), "0" (err), \ |
215 | "i"(sizeof(unsigned long))) | ||
221 | 216 | ||
222 | #ifdef __powerpc64__ | 217 | #ifdef __powerpc64__ |
223 | #define __get_user_asm2(x, addr, err) \ | 218 | #define __get_user_asm2(x, addr, err) \ |
@@ -235,12 +230,13 @@ extern long __get_user_bad(void); | |||
235 | " b 3b\n" \ | 230 | " b 3b\n" \ |
236 | ".previous\n" \ | 231 | ".previous\n" \ |
237 | ".section __ex_table,\"a\"\n" \ | 232 | ".section __ex_table,\"a\"\n" \ |
238 | " .align " __EX_TABLE_ALIGN "\n" \ | 233 | " .balign %5\n" \ |
239 | " ." __EX_TABLE_TYPE " 1b,4b\n" \ | 234 | PPC_LONG "1b,4b\n" \ |
240 | " ." __EX_TABLE_TYPE " 2b,4b\n" \ | 235 | PPC_LONG "2b,4b\n" \ |
241 | ".previous" \ | 236 | ".previous" \ |
242 | : "=r" (err), "=&r" (x) \ | 237 | : "=r" (err), "=&r" (x) \ |
243 | : "b" (addr), "i" (-EFAULT), "0" (err)) | 238 | : "b" (addr), "i" (-EFAULT), "0" (err), \ |
239 | "i"(sizeof(unsigned long))) | ||
244 | #endif /* __powerpc64__ */ | 240 | #endif /* __powerpc64__ */ |
245 | 241 | ||
246 | #define __get_user_size(x, ptr, size, retval) \ | 242 | #define __get_user_size(x, ptr, size, retval) \ |
diff --git a/include/asm-powerpc/xmon.h b/include/asm-powerpc/xmon.h index ace2072d4a83..43f7129984c7 100644 --- a/include/asm-powerpc/xmon.h +++ b/include/asm-powerpc/xmon.h | |||
@@ -7,7 +7,6 @@ struct pt_regs; | |||
7 | extern int xmon(struct pt_regs *excp); | 7 | extern int xmon(struct pt_regs *excp); |
8 | extern void xmon_printf(const char *fmt, ...); | 8 | extern void xmon_printf(const char *fmt, ...); |
9 | extern void xmon_init(int); | 9 | extern void xmon_init(int); |
10 | extern void xmon_map_scc(void); | ||
11 | 10 | ||
12 | #endif | 11 | #endif |
13 | #endif | 12 | #endif |
diff --git a/include/asm-ppc/cacheflush.h b/include/asm-ppc/cacheflush.h deleted file mode 100644 index 6a243efb3317..000000000000 --- a/include/asm-ppc/cacheflush.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/cacheflush.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #ifdef __KERNEL__ | ||
10 | #ifndef _PPC_CACHEFLUSH_H | ||
11 | #define _PPC_CACHEFLUSH_H | ||
12 | |||
13 | #include <linux/mm.h> | ||
14 | |||
15 | /* | ||
16 | * No cache flushing is required when address mappings are | ||
17 | * changed, because the caches on PowerPCs are physically | ||
18 | * addressed. -- paulus | ||
19 | * Also, when SMP we use the coherency (M) bit of the | ||
20 | * BATs and PTEs. -- Cort | ||
21 | */ | ||
22 | #define flush_cache_all() do { } while (0) | ||
23 | #define flush_cache_mm(mm) do { } while (0) | ||
24 | #define flush_cache_range(vma, a, b) do { } while (0) | ||
25 | #define flush_cache_page(vma, p, pfn) do { } while (0) | ||
26 | #define flush_icache_page(vma, page) do { } while (0) | ||
27 | #define flush_cache_vmap(start, end) do { } while (0) | ||
28 | #define flush_cache_vunmap(start, end) do { } while (0) | ||
29 | |||
30 | extern void flush_dcache_page(struct page *page); | ||
31 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | ||
32 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | ||
33 | |||
34 | extern void flush_icache_range(unsigned long, unsigned long); | ||
35 | extern void flush_icache_user_range(struct vm_area_struct *vma, | ||
36 | struct page *page, unsigned long addr, int len); | ||
37 | |||
38 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
39 | do { memcpy(dst, src, len); \ | ||
40 | flush_icache_user_range(vma, page, vaddr, len); \ | ||
41 | } while (0) | ||
42 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
43 | memcpy(dst, src, len) | ||
44 | |||
45 | extern void __flush_dcache_icache(void *page_va); | ||
46 | extern void __flush_dcache_icache_phys(unsigned long physaddr); | ||
47 | extern void flush_dcache_icache_page(struct page *page); | ||
48 | #endif /* _PPC_CACHEFLUSH_H */ | ||
49 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc/current.h b/include/asm-ppc/current.h deleted file mode 100644 index 8d41501ba10d..000000000000 --- a/include/asm-ppc/current.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | #ifndef _PPC_CURRENT_H | ||
3 | #define _PPC_CURRENT_H | ||
4 | |||
5 | /* | ||
6 | * We keep `current' in r2 for speed. | ||
7 | */ | ||
8 | register struct task_struct *current asm ("r2"); | ||
9 | |||
10 | #endif /* !(_PPC_CURRENT_H) */ | ||
11 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc64/cache.h b/include/asm-ppc64/cache.h deleted file mode 100644 index 92140a7efbd1..000000000000 --- a/include/asm-ppc64/cache.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or | ||
3 | * modify it under the terms of the GNU General Public License | ||
4 | * as published by the Free Software Foundation; either version | ||
5 | * 2 of the License, or (at your option) any later version. | ||
6 | */ | ||
7 | #ifndef __ARCH_PPC64_CACHE_H | ||
8 | #define __ARCH_PPC64_CACHE_H | ||
9 | |||
10 | #include <asm/types.h> | ||
11 | |||
12 | /* bytes per L1 cache line */ | ||
13 | #define L1_CACHE_SHIFT 7 | ||
14 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
15 | |||
16 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
17 | #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ | ||
18 | |||
19 | #ifndef __ASSEMBLY__ | ||
20 | |||
21 | struct ppc64_caches { | ||
22 | u32 dsize; /* L1 d-cache size */ | ||
23 | u32 dline_size; /* L1 d-cache line size */ | ||
24 | u32 log_dline_size; | ||
25 | u32 dlines_per_page; | ||
26 | u32 isize; /* L1 i-cache size */ | ||
27 | u32 iline_size; /* L1 i-cache line size */ | ||
28 | u32 log_iline_size; | ||
29 | u32 ilines_per_page; | ||
30 | }; | ||
31 | |||
32 | extern struct ppc64_caches ppc64_caches; | ||
33 | |||
34 | #endif | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-ppc64/current.h b/include/asm-ppc64/current.h deleted file mode 100644 index 52ddc60c8b65..000000000000 --- a/include/asm-ppc64/current.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _PPC64_CURRENT_H | ||
2 | #define _PPC64_CURRENT_H | ||
3 | |||
4 | #include <asm/paca.h> | ||
5 | |||
6 | /* | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #define get_current() (get_paca()->__current) | ||
14 | #define current get_current() | ||
15 | |||
16 | #endif /* !(_PPC64_CURRENT_H) */ | ||
diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h index 40c8eb57493e..89f26ab31908 100644 --- a/include/asm-ppc64/eeh.h +++ b/include/asm-ppc64/eeh.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * eeh.h | 2 | * eeh.h |
3 | * Copyright (C) 2001 Dave Engebretsen & Todd Inglett IBM Corporation. | 3 | * Copyright (C) 2001 Dave Engebretsen & Todd Inglett IBM Corporation. |
4 | * | 4 | * |
@@ -6,12 +6,12 @@ | |||
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
@@ -27,8 +27,6 @@ | |||
27 | 27 | ||
28 | struct pci_dev; | 28 | struct pci_dev; |
29 | struct device_node; | 29 | struct device_node; |
30 | struct device_node; | ||
31 | struct notifier_block; | ||
32 | 30 | ||
33 | #ifdef CONFIG_EEH | 31 | #ifdef CONFIG_EEH |
34 | 32 | ||
@@ -37,6 +35,10 @@ struct notifier_block; | |||
37 | #define EEH_MODE_NOCHECK (1<<1) | 35 | #define EEH_MODE_NOCHECK (1<<1) |
38 | #define EEH_MODE_ISOLATED (1<<2) | 36 | #define EEH_MODE_ISOLATED (1<<2) |
39 | 37 | ||
38 | /* Max number of EEH freezes allowed before we consider the device | ||
39 | * to be permanently disabled. */ | ||
40 | #define EEH_MAX_ALLOWED_FREEZES 5 | ||
41 | |||
40 | void __init eeh_init(void); | 42 | void __init eeh_init(void); |
41 | unsigned long eeh_check_failure(const volatile void __iomem *token, | 43 | unsigned long eeh_check_failure(const volatile void __iomem *token, |
42 | unsigned long val); | 44 | unsigned long val); |
@@ -59,36 +61,14 @@ void eeh_add_device_late(struct pci_dev *); | |||
59 | * eeh_remove_device - undo EEH setup for the indicated pci device | 61 | * eeh_remove_device - undo EEH setup for the indicated pci device |
60 | * @dev: pci device to be removed | 62 | * @dev: pci device to be removed |
61 | * | 63 | * |
62 | * This routine should be when a device is removed from a running | 64 | * This routine should be called when a device is removed from |
63 | * system (e.g. by hotplug or dlpar). | 65 | * a running system (e.g. by hotplug or dlpar). It unregisters |
66 | * the PCI device from the EEH subsystem. I/O errors affecting | ||
67 | * this device will no longer be detected after this call; thus, | ||
68 | * i/o errors affecting this slot may leave this device unusable. | ||
64 | */ | 69 | */ |
65 | void eeh_remove_device(struct pci_dev *); | 70 | void eeh_remove_device(struct pci_dev *); |
66 | 71 | ||
67 | #define EEH_DISABLE 0 | ||
68 | #define EEH_ENABLE 1 | ||
69 | #define EEH_RELEASE_LOADSTORE 2 | ||
70 | #define EEH_RELEASE_DMA 3 | ||
71 | |||
72 | /** | ||
73 | * Notifier event flags. | ||
74 | */ | ||
75 | #define EEH_NOTIFY_FREEZE 1 | ||
76 | |||
77 | /** EEH event -- structure holding pci slot data that describes | ||
78 | * a change in the isolation status of a PCI slot. A pointer | ||
79 | * to this struct is passed as the data pointer in a notify callback. | ||
80 | */ | ||
81 | struct eeh_event { | ||
82 | struct list_head list; | ||
83 | struct pci_dev *dev; | ||
84 | struct device_node *dn; | ||
85 | int reset_state; | ||
86 | }; | ||
87 | |||
88 | /** Register to find out about EEH events. */ | ||
89 | int eeh_register_notifier(struct notifier_block *nb); | ||
90 | int eeh_unregister_notifier(struct notifier_block *nb); | ||
91 | |||
92 | /** | 72 | /** |
93 | * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. | 73 | * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. |
94 | * | 74 | * |
@@ -129,7 +109,7 @@ static inline void eeh_remove_device(struct pci_dev *dev) { } | |||
129 | #define EEH_IO_ERROR_VALUE(size) (-1UL) | 109 | #define EEH_IO_ERROR_VALUE(size) (-1UL) |
130 | #endif /* CONFIG_EEH */ | 110 | #endif /* CONFIG_EEH */ |
131 | 111 | ||
132 | /* | 112 | /* |
133 | * MMIO read/write operations with EEH support. | 113 | * MMIO read/write operations with EEH support. |
134 | */ | 114 | */ |
135 | static inline u8 eeh_readb(const volatile void __iomem *addr) | 115 | static inline u8 eeh_readb(const volatile void __iomem *addr) |
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index 4c18a5cb69f5..1a7e0afa2dc6 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define _PPC64_MMU_H_ | 14 | #define _PPC64_MMU_H_ |
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <asm/ppc_asm.h> /* for ASM_CONST */ | 17 | #include <asm/asm-compat.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | 19 | ||
20 | /* | 20 | /* |
@@ -224,9 +224,12 @@ extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
224 | unsigned long pstart, unsigned long mode, | 224 | unsigned long pstart, unsigned long mode, |
225 | int psize); | 225 | int psize); |
226 | 226 | ||
227 | extern void htab_initialize(void); | ||
228 | extern void htab_initialize_secondary(void); | ||
227 | extern void hpte_init_native(void); | 229 | extern void hpte_init_native(void); |
228 | extern void hpte_init_lpar(void); | 230 | extern void hpte_init_lpar(void); |
229 | extern void hpte_init_iSeries(void); | 231 | extern void hpte_init_iSeries(void); |
232 | extern void mm_init_ppc64(void); | ||
230 | 233 | ||
231 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | 234 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, |
232 | unsigned long va, unsigned long prpn, | 235 | unsigned long va, unsigned long prpn, |
@@ -245,6 +248,7 @@ extern long iSeries_hpte_insert(unsigned long hpte_group, | |||
245 | 248 | ||
246 | extern void stabs_alloc(void); | 249 | extern void stabs_alloc(void); |
247 | extern void slb_initialize(void); | 250 | extern void slb_initialize(void); |
251 | extern void stab_initialize(unsigned long stab); | ||
248 | 252 | ||
249 | #endif /* __ASSEMBLY__ */ | 253 | #endif /* __ASSEMBLY__ */ |
250 | 254 | ||
diff --git a/include/asm-ppc64/mmzone.h b/include/asm-ppc64/mmzone.h index 80a708e7093a..15e777ce0f4a 100644 --- a/include/asm-ppc64/mmzone.h +++ b/include/asm-ppc64/mmzone.h | |||
@@ -33,6 +33,9 @@ extern int numa_cpu_lookup_table[]; | |||
33 | extern char *numa_memory_lookup_table; | 33 | extern char *numa_memory_lookup_table; |
34 | extern cpumask_t numa_cpumask_lookup_table[]; | 34 | extern cpumask_t numa_cpumask_lookup_table[]; |
35 | extern int nr_cpus_in_node[]; | 35 | extern int nr_cpus_in_node[]; |
36 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
37 | extern unsigned long max_pfn; | ||
38 | #endif | ||
36 | 39 | ||
37 | /* 16MB regions */ | 40 | /* 16MB regions */ |
38 | #define MEMORY_INCREMENT_SHIFT 24 | 41 | #define MEMORY_INCREMENT_SHIFT 24 |
@@ -45,6 +48,11 @@ static inline int pa_to_nid(unsigned long pa) | |||
45 | { | 48 | { |
46 | int nid; | 49 | int nid; |
47 | 50 | ||
51 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
52 | /* kludge hot added sections default to node 0 */ | ||
53 | if (pa >= (max_pfn << PAGE_SHIFT)) | ||
54 | return 0; | ||
55 | #endif | ||
48 | nid = numa_memory_lookup_table[pa >> MEMORY_INCREMENT_SHIFT]; | 56 | nid = numa_memory_lookup_table[pa >> MEMORY_INCREMENT_SHIFT]; |
49 | 57 | ||
50 | #ifdef DEBUG_NUMA | 58 | #ifdef DEBUG_NUMA |
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index 82ce187e5be8..e32f1187aa29 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | #include <asm/ppc_asm.h> /* for ASM_CONST */ | 14 | #include <asm/asm-compat.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * We support either 4k or 64k software page size. When using 64k pages | 17 | * We support either 4k or 64k software page size. When using 64k pages |
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index 60cf8c838af0..efbdaece0cf0 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h | |||
@@ -63,7 +63,6 @@ struct pci_dn { | |||
63 | int devfn; /* for pci devices */ | 63 | int devfn; /* for pci devices */ |
64 | int eeh_mode; /* See eeh.h for possible EEH_MODEs */ | 64 | int eeh_mode; /* See eeh.h for possible EEH_MODEs */ |
65 | int eeh_config_addr; | 65 | int eeh_config_addr; |
66 | int eeh_capable; /* from firmware */ | ||
67 | int eeh_check_count; /* # times driver ignored error */ | 66 | int eeh_check_count; /* # times driver ignored error */ |
68 | int eeh_freeze_count; /* # times this device froze up. */ | 67 | int eeh_freeze_count; /* # times this device froze up. */ |
69 | int eeh_is_bridge; /* device is pci-to-pci bridge */ | 68 | int eeh_is_bridge; /* device is pci-to-pci bridge */ |
diff --git a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h index 98da0e4262bd..dcf3622d1946 100644 --- a/include/asm-ppc64/pgalloc.h +++ b/include/asm-ppc64/pgalloc.h | |||
@@ -10,8 +10,8 @@ extern kmem_cache_t *pgtable_cache[]; | |||
10 | 10 | ||
11 | #ifdef CONFIG_PPC_64K_PAGES | 11 | #ifdef CONFIG_PPC_64K_PAGES |
12 | #define PTE_CACHE_NUM 0 | 12 | #define PTE_CACHE_NUM 0 |
13 | #define PMD_CACHE_NUM 0 | 13 | #define PMD_CACHE_NUM 1 |
14 | #define PGD_CACHE_NUM 1 | 14 | #define PGD_CACHE_NUM 2 |
15 | #else | 15 | #else |
16 | #define PTE_CACHE_NUM 0 | 16 | #define PTE_CACHE_NUM 0 |
17 | #define PMD_CACHE_NUM 1 | 17 | #define PMD_CACHE_NUM 1 |
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h index 76bb0266d67c..ddfe186589fa 100644 --- a/include/asm-ppc64/prom.h +++ b/include/asm-ppc64/prom.h | |||
@@ -204,6 +204,8 @@ extern void of_detach_node(const struct device_node *); | |||
204 | extern unsigned long prom_init(unsigned long, unsigned long, unsigned long, | 204 | extern unsigned long prom_init(unsigned long, unsigned long, unsigned long, |
205 | unsigned long, unsigned long); | 205 | unsigned long, unsigned long); |
206 | extern void finish_device_tree(void); | 206 | extern void finish_device_tree(void); |
207 | extern void unflatten_device_tree(void); | ||
208 | extern void early_init_devtree(void *); | ||
207 | extern int device_is_compatible(struct device_node *device, const char *); | 209 | extern int device_is_compatible(struct device_node *device, const char *); |
208 | extern int machine_is_compatible(const char *compat); | 210 | extern int machine_is_compatible(const char *compat); |
209 | extern unsigned char *get_property(struct device_node *node, const char *name, | 211 | extern unsigned char *get_property(struct device_node *node, const char *name, |
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h deleted file mode 100644 index 432df7dd355d..000000000000 --- a/include/asm-ppc64/signal.h +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | #ifndef _ASMPPC64_SIGNAL_H | ||
2 | #define _ASMPPC64_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/compiler.h> | ||
6 | #include <asm/siginfo.h> | ||
7 | |||
8 | /* Avoid too many header ordering problems. */ | ||
9 | struct siginfo; | ||
10 | |||
11 | #define _NSIG 64 | ||
12 | #define _NSIG_BPW 64 | ||
13 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
14 | |||
15 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
16 | |||
17 | typedef struct { | ||
18 | unsigned long sig[_NSIG_WORDS]; | ||
19 | } sigset_t; | ||
20 | |||
21 | #define SIGHUP 1 | ||
22 | #define SIGINT 2 | ||
23 | #define SIGQUIT 3 | ||
24 | #define SIGILL 4 | ||
25 | #define SIGTRAP 5 | ||
26 | #define SIGABRT 6 | ||
27 | #define SIGIOT 6 | ||
28 | #define SIGBUS 7 | ||
29 | #define SIGFPE 8 | ||
30 | #define SIGKILL 9 | ||
31 | #define SIGUSR1 10 | ||
32 | #define SIGSEGV 11 | ||
33 | #define SIGUSR2 12 | ||
34 | #define SIGPIPE 13 | ||
35 | #define SIGALRM 14 | ||
36 | #define SIGTERM 15 | ||
37 | #define SIGSTKFLT 16 | ||
38 | #define SIGCHLD 17 | ||
39 | #define SIGCONT 18 | ||
40 | #define SIGSTOP 19 | ||
41 | #define SIGTSTP 20 | ||
42 | #define SIGTTIN 21 | ||
43 | #define SIGTTOU 22 | ||
44 | #define SIGURG 23 | ||
45 | #define SIGXCPU 24 | ||
46 | #define SIGXFSZ 25 | ||
47 | #define SIGVTALRM 26 | ||
48 | #define SIGPROF 27 | ||
49 | #define SIGWINCH 28 | ||
50 | #define SIGIO 29 | ||
51 | #define SIGPOLL SIGIO | ||
52 | /* | ||
53 | #define SIGLOST 29 | ||
54 | */ | ||
55 | #define SIGPWR 30 | ||
56 | #define SIGSYS 31 | ||
57 | #define SIGUNUSED 31 | ||
58 | |||
59 | /* These should not be considered constants from userland. */ | ||
60 | #define SIGRTMIN 32 | ||
61 | #define SIGRTMAX _NSIG | ||
62 | |||
63 | /* | ||
64 | * SA_FLAGS values: | ||
65 | * | ||
66 | * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). | ||
67 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
68 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
69 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
70 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
71 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
72 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
73 | * | ||
74 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
75 | * Unix names RESETHAND and NODEFER respectively. | ||
76 | */ | ||
77 | #define SA_NOCLDSTOP 0x00000001u | ||
78 | #define SA_NOCLDWAIT 0x00000002u | ||
79 | #define SA_SIGINFO 0x00000004u | ||
80 | #define SA_ONSTACK 0x08000000u | ||
81 | #define SA_RESTART 0x10000000u | ||
82 | #define SA_NODEFER 0x40000000u | ||
83 | #define SA_RESETHAND 0x80000000u | ||
84 | |||
85 | #define SA_NOMASK SA_NODEFER | ||
86 | #define SA_ONESHOT SA_RESETHAND | ||
87 | #define SA_INTERRUPT 0x20000000u /* dummy -- ignored */ | ||
88 | |||
89 | #define SA_RESTORER 0x04000000u | ||
90 | |||
91 | /* | ||
92 | * sigaltstack controls | ||
93 | */ | ||
94 | #define SS_ONSTACK 1 | ||
95 | #define SS_DISABLE 2 | ||
96 | |||
97 | #define MINSIGSTKSZ 2048 | ||
98 | #define SIGSTKSZ 8192 | ||
99 | |||
100 | #include <asm-generic/signal.h> | ||
101 | |||
102 | struct old_sigaction { | ||
103 | __sighandler_t sa_handler; | ||
104 | old_sigset_t sa_mask; | ||
105 | unsigned long sa_flags; | ||
106 | __sigrestore_t sa_restorer; | ||
107 | }; | ||
108 | |||
109 | struct sigaction { | ||
110 | __sighandler_t sa_handler; | ||
111 | unsigned long sa_flags; | ||
112 | __sigrestore_t sa_restorer; | ||
113 | sigset_t sa_mask; /* mask last for extensibility */ | ||
114 | }; | ||
115 | |||
116 | struct k_sigaction { | ||
117 | struct sigaction sa; | ||
118 | }; | ||
119 | |||
120 | typedef struct sigaltstack { | ||
121 | void __user *ss_sp; | ||
122 | int ss_flags; | ||
123 | size_t ss_size; | ||
124 | } stack_t; | ||
125 | |||
126 | struct pt_regs; | ||
127 | struct timespec; | ||
128 | extern int do_signal(sigset_t *oldset, struct pt_regs *regs); | ||
129 | extern int do_signal32(sigset_t *oldset, struct pt_regs *regs); | ||
130 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
131 | |||
132 | #endif /* _ASMPPC64_SIGNAL_H */ | ||
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index 0cdd66c9f4b7..bf9a6aba19c9 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h | |||
@@ -149,6 +149,8 @@ struct thread_struct; | |||
149 | extern struct task_struct * _switch(struct thread_struct *prev, | 149 | extern struct task_struct * _switch(struct thread_struct *prev, |
150 | struct thread_struct *next); | 150 | struct thread_struct *next); |
151 | 151 | ||
152 | extern unsigned long klimit; | ||
153 | |||
152 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ | 154 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ |
153 | 155 | ||
154 | /* | 156 | /* |