All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: ncunningham@linuxmail.org
Cc: Pavel Machek <pavel@suse.cz>, Andi Kleen <ak@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	paul.devriendt@amd.com
Subject: Re: BIOS overwritten during resume (was: Re: Asus L5D resume on battery power)
Date: Sat, 5 Mar 2005 19:43:25 +0100	[thread overview]
Message-ID: <200503051943.25814.rjw@sisk.pl> (raw)
In-Reply-To: <1109946109.3772.267.camel@desktop.cunningham.myip.net.au>

Hi,

On Friday, 4 of March 2005 15:21, Nigel Cunningham wrote:
[-- snip --]
> 
> Will something like this patch help?
> 
[-- snip --]

I think that the changes below are unnecessary.  free_all_bootmem() is
actually called _before_ the loop in mem_init() in which PG_nosave is set for
the first time, so there's no need to clear it earlier.

> diff -ruNp 208-e820-table-support-old/mm/bootmem.c 208-e820-table-support-new/mm/bootmem.c
> --- 208-e820-table-support-old/mm/bootmem.c	2005-01-12 17:07:15.902387400 +1100
> +++ 208-e820-table-support-new/mm/bootmem.c	2005-01-12 17:23:44.087160480 +1100
> @@ -280,12 +280,14 @@ static unsigned long __init free_all_boo
>  
>  			count += BITS_PER_LONG;
>  			__ClearPageReserved(page);
> +			ClearPageNosave(page);
>  			order = ffs(BITS_PER_LONG) - 1;
>  			set_page_refs(page, order);
>  			for (j = 1; j < BITS_PER_LONG; j++) {
>  				if (j + 16 < BITS_PER_LONG)
>  					prefetchw(page + j + 16);
>  				__ClearPageReserved(page + j);
> +				ClearPageNosave(page + j);
>  			}
>  			__free_pages(page, order);
>  			i += BITS_PER_LONG;
> @@ -296,6 +298,7 @@ static unsigned long __init free_all_boo
>  				if (v & m) {
>  					count++;
>  					__ClearPageReserved(page);
> +					ClearPageNosave(page);
>  					set_page_refs(page, 0);
>  					__free_page(page);
>  				}
> @@ -316,6 +319,7 @@ static unsigned long __init free_all_boo
>  	for (i = 0; i < ((bdata->node_low_pfn-(bdata->node_boot_start >> PAGE_SHIFT))/8 + PAGE_SIZE-1)/PAGE_SIZE; i++,page++) {
>  		count++;
>  		__ClearPageReserved(page);
> +		ClearPageNosave(page);
>  		set_page_count(page, 1);
>  		__free_page(page);
>  	}

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"

      reply	other threads:[~2005-03-05 19:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-25 21:37 Asus L5D resume on battery power Rafael J. Wysocki
     [not found] ` <20050227170253.GH1441@elf.ucw.cz>
     [not found]   ` <200502271919.45767.rjw@sisk.pl>
     [not found]     ` <200503022250.12823.rjw@sisk.pl>
2005-03-02 22:05       ` BIOS overwritten during resume (was: Re: Asus L5D resume on battery power) Pavel Machek
2005-03-02 23:47         ` Rafael J. Wysocki
2005-03-02 23:54           ` Pavel Machek
2005-03-03  8:02             ` Rafael J. Wysocki
2005-03-04 11:04               ` Pavel Machek
2005-03-04 13:15                 ` Rafael J. Wysocki
2005-03-04 14:44                   ` Nigel Cunningham
2005-03-04 20:11                   ` Pavel Machek
2005-03-04 23:26                     ` Rafael J. Wysocki
2005-03-04 23:37                       ` Nigel Cunningham
2005-03-05  0:51                         ` Bernard Blackham
2005-03-04 23:41                       ` Pavel Machek
2005-03-05  1:10                         ` Nigel Cunningham
2005-03-05  9:08                           ` Rafael J. Wysocki
2005-03-06 17:29                         ` Rafael J. Wysocki
2005-03-06 19:41                           ` Pavel Machek
2005-03-06 21:53                             ` Rafael J. Wysocki
2005-03-04 14:21                 ` Nigel Cunningham
2005-03-05 18:43                   ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503051943.25814.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncunningham@linuxmail.org \
    --cc=paul.devriendt@amd.com \
    --cc=pavel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.