x86: fix long standing bug with usb after hibernation with 4GB ram
authorPavel Machek <pavel@ucw.cz>
Thu, 13 Mar 2008 22:05:41 +0000 (23:05 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 21 Mar 2008 16:06:15 +0000 (17:06 +0100)
aperture_64.c takes a piece of memory and makes it into iommu
window... but such window may not be saved by swsusp -- that leads to
oops during hibernation.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/aperture_64.c

index 608152a2a05ea0931512542999272a9716562e9a..00df126169b488c046612ebcbaa8b9b2eab20b30 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/pci.h>
 #include <linux/bitops.h>
 #include <linux/ioport.h>
+#include <linux/suspend.h>
 #include <asm/e820.h>
 #include <asm/io.h>
 #include <asm/gart.h>
@@ -76,6 +77,8 @@ static u32 __init allocate_aperture(void)
        printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n",
                        aper_size >> 10, __pa(p));
        insert_aperture_resource((u32)__pa(p), aper_size);
+       register_nosave_region((u32)__pa(p) >> PAGE_SHIFT,
+                               (u32)__pa(p+aper_size) >> PAGE_SHIFT);
 
        return (u32)__pa(p);
 }