* [PATCH] swsuspend breakage in 2.6.17-git
@ 2006-06-25 14:05 Daniel Ritz
2006-06-25 16:46 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Ritz @ 2006-06-25 14:05 UTC (permalink / raw)
To: Shaohua Li, Pavel Machek, Rafael J. Wysocki
Cc: linux-kernel, Andrew Morton, Linus Torvalds
hello
commit b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c:
[PATCH] swsusp: i386 mark special saveable/unsaveable pages
breaks swsusp for me with a page fault in kernel/power/snapshot.c:save_arch_mem()
the following patch makes suspend-resume working again, but some
problems still remain: fan goes on and stays on after resume (same as
in bug #5000). i guess this is a due to a change in ACPI which i still
have to track down along with the problem that acpi is not powering-off
my other laptop anymore...
comments?
rgds
-daniel
[PATCH] fix swsuspend breakage in 2.6.17-git
trying to save ACPI NVS pages leads to a pagefault on a toshiba
tecra 8000 notebook. back out saving those.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index e602397..c0bdf47 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1490,7 +1490,7 @@ static void __init e820_save_acpi_pages(
end = ei->addr + ei->size;
if (start >= end)
continue;
- if (ei->type != E820_ACPI && ei->type != E820_NVS)
+ if (ei->type != E820_ACPI)
continue;
/*
* If the region is below max_low_pfn, it will be
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swsuspend breakage in 2.6.17-git
2006-06-25 14:05 [PATCH] swsuspend breakage in 2.6.17-git Daniel Ritz
@ 2006-06-25 16:46 ` Linus Torvalds
2006-06-26 1:26 ` Shaohua Li
0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2006-06-25 16:46 UTC (permalink / raw)
To: Daniel Ritz
Cc: Shaohua Li, Pavel Machek, Rafael J. Wysocki, linux-kernel, Andrew Morton
On Sun, 25 Jun 2006, Daniel Ritz wrote:
>
> commit b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c:
> [PATCH] swsusp: i386 mark special saveable/unsaveable pages
> breaks swsusp for me with a page fault in kernel/power/snapshot.c:save_arch_mem()
>
> the following patch makes suspend-resume working again, but some
> problems still remain: fan goes on and stays on after resume (same as
> in bug #5000). i guess this is a due to a change in ACPI which i still
> have to track down along with the problem that acpi is not powering-off
> my other laptop anymore...
>
> comments?
Looking at that whole commit, it looks bogus.
The rule about ACPI memory (whether NVS or not) according to what I have
seen is that the OS is _not_ supposed to touch that memory except through
ACPI routines.
So saving and restoring those pages sounds really really wrong in the
first place. We have no idea what current state it could screw up.
Shaohua?
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swsuspend breakage in 2.6.17-git
2006-06-25 16:46 ` Linus Torvalds
@ 2006-06-26 1:26 ` Shaohua Li
2006-06-26 1:49 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2006-06-26 1:26 UTC (permalink / raw)
To: Linus Torvalds
Cc: Daniel Ritz, Pavel Machek, Rafael J. Wysocki, linux-kernel,
Andrew Morton
On Sun, 2006-06-25 at 09:46 -0700, Linus Torvalds wrote:
>
> On Sun, 25 Jun 2006, Daniel Ritz wrote:
> >
> > commit b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c:
> > [PATCH] swsusp: i386 mark special saveable/unsaveable pages
> > breaks swsusp for me with a page fault in kernel/power/snapshot.c:save_arch_mem()
> >
> > the following patch makes suspend-resume working again, but some
> > problems still remain: fan goes on and stays on after resume (same as
> > in bug #5000). i guess this is a due to a change in ACPI which i still
> > have to track down along with the problem that acpi is not powering-off
> > my other laptop anymore...
> >
> > comments?
>
> Looking at that whole commit, it looks bogus.
>
> The rule about ACPI memory (whether NVS or not) according to what I have
> seen is that the OS is _not_ supposed to touch that memory except through
> ACPI routines.
>
> So saving and restoring those pages sounds really really wrong in the
> first place. We have no idea what current state it could screw up.
Below is from ACPI spec 3.0 (p405). From my understanding, OS should
save/restore NVS memory ?
ACPI Non-Volatile-Sleeping Memory (NVS). Memory identified by the BIOS
as being reserved by the BIOS for its use. OSPM is required to tag this
memory as cacheable, and to save and restore its image before entering
an S4 state. Except as directed by control methods, OSPM is not allowed
to use this physical memory. OSPM will call the _PTS control method some
time before entering a sleeping state, to allow the platforms AML code
to update this memory image before entering the sleeping state. After
the system awakes from an S4 state, OSPM will restore this memory area
and call the _WAK control method to enable the BIOS to reclaim its
memory image.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] swsuspend breakage in 2.6.17-git
2006-06-26 1:26 ` Shaohua Li
@ 2006-06-26 1:49 ` Linus Torvalds
0 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2006-06-26 1:49 UTC (permalink / raw)
To: Shaohua Li
Cc: Daniel Ritz, Pavel Machek, Rafael J. Wysocki, linux-kernel,
Andrew Morton
On Mon, 26 Jun 2006, Shaohua Li wrote:
>
> Below is from ACPI spec 3.0 (p405). From my understanding, OS should
> save/restore NVS memory ?
Ok, that's what it looks like.
However, the patches clearly don't actually work right now.
I suspect part of the problem is that Linux will normally create the
"struct page *" array (and page tables) only for the pages marked as being
usable RAM, so when you start to try to save specialty pages, we won't
have page tables set up for them, nor will we have any "struct page" for
them either.
Also, clearly this also breaks other architectures.
So I'm reverting them from my tree for now, I just have to test that I got
it right first (there were some partial dependencies on the patches as
follow-on cleanups).
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-26 1:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-25 14:05 [PATCH] swsuspend breakage in 2.6.17-git Daniel Ritz
2006-06-25 16:46 ` Linus Torvalds
2006-06-26 1:26 ` Shaohua Li
2006-06-26 1:49 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®