diff options
author | Andi Kleen <ak@suse.de> | 2006-08-30 13:37:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-30 19:05:15 -0400 |
commit | 8c74932779fc6f61b4c30145863a17125c1a296c (patch) | |
tree | 664c5c1ea4674ec35dbc499294c3830f8176fb43 /include/asm-i386/alternative.h | |
parent | 841be8ddf92578e5b481ed9f9abb85649fc13238 (diff) |
[PATCH] i386: Remove alternative_smp
The .fill causes miscompilations with some binutils version.
Instead just patch the lock prefix in the lock constructs. That is the
majority of the cost and should be good enough.
Cc: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386/alternative.h')
-rw-r--r-- | include/asm-i386/alternative.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h index bb3b6317c810..b01a7ec409ce 100644 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h | |||
@@ -88,9 +88,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
88 | /* | 88 | /* |
89 | * Alternative inline assembly for SMP. | 89 | * Alternative inline assembly for SMP. |
90 | * | 90 | * |
91 | * alternative_smp() takes two versions (SMP first, UP second) and is | ||
92 | * for more complex stuff such as spinlocks. | ||
93 | * | ||
94 | * The LOCK_PREFIX macro defined here replaces the LOCK and | 91 | * The LOCK_PREFIX macro defined here replaces the LOCK and |
95 | * LOCK_PREFIX macros used everywhere in the source tree. | 92 | * LOCK_PREFIX macros used everywhere in the source tree. |
96 | * | 93 | * |
@@ -110,21 +107,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
110 | */ | 107 | */ |
111 | 108 | ||
112 | #ifdef CONFIG_SMP | 109 | #ifdef CONFIG_SMP |
113 | #define alternative_smp(smpinstr, upinstr, args...) \ | ||
114 | asm volatile ("661:\n\t" smpinstr "\n662:\n" \ | ||
115 | ".section .smp_altinstructions,\"a\"\n" \ | ||
116 | " .align 4\n" \ | ||
117 | " .long 661b\n" /* label */ \ | ||
118 | " .long 663f\n" /* new instruction */ \ | ||
119 | " .byte " __stringify(X86_FEATURE_UP) "\n" \ | ||
120 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
121 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
122 | ".previous\n" \ | ||
123 | ".section .smp_altinstr_replacement,\"awx\"\n" \ | ||
124 | "663:\n\t" upinstr "\n" /* replacement */ \ | ||
125 | "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \ | ||
126 | ".previous" : args) | ||
127 | |||
128 | #define LOCK_PREFIX \ | 110 | #define LOCK_PREFIX \ |
129 | ".section .smp_locks,\"a\"\n" \ | 111 | ".section .smp_locks,\"a\"\n" \ |
130 | " .align 4\n" \ | 112 | " .align 4\n" \ |
@@ -133,8 +115,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
133 | "661:\n\tlock; " | 115 | "661:\n\tlock; " |
134 | 116 | ||
135 | #else /* ! CONFIG_SMP */ | 117 | #else /* ! CONFIG_SMP */ |
136 | #define alternative_smp(smpinstr, upinstr, args...) \ | ||
137 | asm volatile (upinstr : args) | ||
138 | #define LOCK_PREFIX "" | 118 | #define LOCK_PREFIX "" |
139 | #endif | 119 | #endif |
140 | 120 | ||