diff options
author | Pavel Machek <pavel@ucw.cz> | 2008-03-13 18:05:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-03-21 12:06:15 -0400 |
commit | 2050d45d7c32cbad7a070d04256237144a0920db (patch) | |
tree | 7eb2999908d05c1dcb1b7aca416cd3aef88de58f /arch | |
parent | 96bcf458cbc71fc08f4d10e0b5bf1b18702b2344 (diff) |
x86: fix long standing bug with usb after hibernation with 4GB ram
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/aperture_64.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 608152a2a05e..00df126169b4 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/suspend.h> | ||
21 | #include <asm/e820.h> | 22 | #include <asm/e820.h> |
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/gart.h> | 24 | #include <asm/gart.h> |
@@ -76,6 +77,8 @@ static u32 __init allocate_aperture(void) | |||
76 | printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n", | 77 | printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n", |
77 | aper_size >> 10, __pa(p)); | 78 | aper_size >> 10, __pa(p)); |
78 | insert_aperture_resource((u32)__pa(p), aper_size); | 79 | insert_aperture_resource((u32)__pa(p), aper_size); |
80 | register_nosave_region((u32)__pa(p) >> PAGE_SHIFT, | ||
81 | (u32)__pa(p+aper_size) >> PAGE_SHIFT); | ||
79 | 82 | ||
80 | return (u32)__pa(p); | 83 | return (u32)__pa(p); |
81 | } | 84 | } |