[PATCH urgent] x86: Save cr4 to mmu_cr4_features at boot time

From: Stefano Stabellini
Date: Thu Mar 31 2011 - 12:38:22 EST


Save cr4 to mmu_cr4_features at boot time

This patch fixes a freeze when resuming from hibernation, introduced by
"x86: Cleanup highmap after brk is concluded", commit id
e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e.
This patch should be backported to all the stable tree where the
offending commit is present.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Tested-by: Michael Leun <lkml20101129@xxxxxxxxxxxxxxx>
CC: Yinghai Lu <yinghai@xxxxxxxxxx>
CC: stable <stable@xxxxxxxxxx>

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 5a0484a..0943eb2 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -891,6 +891,7 @@ void __init setup_arch(char **cmdline_p)
max_low_pfn = max_pfn;

high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
+ mmu_cr4_features = read_cr4();
#endif

/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/