swsusp: add comments at critical places

From: Pavel Machek
Date: Mon Oct 04 2004 - 08:21:39 EST


Hi!

apm.c needs save_processor_state and friends. Add a comment to keep
people from removing it. Describe a way to make swsusp work on non-PSE
machines. Document purpose of acpi_restore_state.
Pavel

Index: linux/arch/i386/power/cpu.c
===================================================================
--- linux.orig/arch/i386/power/cpu.c 2004-10-01 12:24:26.000000000 +0200
+++ linux/arch/i386/power/cpu.c 2004-10-01 00:47:37.000000000 +0200
@@ -148,6 +148,6 @@
__restore_processor_state(&saved_context);
}

-
+/* Needed by apm.c */
EXPORT_SYMBOL(save_processor_state);
EXPORT_SYMBOL(restore_processor_state);
Index: linux/include/asm-i386/suspend.h
===================================================================
--- linux.orig/include/asm-i386/suspend.h 2004-10-01 12:24:26.000000000 +0200
+++ linux/include/asm-i386/suspend.h 2004-08-19 12:18:51.000000000 +0200
@@ -9,6 +9,9 @@
static inline int
arch_prepare_suspend(void)
{
+ /* If you want to make non-PSE machine work, turn off paging
+ in do_magic. swsusp_pg_dir should have identity mapping, so
+ it could work... */
if (!cpu_has_pse)
return -EPERM;
return 0;
Index: linux/arch/i386/kernel/acpi/sleep.c
===================================================================
--- linux.orig/arch/i386/kernel/acpi/sleep.c 2004-10-01 12:24:26.000000000 +0200
+++ linux/arch/i386/kernel/acpi/sleep.c 2004-10-01 00:47:36.000000000 +0200
@@ -56,11 +56,11 @@
}

/*
- * acpi_restore_state
+ * acpi_restore_state - undo effects of acpi_save_state_mem
*/
void acpi_restore_state_mem (void)
{
- zap_low_mappings();
+ zap_low_mappings();
}

/**


--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
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/