aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2012-12-21 02:44:23 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-31 16:18:58 -0500
commitd288e1cf8e62f3e4034f1f021f047009c4ac0b3c (patch)
tree2f0a2076fabb4435c1b5830f845d33f61c21c659
parent9cd4d78e21cfdc709b1af516214ec4f69ee0e6bd (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.h8
-rw-r--r--arch/x86/kernel/cpu/common.c9
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);
190extern void detect_extended_topology(struct cpuinfo_x86 *c); 190extern void detect_extended_topology(struct cpuinfo_x86 *c);
191extern void detect_ht(struct cpuinfo_x86 *c); 191extern void detect_ht(struct cpuinfo_x86 *c);
192 192
193#ifdef CONFIG_X86_32
194extern int have_cpuid_p(void);
195#else
196static inline int have_cpuid_p(void)
197{
198 return 1;
199}
200#endif
193static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, 201static 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 */
216static int __cpuinit have_cpuid_p(void) 218int __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 */
253static inline int have_cpuid_p(void)
254{
255 return 1;
256}
257static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c) 254static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
258{ 255{
259} 256}