diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 07:31:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:08 -0500 |
commit | 833d8469b102365f427f7791e79ec1843ff5f164 (patch) | |
tree | 7f3ac89dd2f445e86339166a66287be1a74253c1 /include/asm-x86/system_64.h | |
parent | 62fe164c5b036f4bdb19fbfb8f18a75631e67eee (diff) |
x86: unify smp parts of system.h
The memory barrier parts of system.h are not very different between
i386 and x86_64, the main difference being the availability of
instructions, which we handle with the use of ifdefs.
They are consolidated in system.h file, and then removed from
the arch-specific headers.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/system_64.h')
-rw-r--r-- | include/asm-x86/system_64.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h index 560470ea27c8..9def35eb75e3 100644 --- a/include/asm-x86/system_64.h +++ b/include/asm-x86/system_64.h | |||
@@ -48,31 +48,6 @@ | |||
48 | 48 | ||
49 | #endif /* __KERNEL__ */ | 49 | #endif /* __KERNEL__ */ |
50 | 50 | ||
51 | #ifdef CONFIG_SMP | ||
52 | #define smp_mb() mb() | ||
53 | #define smp_rmb() barrier() | ||
54 | #define smp_wmb() barrier() | ||
55 | #define smp_read_barrier_depends() do {} while(0) | ||
56 | #else | ||
57 | #define smp_mb() barrier() | ||
58 | #define smp_rmb() barrier() | ||
59 | #define smp_wmb() barrier() | ||
60 | #define smp_read_barrier_depends() do {} while(0) | ||
61 | #endif | ||
62 | |||
63 | |||
64 | /* | ||
65 | * Force strict CPU ordering. | ||
66 | * And yes, this is required on UP too when we're talking | ||
67 | * to devices. | ||
68 | */ | ||
69 | #define mb() asm volatile("mfence":::"memory") | ||
70 | #define rmb() asm volatile("lfence":::"memory") | ||
71 | #define wmb() asm volatile("sfence" ::: "memory") | ||
72 | |||
73 | #define read_barrier_depends() do {} while(0) | ||
74 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) | ||
75 | |||
76 | static inline unsigned long read_cr8(void) | 51 | static inline unsigned long read_cr8(void) |
77 | { | 52 | { |
78 | unsigned long cr8; | 53 | unsigned long cr8; |