From: H. Peter Anvin <[email protected]> commit 4da9484bdece39ab0b098fa711e095e3e9fc8684 upstream.
Restore the initialization of mmu_cr4_features during boot, which was removed without comment in checkin e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e x86: Cleanup highmap after brk is concluded thereby breaking resume from hibernate. This restores previous functionality in approximately the same place, and corrects the reading of %cr4 on pre-CPUID hardware (%cr4 exists if and only if CPUID is supported.) However, part of the problem is that the hibernate suspend/resume sequence should manage the save/restore of %cr4 explicitly. Signed-off-by: H. Peter Anvin <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Yinghai Lu <[email protected]> LKML-Reference: <[email protected]> --- arch/x86/kernel/setup.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index e543fe9..4e59873 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1013,6 +1013,11 @@ void __init setup_arch(char **cmdline_p) paging_init(); x86_init.paging.pagetable_setup_done(swapper_pg_dir); + if (boot_cpu_data.cpuid_level >= 0) { + /* A CPU has %cr4 if and only if it has CPUID */ + mmu_cr4_features = read_cr4(); + } + #ifdef CONFIG_X86_32 /* sync back kernel address range */ clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, -- 1.7.1 _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
