x86, hibernate: Initialize mmu_cr4_features during boot
authorH. Peter Anvin <hpa@linux.intel.com>
Thu, 7 Apr 2011 21:15:48 +0000 (18:15 -0300)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Fri, 8 Apr 2011 16:28:31 +0000 (09:28 -0700)
commit60d3abc3a55c37376c989e65f87fe25f78281793
treed5c5290458108ec50bacd157cb3c2d3aff09eecd
parentb7376a455e455f0738bc193e03c85a15997a31f3
x86, hibernate: Initialize mmu_cr4_features during boot

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 <hpa@linux.intel.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <201104020154.57136.rjw@sisk.pl>
(cherry picked from commit 4da9484bdece39ab0b098fa711e095e3e9fc8684)
Tested-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/752870
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/x86/kernel/setup.c