--- arch/i386/mm/init.c.orig 2004-06-23 22:23:15.756896000 -0700 +++ arch/i386/mm/init.c 2004-06-23 22:26:53.611748362 -0700 @@ -323,9 +323,30 @@ flush_tlb_all(); } +#if defined(CONFIG_PM_DISK) || defined(CONFIG_SOFTWARE_SUSPEND) +/* + * Swap suspend & friends need this for resume because things like the intel-agp + * driver might have split up a kernel 4MB mapping. + */ +char __nosavedata swsusp_pg_dir[PAGE_SIZE] + __attribute__ ((aligned (PAGE_SIZE))); + +static inline void save_pg_dir(void) +{ + memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE); +} +#else +static inline void save_pg_dir(void) +{ +} +#endif + void zap_low_mappings(void) { printk("zapping low mappings.\n"); + + save_pg_dir(); + /* * Zap initial low-memory mappings. */