diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 13:31:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 13:31:12 -0400 |
commit | 3e370b29d35fb01bfb92c2814d6f79bf6a2cb970 (patch) | |
tree | 3b8fb467d60bfe6a34686f4abdc3a60050ba40a4 /include/asm-powerpc/synch.h | |
parent | 88d1dce3a74367291f65a757fbdcaf17f042f30c (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Conflicts:
drivers/pci/quirks.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-powerpc/synch.h')
-rw-r--r-- | include/asm-powerpc/synch.h | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/include/asm-powerpc/synch.h b/include/asm-powerpc/synch.h index 2cda3c38a9fa..45963e80f557 100644 --- a/include/asm-powerpc/synch.h +++ b/include/asm-powerpc/synch.h | |||
@@ -3,34 +3,42 @@ | |||
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #include <linux/stringify.h> | 5 | #include <linux/stringify.h> |
6 | #include <asm/feature-fixups.h> | ||
6 | 7 | ||
7 | #ifdef __powerpc64__ | 8 | #ifndef __ASSEMBLY__ |
8 | #define __SUBARCH_HAS_LWSYNC | 9 | extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup; |
9 | #endif | 10 | extern void do_lwsync_fixups(unsigned long value, void *fixup_start, |
11 | void *fixup_end); | ||
12 | |||
13 | static inline void eieio(void) | ||
14 | { | ||
15 | __asm__ __volatile__ ("eieio" : : : "memory"); | ||
16 | } | ||
17 | |||
18 | static inline void isync(void) | ||
19 | { | ||
20 | __asm__ __volatile__ ("isync" : : : "memory"); | ||
21 | } | ||
22 | #endif /* __ASSEMBLY__ */ | ||
10 | 23 | ||
11 | #ifdef __SUBARCH_HAS_LWSYNC | 24 | #if defined(__powerpc64__) |
12 | # define LWSYNC lwsync | 25 | # define LWSYNC lwsync |
26 | #elif defined(CONFIG_E500) | ||
27 | # define LWSYNC \ | ||
28 | START_LWSYNC_SECTION(96); \ | ||
29 | sync; \ | ||
30 | MAKE_LWSYNC_SECTION_ENTRY(96, __lwsync_fixup); | ||
13 | #else | 31 | #else |
14 | # define LWSYNC sync | 32 | # define LWSYNC sync |
15 | #endif | 33 | #endif |
16 | 34 | ||
17 | #ifdef CONFIG_SMP | 35 | #ifdef CONFIG_SMP |
18 | #define ISYNC_ON_SMP "\n\tisync\n" | 36 | #define ISYNC_ON_SMP "\n\tisync\n" |
19 | #define LWSYNC_ON_SMP __stringify(LWSYNC) "\n" | 37 | #define LWSYNC_ON_SMP stringify_in_c(LWSYNC) "\n" |
20 | #else | 38 | #else |
21 | #define ISYNC_ON_SMP | 39 | #define ISYNC_ON_SMP |
22 | #define LWSYNC_ON_SMP | 40 | #define LWSYNC_ON_SMP |
23 | #endif | 41 | #endif |
24 | 42 | ||
25 | static inline void eieio(void) | ||
26 | { | ||
27 | __asm__ __volatile__ ("eieio" : : : "memory"); | ||
28 | } | ||
29 | |||
30 | static inline void isync(void) | ||
31 | { | ||
32 | __asm__ __volatile__ ("isync" : : : "memory"); | ||
33 | } | ||
34 | |||
35 | #endif /* __KERNEL__ */ | 43 | #endif /* __KERNEL__ */ |
36 | #endif /* _ASM_POWERPC_SYNCH_H */ | 44 | #endif /* _ASM_POWERPC_SYNCH_H */ |