History

x86/boot: Fix another __read_cr4() case on 486

The condition for reading CR4 was wrong: there are some CPUs with CPUID but not CR4. Rather than trying to make the condition exact, use __read_cr4_safe().

Andy Lutomirski committed 10 years ago

Commit 192d1dc1 parent e1bfc111 file · +1 −3Browse files

Unified · Split

arch/x86/kernel/setup.c+1−3
@@ -1137,9 +1137,7 @@ void __init setup_arch(char **cmdline_p) · 1136 unmodified lines
11371137 * auditing all the early-boot CR4 manipulation would be needed to
11381138 * rule it out.
11391139 */
1140− if (boot_cpu_data.cpuid_level >= 0)
1141− /* A CPU has %cr4 if and only if it has CPUID. */
1142− mmu_cr4_features = __read_cr4();
1140+ mmu_cr4_features = __read_cr4_safe();
11431141
11441142 memblock_set_current_limit(get_max_mapped());
11451143