x86, sleep: Always save the value of EFER
authorH. Peter Anvin <hpa@zytor.com>
Fri, 13 Nov 2009 23:28:14 +0000 (15:28 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 16 Nov 2009 21:44:57 +0000 (13:44 -0800)
commita7c4c0d934c6cbc58de262d090d4a715445453f0
treef321fc60984d17c57a65bac6820a12b61d6ed8d4
parent8a50e5135af0c243e117e94e27feb8d149c879b4
x86, sleep: Always save the value of EFER

Always save the value of EFER, regardless of the state of NX.  Since
EFER may not actually exist, use rdmsr_safe() to do so.

v2: check the return value from rdmsr_safe() instead of relying on
    the output values being unchanged on error.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@tuxonice.net>
LKML-Reference: <1258154897-6770-3-git-send-email-hpa@zytor.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
arch/x86/kernel/acpi/sleep.c