Bug 9877 (apm_x86)

Summary: On x86, apm module is now apm_32 but Kconfig says apm
Product: Power Management Reporter: A Lawrence (law_ence.dev)
Component: APMAssignee: Stephen Rothwell (apmbugs)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24 Subsystem:
Regression: --- Bisected commit-id:

Description A Lawrence 2008-02-02 13:45:48 UTC
Latest working kernel version:
2.6.23.14
Earliest failing kernel version:
2.6.24

Problem Description:

Legacy x86 system failed to power off at shutdown because apm_32
was not loaded. This because it seems to have changed name from just apm 
under x86 and 2.6.24. If that is intentional then 
 arch/x86/Kconfig
which contains 
 "module will be called apm."
needs to be updated to match. It would be nice to have an entry in the Changelog
or elsewhere as well.
Comment 1 A Lawrence 2008-02-03 04:41:09 UTC
Patch from Sam Ravnborg, sam@ravnborg.org, on  linux-kernel@vger.kernel.org


diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 6f81300..f080635 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -37,7 +37,8 @@ obj-$(CONFIG_X86_MSR)		+= msr.o
 obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_PCI)		+= early-quirks.o
-obj-$(CONFIG_APM)		+= apm_32.o
+apm-y				:= apm_32.o
+obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_X86_SMP)		+= smp_$(BITS).o smpboot_$(BITS).o tsc_sync.o
 obj-$(CONFIG_X86_32_SMP)	+= smpcommon_32.o
 obj-$(CONFIG_X86_64_SMP)	+= smp_64.o smpboot_64.o tsc_sync.o

Leaving this open for reference until it hits main stream as suggested on lkml.
Comment 2 H. Peter Anvin 2008-02-03 12:05:31 UTC
It should be called just plain apm, so this should be fixed, even though it's only supported on 32-bit platforms.

There aren't that many of the arch files that can be modules, and few of those that aren't unified.