diff options
author | Dave Hansen <dave.hansen@linux.intel.com> | 2014-09-11 17:15:11 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-09-11 17:30:01 -0400 |
commit | c8128cceb4f4b02c53096cb173628184c7e9bc36 (patch) | |
tree | 670940085ab481430428d4ff707566a8dae734e7 | |
parent | 2ce7598c9a453e0acd0e07be7be3f5eb39608ebd (diff) |
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: Dave Hansen <dave.hansen@linux.intel.com>
Link: http://lkml.kernel.org/r/20140911211511.AD76E774@viggo.jf.intel.com
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/machine_kexec_32.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb9b258d60e7..7b508758dfad 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -300,7 +300,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; | |||
300 | #define cpu_has_de boot_cpu_has(X86_FEATURE_DE) | 300 | #define cpu_has_de boot_cpu_has(X86_FEATURE_DE) |
301 | #define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE) | 301 | #define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE) |
302 | #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) | 302 | #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) |
303 | #define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE) | ||
304 | #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) | 303 | #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) |
305 | #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) | 304 | #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) |
306 | #define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) | 305 | #define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) |
@@ -358,9 +357,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; | |||
358 | #undef cpu_has_vme | 357 | #undef cpu_has_vme |
359 | #define cpu_has_vme 0 | 358 | #define cpu_has_vme 0 |
360 | 359 | ||
361 | #undef cpu_has_pae | ||
362 | #define cpu_has_pae ___BUG___ | ||
363 | |||
364 | #undef cpu_has_k6_mtrr | 360 | #undef cpu_has_k6_mtrr |
365 | #define cpu_has_k6_mtrr 0 | 361 | #define cpu_has_k6_mtrr 0 |
366 | 362 | ||
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 1667b1de8d5d..72e8e310258d 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
@@ -247,7 +247,8 @@ void machine_kexec(struct kimage *image) | |||
247 | /* now call it */ | 247 | /* now call it */ |
248 | image->start = relocate_kernel_ptr((unsigned long)image->head, | 248 | image->start = relocate_kernel_ptr((unsigned long)image->head, |
249 | (unsigned long)page_list, | 249 | (unsigned long)page_list, |
250 | image->start, cpu_has_pae, | 250 | image->start, |
251 | boot_cpu_has(X86_FEATURE_PAE), | ||
251 | image->preserve_context); | 252 | image->preserve_context); |
252 | 253 | ||
253 | #ifdef CONFIG_KEXEC_JUMP | 254 | #ifdef CONFIG_KEXEC_JUMP |