diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:19:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:19:14 -0400 |
commit | 867a89e0b73af48838c7987e80899a1ff26dd6ff (patch) | |
tree | b4a8830b3e880b9a5133ad1ec3106665819cc8d4 /include/asm-powerpc | |
parent | 44473d991332053eb3fea1e08f8a6ee2c6fb409c (diff) | |
parent | 6c39103ce5192bdb2195f3daab7323dfa44fb52e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[RAPIDIO] Change RapidIO doorbell source and target ID field to 16-bit
[RAPIDIO] Add RapidIO connection info print out and re-training for broken connections
[RAPIDIO] Add serial RapidIO controller support, which includes MPC8548, MPC8641
[RAPIDIO] Add RapidIO node probing into MPC86xx_HPCN board id table
[RAPIDIO] Add RapidIO node into MPC8641HPCN dts file
[RAPIDIO] Auto-probe the RapidIO system size
[RAPIDIO] Add OF-tree support to RapidIO controller driver
[RAPIDIO] Add RapidIO multi mport support
[RAPIDIO] Move include/asm-ppc/rio.h to asm-powerpc
[RAPIDIO] Add RapidIO option to kernel configuration
[RAPIDIO] Change RIO function mpc85xx_ to fsl_
[POWERPC] Provide walk_memory_resource() for powerpc
[POWERPC] Update lmb data structures for hotplug memory add/remove
[POWERPC] Hotplug memory remove notifications for powerpc
[POWERPC] windfarm: Add PowerMac 12,1 support
[POWERPC] Fix building of pmac32 when CONFIG_NVRAM=m
[POWERPC] Add IRQSTACKS support on ppc32
[POWERPC] Use __always_inline for xchg* and cmpxchg*
[POWERPC] Add fast little-endian switch system call
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/processor.h | 6 | ||||
-rw-r--r-- | include/asm-powerpc/rio.h | 18 | ||||
-rw-r--r-- | include/asm-powerpc/system.h | 24 |
3 files changed, 36 insertions, 12 deletions
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index fd98ca998b4f..cf83f2d7e2a5 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -138,6 +138,8 @@ typedef struct { | |||
138 | 138 | ||
139 | struct thread_struct { | 139 | struct thread_struct { |
140 | unsigned long ksp; /* Kernel stack pointer */ | 140 | unsigned long ksp; /* Kernel stack pointer */ |
141 | unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */ | ||
142 | |||
141 | #ifdef CONFIG_PPC64 | 143 | #ifdef CONFIG_PPC64 |
142 | unsigned long ksp_vsid; | 144 | unsigned long ksp_vsid; |
143 | #endif | 145 | #endif |
@@ -182,11 +184,14 @@ struct thread_struct { | |||
182 | #define ARCH_MIN_TASKALIGN 16 | 184 | #define ARCH_MIN_TASKALIGN 16 |
183 | 185 | ||
184 | #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) | 186 | #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) |
187 | #define INIT_SP_LIMIT \ | ||
188 | (_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack) | ||
185 | 189 | ||
186 | 190 | ||
187 | #ifdef CONFIG_PPC32 | 191 | #ifdef CONFIG_PPC32 |
188 | #define INIT_THREAD { \ | 192 | #define INIT_THREAD { \ |
189 | .ksp = INIT_SP, \ | 193 | .ksp = INIT_SP, \ |
194 | .ksp_limit = INIT_SP_LIMIT, \ | ||
190 | .fs = KERNEL_DS, \ | 195 | .fs = KERNEL_DS, \ |
191 | .pgdir = swapper_pg_dir, \ | 196 | .pgdir = swapper_pg_dir, \ |
192 | .fpexc_mode = MSR_FE0 | MSR_FE1, \ | 197 | .fpexc_mode = MSR_FE0 | MSR_FE1, \ |
@@ -194,6 +199,7 @@ struct thread_struct { | |||
194 | #else | 199 | #else |
195 | #define INIT_THREAD { \ | 200 | #define INIT_THREAD { \ |
196 | .ksp = INIT_SP, \ | 201 | .ksp = INIT_SP, \ |
202 | .ksp_limit = INIT_SP_LIMIT, \ | ||
197 | .regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \ | 203 | .regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \ |
198 | .fs = KERNEL_DS, \ | 204 | .fs = KERNEL_DS, \ |
199 | .fpr = {0}, \ | 205 | .fpr = {0}, \ |
diff --git a/include/asm-powerpc/rio.h b/include/asm-powerpc/rio.h new file mode 100644 index 000000000000..0018bf80cb25 --- /dev/null +++ b/include/asm-powerpc/rio.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * RapidIO architecture support | ||
3 | * | ||
4 | * Copyright 2005 MontaVista Software, Inc. | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef ASM_PPC_RIO_H | ||
14 | #define ASM_PPC_RIO_H | ||
15 | |||
16 | extern void platform_rio_init(void); | ||
17 | |||
18 | #endif /* ASM_PPC_RIO_H */ | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index fab1674b31b6..2b6559a6d113 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -204,7 +204,7 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */ | |||
204 | * Changes the memory location '*ptr' to be val and returns | 204 | * Changes the memory location '*ptr' to be val and returns |
205 | * the previous value stored there. | 205 | * the previous value stored there. |
206 | */ | 206 | */ |
207 | static __inline__ unsigned long | 207 | static __always_inline unsigned long |
208 | __xchg_u32(volatile void *p, unsigned long val) | 208 | __xchg_u32(volatile void *p, unsigned long val) |
209 | { | 209 | { |
210 | unsigned long prev; | 210 | unsigned long prev; |
@@ -229,7 +229,7 @@ __xchg_u32(volatile void *p, unsigned long val) | |||
229 | * Changes the memory location '*ptr' to be val and returns | 229 | * Changes the memory location '*ptr' to be val and returns |
230 | * the previous value stored there. | 230 | * the previous value stored there. |
231 | */ | 231 | */ |
232 | static __inline__ unsigned long | 232 | static __always_inline unsigned long |
233 | __xchg_u32_local(volatile void *p, unsigned long val) | 233 | __xchg_u32_local(volatile void *p, unsigned long val) |
234 | { | 234 | { |
235 | unsigned long prev; | 235 | unsigned long prev; |
@@ -247,7 +247,7 @@ __xchg_u32_local(volatile void *p, unsigned long val) | |||
247 | } | 247 | } |
248 | 248 | ||
249 | #ifdef CONFIG_PPC64 | 249 | #ifdef CONFIG_PPC64 |
250 | static __inline__ unsigned long | 250 | static __always_inline unsigned long |
251 | __xchg_u64(volatile void *p, unsigned long val) | 251 | __xchg_u64(volatile void *p, unsigned long val) |
252 | { | 252 | { |
253 | unsigned long prev; | 253 | unsigned long prev; |
@@ -266,7 +266,7 @@ __xchg_u64(volatile void *p, unsigned long val) | |||
266 | return prev; | 266 | return prev; |
267 | } | 267 | } |
268 | 268 | ||
269 | static __inline__ unsigned long | 269 | static __always_inline unsigned long |
270 | __xchg_u64_local(volatile void *p, unsigned long val) | 270 | __xchg_u64_local(volatile void *p, unsigned long val) |
271 | { | 271 | { |
272 | unsigned long prev; | 272 | unsigned long prev; |
@@ -290,7 +290,7 @@ __xchg_u64_local(volatile void *p, unsigned long val) | |||
290 | */ | 290 | */ |
291 | extern void __xchg_called_with_bad_pointer(void); | 291 | extern void __xchg_called_with_bad_pointer(void); |
292 | 292 | ||
293 | static __inline__ unsigned long | 293 | static __always_inline unsigned long |
294 | __xchg(volatile void *ptr, unsigned long x, unsigned int size) | 294 | __xchg(volatile void *ptr, unsigned long x, unsigned int size) |
295 | { | 295 | { |
296 | switch (size) { | 296 | switch (size) { |
@@ -305,7 +305,7 @@ __xchg(volatile void *ptr, unsigned long x, unsigned int size) | |||
305 | return x; | 305 | return x; |
306 | } | 306 | } |
307 | 307 | ||
308 | static __inline__ unsigned long | 308 | static __always_inline unsigned long |
309 | __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) | 309 | __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) |
310 | { | 310 | { |
311 | switch (size) { | 311 | switch (size) { |
@@ -338,7 +338,7 @@ __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) | |||
338 | */ | 338 | */ |
339 | #define __HAVE_ARCH_CMPXCHG 1 | 339 | #define __HAVE_ARCH_CMPXCHG 1 |
340 | 340 | ||
341 | static __inline__ unsigned long | 341 | static __always_inline unsigned long |
342 | __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) | 342 | __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) |
343 | { | 343 | { |
344 | unsigned int prev; | 344 | unsigned int prev; |
@@ -361,7 +361,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) | |||
361 | return prev; | 361 | return prev; |
362 | } | 362 | } |
363 | 363 | ||
364 | static __inline__ unsigned long | 364 | static __always_inline unsigned long |
365 | __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, | 365 | __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, |
366 | unsigned long new) | 366 | unsigned long new) |
367 | { | 367 | { |
@@ -384,7 +384,7 @@ __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, | |||
384 | } | 384 | } |
385 | 385 | ||
386 | #ifdef CONFIG_PPC64 | 386 | #ifdef CONFIG_PPC64 |
387 | static __inline__ unsigned long | 387 | static __always_inline unsigned long |
388 | __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) | 388 | __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) |
389 | { | 389 | { |
390 | unsigned long prev; | 390 | unsigned long prev; |
@@ -406,7 +406,7 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) | |||
406 | return prev; | 406 | return prev; |
407 | } | 407 | } |
408 | 408 | ||
409 | static __inline__ unsigned long | 409 | static __always_inline unsigned long |
410 | __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, | 410 | __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, |
411 | unsigned long new) | 411 | unsigned long new) |
412 | { | 412 | { |
@@ -432,7 +432,7 @@ __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, | |||
432 | if something tries to do an invalid cmpxchg(). */ | 432 | if something tries to do an invalid cmpxchg(). */ |
433 | extern void __cmpxchg_called_with_bad_pointer(void); | 433 | extern void __cmpxchg_called_with_bad_pointer(void); |
434 | 434 | ||
435 | static __inline__ unsigned long | 435 | static __always_inline unsigned long |
436 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, | 436 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, |
437 | unsigned int size) | 437 | unsigned int size) |
438 | { | 438 | { |
@@ -448,7 +448,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, | |||
448 | return old; | 448 | return old; |
449 | } | 449 | } |
450 | 450 | ||
451 | static __inline__ unsigned long | 451 | static __always_inline unsigned long |
452 | __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, | 452 | __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, |
453 | unsigned int size) | 453 | unsigned int size) |
454 | { | 454 | { |