diff options
| author | Fenghua Yu <fenghua.yu@intel.com> | 2012-12-21 02:44:23 -0500 |
|---|---|---|
| committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-31 16:18:58 -0500 |
| commit | d288e1cf8e62f3e4034f1f021f047009c4ac0b3c (patch) | |
| tree | 2f0a2076fabb4435c1b5830f845d33f61c21c659 | |
| parent | 9cd4d78e21cfdc709b1af516214ec4f69ee0e6bd (diff) | |
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>
| -rw-r--r-- | arch/x86/include/asm/processor.h | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/common.c | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index bdee8bd318ea..3cdf4aa4d23f 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
| @@ -190,6 +190,14 @@ extern void init_amd_cacheinfo(struct cpuinfo_x86 *c); | |||
| 190 | extern void detect_extended_topology(struct cpuinfo_x86 *c); | 190 | extern void detect_extended_topology(struct cpuinfo_x86 *c); |
| 191 | extern void detect_ht(struct cpuinfo_x86 *c); | 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 | static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, | 201 | static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, |
| 194 | unsigned int *ecx, unsigned int *edx) | 202 | unsigned int *ecx, unsigned int *edx) |
| 195 | { | 203 | { |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 9c3ab43a6954..d7fd2468752a 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -37,6 +37,8 @@ | |||
| 37 | #include <asm/mce.h> | 37 | #include <asm/mce.h> |
| 38 | #include <asm/msr.h> | 38 | #include <asm/msr.h> |
| 39 | #include <asm/pat.h> | 39 | #include <asm/pat.h> |
| 40 | #include <asm/microcode.h> | ||
| 41 | #include <asm/microcode_intel.h> | ||
| 40 | 42 | ||
| 41 | #ifdef CONFIG_X86_LOCAL_APIC | 43 | #ifdef CONFIG_X86_LOCAL_APIC |
| 42 | #include <asm/uv/uv.h> | 44 | #include <asm/uv/uv.h> |
| @@ -213,7 +215,7 @@ static inline int flag_is_changeable_p(u32 flag) | |||
| 213 | } | 215 | } |
| 214 | 216 | ||
| 215 | /* Probe for the CPUID instruction */ | 217 | /* Probe for the CPUID instruction */ |
| 216 | static int __cpuinit have_cpuid_p(void) | 218 | int __cpuinit have_cpuid_p(void) |
| 217 | { | 219 | { |
| 218 | return flag_is_changeable_p(X86_EFLAGS_ID); | 220 | return flag_is_changeable_p(X86_EFLAGS_ID); |
| 219 | } | 221 | } |
| @@ -249,11 +251,6 @@ static inline int flag_is_changeable_p(u32 flag) | |||
| 249 | { | 251 | { |
| 250 | return 1; | 252 | return 1; |
| 251 | } | 253 | } |
| 252 | /* Probe for the CPUID instruction */ | ||
| 253 | static inline int have_cpuid_p(void) | ||
| 254 | { | ||
| 255 | return 1; | ||
| 256 | } | ||
| 257 | static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c) | 254 | static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c) |
| 258 | { | 255 | { |
| 259 | } | 256 | } |
