diff options
Diffstat (limited to 'include/asm-x86_64/alternative.h')
-rw-r--r-- | include/asm-x86_64/alternative.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h index 709ad3f0d354..a584826cc570 100644 --- a/include/asm-x86_64/alternative.h +++ b/include/asm-x86_64/alternative.h | |||
@@ -103,9 +103,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
103 | /* | 103 | /* |
104 | * Alternative inline assembly for SMP. | 104 | * Alternative inline assembly for SMP. |
105 | * | 105 | * |
106 | * alternative_smp() takes two versions (SMP first, UP second) and is | ||
107 | * for more complex stuff such as spinlocks. | ||
108 | * | ||
109 | * The LOCK_PREFIX macro defined here replaces the LOCK and | 106 | * The LOCK_PREFIX macro defined here replaces the LOCK and |
110 | * LOCK_PREFIX macros used everywhere in the source tree. | 107 | * LOCK_PREFIX macros used everywhere in the source tree. |
111 | * | 108 | * |
@@ -125,21 +122,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
125 | */ | 122 | */ |
126 | 123 | ||
127 | #ifdef CONFIG_SMP | 124 | #ifdef CONFIG_SMP |
128 | #define alternative_smp(smpinstr, upinstr, args...) \ | ||
129 | asm volatile ("661:\n\t" smpinstr "\n662:\n" \ | ||
130 | ".section .smp_altinstructions,\"a\"\n" \ | ||
131 | " .align 8\n" \ | ||
132 | " .quad 661b\n" /* label */ \ | ||
133 | " .quad 663f\n" /* new instruction */ \ | ||
134 | " .byte " __stringify(X86_FEATURE_UP) "\n" \ | ||
135 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
136 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
137 | ".previous\n" \ | ||
138 | ".section .smp_altinstr_replacement,\"awx\"\n" \ | ||
139 | "663:\n\t" upinstr "\n" /* replacement */ \ | ||
140 | "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \ | ||
141 | ".previous" : args) | ||
142 | |||
143 | #define LOCK_PREFIX \ | 125 | #define LOCK_PREFIX \ |
144 | ".section .smp_locks,\"a\"\n" \ | 126 | ".section .smp_locks,\"a\"\n" \ |
145 | " .align 8\n" \ | 127 | " .align 8\n" \ |
@@ -148,8 +130,6 @@ static inline void alternatives_smp_switch(int smp) {} | |||
148 | "661:\n\tlock; " | 130 | "661:\n\tlock; " |
149 | 131 | ||
150 | #else /* ! CONFIG_SMP */ | 132 | #else /* ! CONFIG_SMP */ |
151 | #define alternative_smp(smpinstr, upinstr, args...) \ | ||
152 | asm volatile (upinstr : args) | ||
153 | #define LOCK_PREFIX "" | 133 | #define LOCK_PREFIX "" |
154 | #endif | 134 | #endif |
155 | 135 | ||