Commit d288e1cf authored by Fenghua Yu's avatar Fenghua Yu Committed by H. Peter Anvin

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: default avatarFenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1356075872-3054-4-git-send-email-fenghua.yu@intel.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 9cd4d78e
...@@ -190,6 +190,14 @@ extern void init_amd_cacheinfo(struct cpuinfo_x86 *c); ...@@ -190,6 +190,14 @@ extern void init_amd_cacheinfo(struct cpuinfo_x86 *c);
extern void detect_extended_topology(struct cpuinfo_x86 *c); extern void detect_extended_topology(struct cpuinfo_x86 *c);
extern void detect_ht(struct cpuinfo_x86 *c); extern void detect_ht(struct cpuinfo_x86 *c);
#ifdef CONFIG_X86_32
extern int have_cpuid_p(void);
#else
static inline int have_cpuid_p(void)
{
return 1;
}
#endif
static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx) unsigned int *ecx, unsigned int *edx)
{ {
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/pat.h> #include <asm/pat.h>
#include <asm/microcode.h>
#include <asm/microcode_intel.h>
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
#include <asm/uv/uv.h> #include <asm/uv/uv.h>
...@@ -213,7 +215,7 @@ static inline int flag_is_changeable_p(u32 flag) ...@@ -213,7 +215,7 @@ static inline int flag_is_changeable_p(u32 flag)
} }
/* Probe for the CPUID instruction */ /* Probe for the CPUID instruction */
static int __cpuinit have_cpuid_p(void) int __cpuinit have_cpuid_p(void)
{ {
return flag_is_changeable_p(X86_EFLAGS_ID); return flag_is_changeable_p(X86_EFLAGS_ID);
} }
...@@ -249,11 +251,6 @@ static inline int flag_is_changeable_p(u32 flag) ...@@ -249,11 +251,6 @@ static inline int flag_is_changeable_p(u32 flag)
{ {
return 1; return 1;
} }
/* Probe for the CPUID instruction */
static inline int have_cpuid_p(void)
{
return 1;
}
static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c) static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment