Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/common.c: Make have_cpuid_p() a global function

Remove static declaration in have_cpuid_p() to make it a global function. The
function will be called in early loading microcode.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1356075872-3054-4-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

authored by

Fenghua Yu and committed by
H. Peter Anvin
d288e1cf 9cd4d78e

+11 -6
+8
arch/x86/include/asm/processor.h
··· 190 190 extern void detect_extended_topology(struct cpuinfo_x86 *c); 191 191 extern void detect_ht(struct cpuinfo_x86 *c); 192 192 193 + #ifdef CONFIG_X86_32 194 + extern int have_cpuid_p(void); 195 + #else 196 + static inline int have_cpuid_p(void) 197 + { 198 + return 1; 199 + } 200 + #endif 193 201 static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, 194 202 unsigned int *ecx, unsigned int *edx) 195 203 {
+3 -6
arch/x86/kernel/cpu/common.c
··· 37 37 #include <asm/mce.h> 38 38 #include <asm/msr.h> 39 39 #include <asm/pat.h> 40 + #include <asm/microcode.h> 41 + #include <asm/microcode_intel.h> 40 42 41 43 #ifdef CONFIG_X86_LOCAL_APIC 42 44 #include <asm/uv/uv.h> ··· 215 213 } 216 214 217 215 /* Probe for the CPUID instruction */ 218 - static int __cpuinit have_cpuid_p(void) 216 + int __cpuinit have_cpuid_p(void) 219 217 { 220 218 return flag_is_changeable_p(X86_EFLAGS_ID); 221 219 } ··· 248 246 __setup("serialnumber", x86_serial_nr_setup); 249 247 #else 250 248 static inline int flag_is_changeable_p(u32 flag) 251 - { 252 - return 1; 253 - } 254 - /* Probe for the CPUID instruction */ 255 - static inline int have_cpuid_p(void) 256 249 { 257 250 return 1; 258 251 }