From 13a82a1eca057273673139089aae854fac8a1856 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 18 Oct 2004 09:03:14 -0700 Subject: [PATCH] [PATCH] swsusp: add comments at critical places 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. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/acpi/sleep.c | 2 +- arch/i386/power/cpu.c | 2 +- include/asm-i386/suspend.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c index 2a12d12e32e79..be4df5548111f 100644 --- a/arch/i386/kernel/acpi/sleep.c +++ b/arch/i386/kernel/acpi/sleep.c @@ -56,7 +56,7 @@ int acpi_save_state_disk (void) } /* - * acpi_restore_state + * acpi_restore_state - undo effects of acpi_save_state_mem */ void acpi_restore_state_mem (void) { diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c index 53542e3a923a4..adb50ba2a6794 100644 --- a/arch/i386/power/cpu.c +++ b/arch/i386/power/cpu.c @@ -148,6 +148,6 @@ void restore_processor_state(void) __restore_processor_state(&saved_context); } - +/* Needed by apm.c */ EXPORT_SYMBOL(save_processor_state); EXPORT_SYMBOL(restore_processor_state); diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index 2794a173f64d4..f63799f2d2f9b 100644 --- a/include/asm-i386/suspend.h +++ b/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; -- 2.53.0