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/i386/kernel/setup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff -puN arch/i386/kernel/setup.c~swsusp-i386-mark-special-saveable-unsaveable-pages-fix arch/i386/kernel/setup.c --- devel/arch/i386/kernel/setup.c~swsusp-i386-mark-special-saveable-unsaveable-pages-fix 2006-05-17 13:09:46.000000000 -0700 +++ devel-akpm/arch/i386/kernel/setup.c 2006-05-17 13:09:46.000000000 -0700 @@ -1480,8 +1480,8 @@ static void __init e820_save_acpi_pages( struct e820entry *ei = &e820.map[i]; unsigned long start, end; - start = PFN_DOWN(ei->addr); - end = PFN_UP(ei->addr + ei->size); + start = ei->addr; + end = ei->addr + ei->size; if (start >= end) continue; if (ei->type != E820_ACPI && ei->type != E820_NVS) @@ -1490,15 +1490,15 @@ static void __init e820_save_acpi_pages( * If the region is below max_low_pfn, it will be * saved/restored by swsusp follow 'RAM' type. */ - if (start < max_low_pfn) - start = max_low_pfn; + if (start < (max_low_pfn << PAGE_SHIFT)) + start = max_low_pfn << PAGE_SHIFT; /* * Highmem pages (ACPI NVS/Data) are reserved, but swsusp * highmem save/restore will not save/restore them. We marked * them as arch saveable pages here */ if (end > start) - swsusp_add_arch_pages(start, end - 1); + swsusp_add_arch_pages(start, end); } } _