Skip to contentSkip to conversation

x86_64: mm fix x86 cpuid keys used in alternative_smp fix

PATCH In review Paul Jackson 2 participants 2 messages Aug 24, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: mm fix x86 cpuid keys used in alternative_smp fix

From: Paul Jackson <[email protected]>

The x86_64 crosstool build was failing due to:

  kernel/built-in.o(.smp_altinstructions+0x58): \
    include/asm/spinlock.h:54: undefined reference to `X86_FEATURE_UP'

This reference to X86_FEATURE_UP was added to the definition of the alternative_smp() macro in alternative.h by the patch:
x86_64-mm-fix-x86-cpuid-keys-used-in-alternative_smp

The alternative_smp() macro is used in spinlock.h.

The definition of X86_FEATURE_UP is in asm-x86_64/cpufeature.h. If this is included in alternative.h, then the build succeeds.

---

 include/asm-x86_64/alternative.h |    1 +
 1 files changed, 1 insertion(+)
include/asm-x86_64/alternative.h +1 -0
@@ -4,6 +4,7 @@
 #ifdef __KERNEL__
 
 #include <linux/types.h>
+#include <asm/cpufeature.h>
 
 struct alt_instr {
 	u8 *instr; 		/* original instruction */
Signature · 3 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401
#1 lore raw
Quoted 7 lines · Paul Jackson

From: Paul Jackson <[email protected]>

The x86_64 crosstool build was failing due to:

  kernel/built-in.o(.smp_altinstructions+0x58): \
    include/asm/spinlock.h:54: undefined reference to `X86_FEATURE_UP'
Quoted 8 lines

This reference to X86_FEATURE_UP was added to the definition of the alternative_smp() macro in alternative.h by the patch:
x86_64-mm-fix-x86-cpuid-keys-used-in-alternative_smp

The alternative_smp() macro is used in spinlock.h.

The definition of X86_FEATURE_UP is in asm-x86_64/cpufeature.h. If this is included in alternative.h, then the build succeeds.

Ok it seems to depend on the .config, but nobody before submitted the buggy .config

I folded the patch in

-Andi