
From: mikpe@csd.uu.se

Here is a patch to fix CONFIG_APM=m in 2.5.69-bk11.  My patch to have APM
restore the systenter MSRs failed to handle the modular case, which fails
with unresolved symbols.

Since suspend.o is used from both APM (module or built-in) and ACPI sleep
(built-in), I made suspend.o built-in and dependent on CONFIG_PM.



 arch/i386/kernel/Makefile  |    3 ++-
 arch/i386/kernel/suspend.c |    3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff -puN arch/i386/kernel/Makefile~apm-module-fix arch/i386/kernel/Makefile
--- 25/arch/i386/kernel/Makefile~apm-module-fix	2003-05-17 14:09:37.000000000 -0700
+++ 25-akpm/arch/i386/kernel/Makefile	2003-05-17 14:09:37.000000000 -0700
@@ -17,7 +17,8 @@ obj-$(CONFIG_MCA)		+= mca.o
 obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
-obj-$(CONFIG_APM)		+= apm.o suspend.o
+obj-$(CONFIG_PM)		+= suspend.o
+obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
 obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
diff -puN arch/i386/kernel/suspend.c~apm-module-fix arch/i386/kernel/suspend.c
--- 25/arch/i386/kernel/suspend.c~apm-module-fix	2003-05-17 14:09:37.000000000 -0700
+++ 25-akpm/arch/i386/kernel/suspend.c	2003-05-17 14:09:37.000000000 -0700
@@ -130,3 +130,6 @@ static void fix_processor_context(void)
 	}
 
 }
+
+EXPORT_SYMBOL(save_processor_state);
+EXPORT_SYMBOL(restore_processor_state);

_
