Bug 2391
Summary: | undefined reference to `cmpxchg' for 80386 build | ||
---|---|---|---|
Product: | ACPI | Reporter: | Len Brown (lenb) |
Component: | Other | Assignee: | Luming Yu (luming.yu) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi-bugzilla |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.4.25-rc1 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
a patch
a slightly simpler patch (vs 2.6.5) simplest patch (vs 2.6.5) |
Description
Len Brown
2004-03-29 14:18:35 UTC
Luming, Please implement a fix that 1. builds even when the CPU is set to CONFIG_M386 and CONFIG_X86_CMPXCHG is not defined. It looks like the way to do this is to leave system.h alone, and to define our own version of the right flavor of __cmpxchg in __cmpxchg in asm-i386/acpi.h with a private name, say cmpxchg4_always() and a comment explaining why the duplicate code. 2. checks at boot-time via cpuid that cmpxchg is supported by the processor and disables ACPI if it is not. Should be a generic named test so that other sub-systems can decide to use it if they decide to. Note that this is i386 issue only, x86_64 doesn't support building without the capability. thanks, -Len Created attachment 2454 [details]
a patch
this is patch based on requirment above.
--Luming
Created attachment 2456 [details]
a slightly simpler patch (vs 2.6.5)
This patch is based on and replaces Luming's patch. It fixes the
comment typo so the patch will build, updates the comments
and deletes some dead code.
The check for X86_FEATURE_CX8 is overkill,
that is the CMPXCHG8B intruction new in the Pentium.
Technically we really want to be checking for the CMPXCHG
instruction which was new in the 486 -- though I doubt
ACPI is deployed on any 486 boxes that would notice
the difference...
Created attachment 2458 [details]
simplest patch (vs 2.6.5)
got talked into yet a simpler patch.
define cmpxchg always, system wide
#warning in ACPI code on 80386 build
fix (simplest patch) is in 2.6.5 and > 2.4.26-rc1 -- closing. FYI: http://bugzilla.kernel.org/show_bug.cgi?id=2554 drmP.h already defines cmpxchg for i386 kernel builds...so a new bug is introduced, as it tries to define it again. DP |