lkml.org 
[lkml]   [2004]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: swsusp: fix swsusp with intel-agp
Hi!

> >
> > +#ifdef CONFIG_SOFTWARE_SUSPEND
> > + {
> > + extern char swsusp_pg_dir[PAGE_SIZE];
> > + memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
> > + }
> > +#endif
>
> Please move the declaration of swsusp_pg_dir[] to a header file where it is
> visible to both the users and the definition site, then resend.

Hmm, on second thought, it is accessed from one C file and once from
assembly => prototype should not be needed.

Upon popular request I made it depend on CONFIG_PM (pmdisk will need
it, too, and suspend2 wants it also). If you don't like that please
simply replace CONFIG_PM with CONFIG_SOFTWARE_SUSPEND...

Pavel

--- clean/arch/i386/power/swsusp.S 2004-05-20 23:08:05.000000000 +0200
+++ linux/arch/i386/power/swsusp.S 2004-05-20 23:11:05.000000000 +0200
@@ -36,7 +38,7 @@
jmp .L1449
.p2align 4,,7
.L1450:
- movl $swapper_pg_dir-__PAGE_OFFSET,%ecx
+ movl $swsusp_pg_dir-__PAGE_OFFSET,%ecx
movl %ecx,%cr3

call do_magic_resume_1
--- clean/arch/i386/mm/init.c 2004-05-20 23:08:05.000000000 +0200
+++ linux/arch/i386/mm/init.c 2004-05-23 19:43:22.000000000 +0200
@@ -328,9 +328,20 @@
#endif
}

+#ifdef CONFIG_PM
+/* Swap suspend & friends need this for resume */
+char __nosavedata swsusp_pg_dir[PAGE_SIZE]
+ __attribute__ ((aligned (PAGE_SIZE)));
+#endif
+
void zap_low_mappings (void)
{
int i;
+
+#ifdef CONFIG_PM
+ memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
+#endif
+
/*
* Zap initial low-memory mappings.
*

--
934a471f20d6580d5aad759bf0d97ddc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.091 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site