* fix aperture vs. suspend problem
@ 2008-03-13 10:05 Pavel Machek
2008-03-13 20:31 ` Rafael J. Wysocki
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Pavel Machek @ 2008-03-13 10:05 UTC (permalink / raw)
To: ak, kernel list, Ingo Molnar, Rafael J. Wysocki, Len Brown
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 suspend.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 608152a..88747f3 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -18,6 +18,7 @@ #include <linux/pci_ids.h>
#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,7 @@ 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);
}
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: fix aperture vs. suspend problem
2008-03-13 10:05 fix aperture vs. suspend problem Pavel Machek
@ 2008-03-13 20:31 ` Rafael J. Wysocki
2008-03-13 22:32 ` Andrew Morton
2008-03-21 12:59 ` Ingo Molnar
2 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2008-03-13 20:31 UTC (permalink / raw)
To: Pavel Machek; +Cc: ak, kernel list, Ingo Molnar, Len Brown, Andrew Morton
On Thursday, 13 of March 2008, Pavel Machek wrote:
>
> 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 suspend.
>
> Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 608152a..88747f3 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -18,6 +18,7 @@ #include <linux/pci_ids.h>
> #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,7 @@ 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);
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix aperture vs. suspend problem
2008-03-13 10:05 fix aperture vs. suspend problem Pavel Machek
2008-03-13 20:31 ` Rafael J. Wysocki
@ 2008-03-13 22:32 ` Andrew Morton
2008-03-13 22:38 ` Pavel Machek
2008-03-21 12:59 ` Ingo Molnar
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2008-03-13 22:32 UTC (permalink / raw)
To: Pavel Machek; +Cc: ak, linux-kernel, mingo, rjw, len.brown, stable
On Thu, 13 Mar 2008 11:05:31 +0100
Pavel Machek <pavel@ucw.cz> wrote:
>
> 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 suspend.
>
> Signed-off-by: Pavel Machek <pavel@suse.cz>
>
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 608152a..88747f3 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -18,6 +18,7 @@ #include <linux/pci_ids.h>
> #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,7 @@ 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);
> }
>
This is also needed in 2.6.24, perhaps earlier?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix aperture vs. suspend problem
2008-03-13 22:32 ` Andrew Morton
@ 2008-03-13 22:38 ` Pavel Machek
2008-03-14 8:14 ` Romano Giannetti
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Machek @ 2008-03-13 22:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: ak, linux-kernel, mingo, rjw, len.brown, stable
On Thu 2008-03-13 15:32:48, Andrew Morton wrote:
> On Thu, 13 Mar 2008 11:05:31 +0100
> Pavel Machek <pavel@ucw.cz> wrote:
>
> >
> > 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 suspend.
> >
> > Signed-off-by: Pavel Machek <pavel@suse.cz>
> >
> > diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> > index 608152a..88747f3 100644
> > --- a/arch/x86/kernel/aperture_64.c
> > +++ b/arch/x86/kernel/aperture_64.c
> > @@ -18,6 +18,7 @@ #include <linux/pci_ids.h>
> > #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,7 @@ 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);
> > }
> >
>
> This is also needed in 2.6.24, perhaps earlier?
It seems to only trigger on >3GB boxes, during swsusp. People are not
normally suspending those big boxes. I do not think this is worth
backporting.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les: http://www.ujezdskystrom.info/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix aperture vs. suspend problem
2008-03-13 22:38 ` Pavel Machek
@ 2008-03-14 8:14 ` Romano Giannetti
2008-03-14 19:30 ` Pavel Machek
0 siblings, 1 reply; 7+ messages in thread
From: Romano Giannetti @ 2008-03-14 8:14 UTC (permalink / raw)
To: Pavel Machek
Cc: Andrew Morton, ak, linux-kernel, mingo, rjw, len.brown, stable
On Thu, 2008-03-13 at 23:38 +0100, Pavel Machek wrote:
> On Thu 2008-03-13 15:32:48, Andrew Morton wrote:
> > [...]
> > This is also needed in 2.6.24, perhaps earlier?
>
> It seems to only trigger on >3GB boxes, during swsusp. People are not
> normally suspending those big boxes. I do not think this is worth
> backporting.
Here vendors are starting to sell x86_64 laptops with 4GB ram in the
*default* configuration --- so I think that yes, it should be
backported, at least to 2.6.24 (which will be heavily shipped by distros
this year, I suppose).
Romano
--
Sorry for the disclaimer --- ¡I cannot stop it!
--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.
This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix aperture vs. suspend problem
2008-03-14 8:14 ` Romano Giannetti
@ 2008-03-14 19:30 ` Pavel Machek
0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2008-03-14 19:30 UTC (permalink / raw)
To: Romano Giannetti
Cc: Andrew Morton, ak, linux-kernel, mingo, rjw, len.brown, stable
On Fri 2008-03-14 09:14:23, Romano Giannetti wrote:
>
>
> On Thu, 2008-03-13 at 23:38 +0100, Pavel Machek wrote:
> > On Thu 2008-03-13 15:32:48, Andrew Morton wrote:
> > > [...]
> > > This is also needed in 2.6.24, perhaps earlier?
> >
> > It seems to only trigger on >3GB boxes, during swsusp. People are not
> > normally suspending those big boxes. I do not think this is worth
> > backporting.
>
> Here vendors are starting to sell x86_64 laptops with 4GB ram in the
> *default* configuration --- so I think that yes, it should be
> backported, at least to 2.6.24 (which will be heavily shipped by distros
> this year, I suppose).
Ok, if you hit the problem, you can do the backport. Subject is wrong,
it hits hibernation, not suspend (sorry), and I'm not yet sure if I
fixed all the related problems. Testing welcome.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les: http://www.ujezdskystrom.info/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix aperture vs. suspend problem
2008-03-13 10:05 fix aperture vs. suspend problem Pavel Machek
2008-03-13 20:31 ` Rafael J. Wysocki
2008-03-13 22:32 ` Andrew Morton
@ 2008-03-21 12:59 ` Ingo Molnar
2 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2008-03-21 12:59 UTC (permalink / raw)
To: Pavel Machek; +Cc: ak, kernel list, Rafael J. Wysocki, Len Brown
* Pavel Machek <pavel@ucw.cz> wrote:
> 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 suspend.
nice catch! applied.
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-03-21 13:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13 10:05 fix aperture vs. suspend problem Pavel Machek
2008-03-13 20:31 ` Rafael J. Wysocki
2008-03-13 22:32 ` Andrew Morton
2008-03-13 22:38 ` Pavel Machek
2008-03-14 8:14 ` Romano Giannetti
2008-03-14 19:30 ` Pavel Machek
2008-03-21 12:59 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.