From: Shaohua Li Architecture special saveable memory might not be aligned to PAGE_SIZE. We should just save part of a page in the unaligned case. We changed swsusp_add_arch_pages to accept an 'address' instead of a 'pfn'. Signed-off-by: Shaohua Li Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Nigel Cunningham Signed-off-by: Andrew Morton --- arch/x86_64/kernel/setup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff -puN arch/x86_64/kernel/setup.c~swsusp-x86_64-mark-special-saveable-unsaveable-pages-fix arch/x86_64/kernel/setup.c --- devel/arch/x86_64/kernel/setup.c~swsusp-x86_64-mark-special-saveable-unsaveable-pages-fix 2006-05-19 16:00:37.000000000 -0700 +++ devel-akpm/arch/x86_64/kernel/setup.c 2006-05-19 16:00:37.000000000 -0700 @@ -573,8 +573,8 @@ static void __init e820_save_acpi_pages( struct e820entry *ei = &e820.map[i]; unsigned long start, end; - start = round_down(ei->addr, PAGE_SIZE) >> PAGE_SHIFT; - end = round_up(ei->addr + ei->size, PAGE_SIZE) >> PAGE_SHIFT; + start = ei->addr, PAGE_SIZE; + end = ei->addr + ei->size; if (start >= end) continue; if (ei->type != E820_ACPI && ei->type != E820_NVS) @@ -583,10 +583,10 @@ static void __init e820_save_acpi_pages( * If the region is below end_pfn, it will be * saved/restored by swsusp follow 'RAM' type. */ - if (start < end_pfn) - start = end_pfn; + if (start < (end_pfn << PAGE_SHIFT)) + start = end_pfn << PAGE_SHIFT; if (end > start) - swsusp_add_arch_pages(start, end - 1); + swsusp_add_arch_pages(start, end); } } _