Subject: i386-do-not-restore-reserved-memory-after-hibernation-fix From: Andrew Morton SubmitChecklist, section 1. Cc: Andi Kleen Cc: David Rientjes Cc: Pavel Machek Cc: Rafael J. Wysocki Signed-off-by: Andrew Morton arch/i386/kernel/e820.c | 2 ++ include/asm-i386/e820.h | 7 +++++++ 2 files changed, 9 insertions(+) Index: linux-2.6.22/arch/i386/kernel/e820.c =================================================================== --- linux-2.6.22.orig/arch/i386/kernel/e820.c +++ linux-2.6.22/arch/i386/kernel/e820.c @@ -321,6 +321,7 @@ static int __init request_standard_resou subsys_initcall(request_standard_resources); +#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) /** * e820_mark_nosave_regions - Find the ranges of physical addresses that do not * correspond to e820 RAM areas and mark the corresponding pages as nosave for @@ -349,6 +350,7 @@ void __init e820_mark_nosave_regions(voi break; } } +#endif void __init add_memory_region(unsigned long long start, unsigned long long size, int type) Index: linux-2.6.22/include/asm-i386/e820.h =================================================================== --- linux-2.6.22.orig/include/asm-i386/e820.h +++ linux-2.6.22/include/asm-i386/e820.h @@ -44,7 +44,14 @@ extern void register_bootmem_low_pages(u extern void e820_register_memory(void); extern void limit_regions(unsigned long long size); extern void print_memory_map(char *who); + +#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) extern void e820_mark_nosave_regions(void); +#else +static inline void e820_mark_nosave_regions(void) +{ +} +#endif #endif/*!__ASSEMBLY__*/