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().
Unified · Split
| @@ -1137,9 +1137,7 @@ void __init setup_arch(char **cmdline_p) · 1136 unmodified lines | |||
| 1137 | * auditing all the early-boot CR4 manipulation would be needed to | 1137 | * auditing all the early-boot CR4 manipulation would be needed to |
| 1138 | * rule it out. | 1138 | * rule it out. |
| 1139 | */ | 1139 | */ |
| 1140 | if (boot_cpu_data.cpuid_level >= 0) | 1140 | mmu_cr4_features = __read_cr4_safe(); |
| 1141 | /* A CPU has %cr4 if and only if it has CPUID. */ | ||
| 1142 | mmu_cr4_features = __read_cr4(); | ||
| 1143 | 1141 | ||
| 1144 | memblock_set_current_limit(get_max_mapped()); | 1142 | memblock_set_current_limit(get_max_mapped()); |
| 1145 | 1143 | ||