]> git.hungrycats.org Git - linux/commitdiff
[ACPI] allow building ACPI w/ CMPXCHG when CONFIG_M386=y
authorLen Brown <len.brown@intel.com>
Tue, 30 Mar 2004 12:06:05 +0000 (07:06 -0500)
committerLen Brown <lenb@dhcppc3.>
Tue, 30 Mar 2004 12:06:05 +0000 (07:06 -0500)
http://bugzilla.kernel.org/show_bug.cgi?id=2391

arch/i386/kernel/acpi/boot.c
include/asm-i386/acpi.h
include/asm-i386/system.h

index c4e2c06f10f203572cd733abcae62a981c3a5a1c..f46ad9ac5aa7cb002800cb012ffc3ce751f3fe33 100644 (file)
@@ -67,6 +67,10 @@ int acpi_sci_override_gsi __initdata;
 static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 #endif
 
+#ifndef __HAVE_ARCH_CMPXCHG
+#warning ACPI uses CMPXCHG, i486 and later hardware
+#endif
+
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
    -------------------------------------------------------------------------- */
index b303c70f888777f891a8f4882fdd8115c11b873f..2a4b35f628fd869b484bf8ae84deddc0c43cd9df 100644 (file)
 #define ACPI_ENABLE_IRQS()  local_irq_enable()
 #define ACPI_FLUSH_CPU_CACHE() wbinvd()
 
-/*
- * A brief explanation as GNU inline assembly is a bit hairy
- *  %0 is the output parameter in EAX ("=a")
- *  %1 and %2 are the input parameters in ECX ("c")
- *  and an immediate value ("i") respectively
- *  All actual register references are preceded with "%%" as in "%%edx"
- *  Immediate values in the assembly are preceded by "$" as in "$0x1"
- *  The final asm parameter are the operation altered non-output registers.
- */
 
 static inline int
 __acpi_acquire_global_lock (unsigned int *lock)
index 909ba6a3a9c8d53487909e6b482b4ff242df3a05..6b1d2e84a20d577c2497ede197abd30e4bc7bd57 100644 (file)
@@ -241,6 +241,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
 
 #ifdef CONFIG_X86_CMPXCHG
 #define __HAVE_ARCH_CMPXCHG 1
+#endif
 
 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
                                      unsigned long new, int size)
@@ -273,10 +274,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
        ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
                                        (unsigned long)(n),sizeof(*(ptr))))
     
-#else
-/* Compiling for a 386 proper. Is it worth implementing via cli/sti?  */
-#endif
-
 #ifdef __KERNEL__
 struct alt_instr { 
        __u8 *instr;            /* original instruction */