Re: BIOS overwritten during resume (was: Re: Asus L5D resume on battery power)

From: Rafael J. Wysocki
Date: Sun Mar 06 2005 - 16:53:58 EST


Hi,

On Sunday, 6 of March 2005 20:41, Pavel Machek wrote:
> Hi!
> > > > Yes. I thought about using PG_nosave in the begining, but there's a
> > > >
> > > > BUG_ON(PageReserved(page) && PageNosave(page));
> > > >
> > > > in swsusp.c:saveable() that I just didn't want to trigger. It seems to me,
> > > > though, that we don't need it any more, do we?
> > >
> > > No, we can just kill it. It was "if something unexpected happens, bail
> > > out soon".
> >
> > OK
> >
> > The following is what I'm comfortable with. I didn't took the Nigel's patch
> > literally, because we do one thing differently (ie nosave pfns) and it contained
> > some changes that I thought were unnecessary. The i386 part is
> > untested.
>
> I'd add
>
> > page = pfn_to_page(pfn);
> > - BUG_ON(PageReserved(page) && PageNosave(page));
>
> a comment here explaining what PageReserved && PageNosave means.

OK, I will add the comment.

> > if (PageNosave(page))
> > return 0;
> > +
> > if (PageReserved(page) && pfn_is_nosave(pfn)) {
> > pr_debug("[nosave pfn 0x%lx]", pfn);
> > return 0;
>
> AFAICT it only fixes "potential" bug, so it can probably wait. Once
> non-contiguous and initramfs patches are in, this can go...

OK

Greets,
Rafael


--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/