|
@@ -88,9 +88,6 @@ static inline void alternatives_smp_switch(int smp) {}
|
|
/*
|
|
/*
|
|
* Alternative inline assembly for SMP.
|
|
* Alternative inline assembly for SMP.
|
|
*
|
|
*
|
|
- * alternative_smp() takes two versions (SMP first, UP second) and is
|
|
|
|
- * for more complex stuff such as spinlocks.
|
|
|
|
- *
|
|
|
|
* The LOCK_PREFIX macro defined here replaces the LOCK and
|
|
* The LOCK_PREFIX macro defined here replaces the LOCK and
|
|
* LOCK_PREFIX macros used everywhere in the source tree.
|
|
* LOCK_PREFIX macros used everywhere in the source tree.
|
|
*
|
|
*
|
|
@@ -110,21 +107,6 @@ static inline void alternatives_smp_switch(int smp) {}
|
|
*/
|
|
*/
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
-#define alternative_smp(smpinstr, upinstr, args...) \
|
|
|
|
- asm volatile ("661:\n\t" smpinstr "\n662:\n" \
|
|
|
|
- ".section .smp_altinstructions,\"a\"\n" \
|
|
|
|
- " .align 4\n" \
|
|
|
|
- " .long 661b\n" /* label */ \
|
|
|
|
- " .long 663f\n" /* new instruction */ \
|
|
|
|
- " .byte " __stringify(X86_FEATURE_UP) "\n" \
|
|
|
|
- " .byte 662b-661b\n" /* sourcelen */ \
|
|
|
|
- " .byte 664f-663f\n" /* replacementlen */ \
|
|
|
|
- ".previous\n" \
|
|
|
|
- ".section .smp_altinstr_replacement,\"awx\"\n" \
|
|
|
|
- "663:\n\t" upinstr "\n" /* replacement */ \
|
|
|
|
- "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \
|
|
|
|
- ".previous" : args)
|
|
|
|
-
|
|
|
|
#define LOCK_PREFIX \
|
|
#define LOCK_PREFIX \
|
|
".section .smp_locks,\"a\"\n" \
|
|
".section .smp_locks,\"a\"\n" \
|
|
" .align 4\n" \
|
|
" .align 4\n" \
|
|
@@ -133,8 +115,6 @@ static inline void alternatives_smp_switch(int smp) {}
|
|
"661:\n\tlock; "
|
|
"661:\n\tlock; "
|
|
|
|
|
|
#else /* ! CONFIG_SMP */
|
|
#else /* ! CONFIG_SMP */
|
|
-#define alternative_smp(smpinstr, upinstr, args...) \
|
|
|
|
- asm volatile (upinstr : args)
|
|
|
|
#define LOCK_PREFIX ""
|
|
#define LOCK_PREFIX ""
|
|
#endif
|
|
#endif
|
|
|
|
|