diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-31 15:00:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-31 15:00:45 -0400 |
commit | 918d80a136430aeb23659aa75f8b415090500667 (patch) | |
tree | d11d394f63ed9ea0d1830b87cae6d5200501a7cd /arch/x86/boot | |
parent | 26a5c0dfbc9c4b1c455821c0a0ea6d6116082397 (diff) | |
parent | 69f2366c9456d0ce784cf5aba87ee77eeadc1d5e (diff) |
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cpu handling changes from Ingo Molnar:
"Bigger changes:
- Intel CPU hardware-enablement: new vector instructions support
(AVX-512), by Fenghua Yu.
- Support the clflushopt instruction and use it in appropriate
places. clflushopt is similar to clflush but with more relaxed
ordering, by Ross Zwisler.
- MSR accessor cleanups, by Borislav Petkov.
- 'forcepae' boot flag for those who have way too much time to spend
on way too old Pentium-M systems and want to live way too
dangerously, by Chris Bainbridge"
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, cpu: Add forcepae parameter for booting PAE kernels on PAE-disabled Pentium M
Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC
x86, intel: Make MSR_IA32_MISC_ENABLE bit constants systematic
x86, Intel: Convert to the new bit access MSR accessors
x86, AMD: Convert to the new bit access MSR accessors
x86: Add another set of MSR accessor functions
x86: Use clflushopt in drm_clflush_virt_range
x86: Use clflushopt in drm_clflush_page
x86: Use clflushopt in clflush_cache_range
x86: Add support for the clflushopt instruction
x86, AVX-512: Enable AVX-512 States Context Switch
x86, AVX-512: AVX-512 Feature Detection
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/cpucheck.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c index 100a9a10076a..f0d0b20fe149 100644 --- a/arch/x86/boot/cpucheck.c +++ b/arch/x86/boot/cpucheck.c | |||
@@ -67,6 +67,13 @@ static int is_transmeta(void) | |||
67 | cpu_vendor[2] == A32('M', 'x', '8', '6'); | 67 | cpu_vendor[2] == A32('M', 'x', '8', '6'); |
68 | } | 68 | } |
69 | 69 | ||
70 | static int is_intel(void) | ||
71 | { | ||
72 | return cpu_vendor[0] == A32('G', 'e', 'n', 'u') && | ||
73 | cpu_vendor[1] == A32('i', 'n', 'e', 'I') && | ||
74 | cpu_vendor[2] == A32('n', 't', 'e', 'l'); | ||
75 | } | ||
76 | |||
70 | /* Returns a bitmask of which words we have error bits in */ | 77 | /* Returns a bitmask of which words we have error bits in */ |
71 | static int check_cpuflags(void) | 78 | static int check_cpuflags(void) |
72 | { | 79 | { |
@@ -153,6 +160,19 @@ int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr) | |||
153 | asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx)); | 160 | asm("wrmsr" : : "a" (eax), "d" (edx), "c" (ecx)); |
154 | 161 | ||
155 | err = check_cpuflags(); | 162 | err = check_cpuflags(); |
163 | } else if (err == 0x01 && | ||
164 | !(err_flags[0] & ~(1 << X86_FEATURE_PAE)) && | ||
165 | is_intel() && cpu.level == 6 && | ||
166 | (cpu.model == 9 || cpu.model == 13)) { | ||
167 | /* PAE is disabled on this Pentium M but can be forced */ | ||
168 | if (cmdline_find_option_bool("forcepae")) { | ||
169 | puts("WARNING: Forcing PAE in CPU flags\n"); | ||
170 | set_bit(X86_FEATURE_PAE, cpu.flags); | ||
171 | err = check_cpuflags(); | ||
172 | } | ||
173 | else { | ||
174 | puts("WARNING: PAE disabled. Use parameter 'forcepae' to enable at your own risk!\n"); | ||
175 | } | ||
156 | } | 176 | } |
157 | 177 | ||
158 | if (err_flags_ptr) | 178 | if (err_flags_ptr) |