Commit c8128cce authored by Dave Hansen's avatar Dave Hansen Committed by H. Peter Anvin

x86: Axe the lightly-used cpu_has_pae

cpu_has_pae is only referenced in one place: the X86_32 kexec
code (in a file not even built on 64-bit).  It hardly warrants
its own macro, or the trouble we go to ensuring that it can't
be called in X86_64 code.

Axe the macro and replace it with a direct cpu feature check.
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: http://lkml.kernel.org/r/20140911211511.AD76E774@viggo.jf.intel.comAcked-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 2ce7598c
...@@ -300,7 +300,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; ...@@ -300,7 +300,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
#define cpu_has_de boot_cpu_has(X86_FEATURE_DE) #define cpu_has_de boot_cpu_has(X86_FEATURE_DE)
#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE) #define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
#define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE)
#define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE)
#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
#define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) #define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP)
...@@ -358,9 +357,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; ...@@ -358,9 +357,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
#undef cpu_has_vme #undef cpu_has_vme
#define cpu_has_vme 0 #define cpu_has_vme 0
#undef cpu_has_pae
#define cpu_has_pae ___BUG___
#undef cpu_has_k6_mtrr #undef cpu_has_k6_mtrr
#define cpu_has_k6_mtrr 0 #define cpu_has_k6_mtrr 0
......
...@@ -247,7 +247,8 @@ void machine_kexec(struct kimage *image) ...@@ -247,7 +247,8 @@ void machine_kexec(struct kimage *image)
/* now call it */ /* now call it */
image->start = relocate_kernel_ptr((unsigned long)image->head, image->start = relocate_kernel_ptr((unsigned long)image->head,
(unsigned long)page_list, (unsigned long)page_list,
image->start, cpu_has_pae, image->start,
boot_cpu_has(X86_FEATURE_PAE),
image->preserve_context); image->preserve_context);
#ifdef CONFIG_KEXEC_JUMP #ifdef CONFIG_KEXEC_JUMP
......
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