public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* highmem handling again
@ 2004-08-08 19:23 Pavel Machek
  2004-08-08 19:55 ` Sam Ravnborg
  2004-08-09  8:27 ` Nigel Cunningham
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Machek @ 2004-08-08 19:23 UTC (permalink / raw)
  To: kernel list, Patrick Mochel

Hi!

I agree that swsusp_free is not the right place to restore_highmem(),
but I can't find "right" place to do it... Best I could come up is
with is:

It did not work at the end of swsusp_resume, or at the end of
swsusp_restore, IIRC.

								Pavel

--- clean-mm/kernel/power/disk.c	2004-07-28 23:39:49.000000000 +0200
+++ linux-mm/kernel/power/disk.c	2004-08-08 21:11:38.000000000 +0200
@@ -184,8 +187,11 @@
 			error = power_down(pm_disk_mode);
 			pr_debug("PM: Power down failed.\n");
 		}
-	} else
+	} else {
+		extern int restore_highmem(void);
+		restore_highmem();
 		pr_debug("PM: Image restored successfully.\n");
+	}
 	swsusp_free();
  Done:
 	finish();
--- clean-mm/kernel/power/swsusp.c	2004-07-28 23:39:49.000000000 +0200
+++ linux-mm/kernel/power/swsusp.c	2004-08-08 20:55:59.000000000 +0200
@@ -523,7 +523,7 @@
 	return 0;
 }
 
-static int restore_highmem(void)
+int restore_highmem(void)
 {
 	while (highmem_copy) {
 		struct highmem_page *save = highmem_copy;




-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: highmem handling again
  2004-08-08 19:23 highmem handling again Pavel Machek
@ 2004-08-08 19:55 ` Sam Ravnborg
  2004-08-08 20:01   ` Pavel Machek
  2004-08-09  8:27 ` Nigel Cunningham
  1 sibling, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2004-08-08 19:55 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, Patrick Mochel

On Sun, Aug 08, 2004 at 09:23:00PM +0200, Pavel Machek wrote:
>  		}
> -	} else
> +	} else {
> +		extern int restore_highmem(void);
> +		restore_highmem();

Prototype in .h files...

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: highmem handling again
  2004-08-08 19:55 ` Sam Ravnborg
@ 2004-08-08 20:01   ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2004-08-08 20:01 UTC (permalink / raw)
  To: kernel list, Patrick Mochel

Hi!

> >  		}
> > -	} else
> > +	} else {
> > +		extern int restore_highmem(void);
> > +		restore_highmem();
> 
> Prototype in .h files...

I know, this is proof of concept, only. I do not want another
cross-file reference.
							Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: highmem handling again
  2004-08-08 19:23 highmem handling again Pavel Machek
  2004-08-08 19:55 ` Sam Ravnborg
@ 2004-08-09  8:27 ` Nigel Cunningham
  2004-08-09  8:46   ` Pavel Machek
  1 sibling, 1 reply; 5+ messages in thread
From: Nigel Cunningham @ 2004-08-09  8:27 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Linux Kernel Mailing List, Patrick Mochel

Hi.

On Mon, 2004-08-09 at 05:23, Pavel Machek wrote:
> Hi!
> 
> I agree that swsusp_free is not the right place to restore_highmem(),
> but I can't find "right" place to do it... Best I could come up is
> with is:
> 
> It did not work at the end of swsusp_resume, or at the end of
> swsusp_restore, IIRC.

I'm doing: copy back lowmem, restore local processor context, flush
local tlb, restore highmem, allow other processors to restore their
processor contexts and flush local tlbs. It works fine here.

Nigel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: highmem handling again
  2004-08-09  8:27 ` Nigel Cunningham
@ 2004-08-09  8:46   ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2004-08-09  8:46 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Linux Kernel Mailing List, Patrick Mochel

Hi!

> > I agree that swsusp_free is not the right place to restore_highmem(),
> > but I can't find "right" place to do it... Best I could come up is
> > with is:
> > 
> > It did not work at the end of swsusp_resume, or at the end of
> > swsusp_restore, IIRC.
> 
> I'm doing: copy back lowmem, restore local processor context, flush
> local tlb, restore highmem, allow other processors to restore their
> processor contexts and flush local tlbs. It works fine here.

Yes, I'd like to do the same, I just have problems finding that place
in new structure.
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-09  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-08 19:23 highmem handling again Pavel Machek
2004-08-08 19:55 ` Sam Ravnborg
2004-08-08 20:01   ` Pavel Machek
2004-08-09  8:27 ` Nigel Cunningham
2004-08-09  8:46   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox