diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-07-21 11:11:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:12 -0400 |
commit | 1c10070a55a38ad8489df8afd52c9a3ffd46bbb5 (patch) | |
tree | e4c1ab4e436fbc3345cb465c8c896153f6a33ff3 /include/asm-i386/e820.h | |
parent | 114ab8e99c52828b37c994f580e39ce341c17d3b (diff) |
i386: do not restore reserved memory after hibernation
On some systems the ACPI NVS area is located in the first 1 MB of RAM and
it is overwritten by the i386 code during the restore after hibernation.
This confuses the ACPI platform firmware that doesn't update the AC adapter
status appropriately as a result
(http://bugzilla.kernel.org/show_bug.cgi?id=7995).
The solution is to register the reserved memory in the first 1 MB as
'nosave', so that swsusp doesn't touch it during the restore. Also, this
has been done on x86_64 for a long time now, so this patch makes the i386
restore code behave like the x86_64 one.
[akpm@linux-foundation.org: build fix]
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-i386/e820.h')
-rw-r--r-- | include/asm-i386/e820.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h index c03290ccecb2..43114c824608 100644 --- a/include/asm-i386/e820.h +++ b/include/asm-i386/e820.h | |||
@@ -47,6 +47,14 @@ extern void e820_register_memory(void); | |||
47 | extern void limit_regions(unsigned long long size); | 47 | extern void limit_regions(unsigned long long size); |
48 | extern void print_memory_map(char *who); | 48 | extern void print_memory_map(char *who); |
49 | 49 | ||
50 | #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) | ||
51 | extern void e820_mark_nosave_regions(void); | ||
52 | #else | ||
53 | static inline void e820_mark_nosave_regions(void) | ||
54 | { | ||
55 | } | ||
56 | #endif | ||
57 | |||
50 | #endif/*!__ASSEMBLY__*/ | 58 | #endif/*!__ASSEMBLY__*/ |
51 | 59 | ||
52 | #endif/*__E820_HEADER*/ | 60 | #endif/*__E820_HEADER*/ |