Skip to contentSkip to conversation

swsusp: add comments at critical places

PATCH Pavel Machek 1 participant 1 message Oct 4, 2004

lore
Share & tools
lore
#0 lore raw

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

arch/i386/power/cpu.c +1 -1
Index: linux/arch/i386/power/cpu.c
===================================================================
@@ -148,6 +148,6 @@
 	__restore_processor_state(&saved_context);
 }
 
-
+/* Needed by apm.c */
 EXPORT_SYMBOL(save_processor_state);
 EXPORT_SYMBOL(restore_processor_state);
include/asm-i386/suspend.h +3 -0
Index: linux/include/asm-i386/suspend.h
===================================================================
@@ -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;
arch/i386/kernel/acpi/sleep.c +2 -2
Index: linux/arch/i386/kernel/acpi/sleep.c
===================================================================
@@ -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();
 }
 
 /**
Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!