]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86, 386 removal: Remove CONFIG_XADD
authorH. Peter Anvin <hpa@linux.intel.com>
Wed, 28 Nov 2012 19:50:25 +0000 (11:50 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 29 Nov 2012 21:23:02 +0000 (13:23 -0800)
All 486+ CPUs support XADD, so remove the fallback 386 support
code.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1354132230-21854-4-git-send-email-hpa@linux.intel.com
arch/x86/Kconfig
arch/x86/Kconfig.cpu
arch/x86/include/asm/atomic.h
arch/x86/include/asm/local.h
arch/x86/um/Kconfig

index a1a662721f8065b683347443059521cae16db6b7..631b298ac5b3334bc3a6635c226473f49716b0d8 100644 (file)
@@ -171,13 +171,8 @@ config ARCH_MAY_HAVE_PC_FDC
        def_bool y
        depends on ISA_DMA_API
 
-config RWSEM_GENERIC_SPINLOCK
-       def_bool y
-       depends on !X86_XADD
-
 config RWSEM_XCHGADD_ALGORITHM
        def_bool y
-       depends on X86_XADD
 
 config GENERIC_CALIBRATE_DELAY
        def_bool y
index 1290a696349e6d6cdbf3fe3d10b0aba542b72eec..52955eeeb1ef909e9e08b975368fa28ac0f40807 100644 (file)
@@ -304,9 +304,6 @@ config X86_L1_CACHE_SHIFT
        default "4" if MELAN || M486 || MGEODEGX1
        default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
 
-config X86_XADD
-       def_bool y
-
 config X86_PPRO_FENCE
        bool "PentiumPro memory ordering errata workaround"
        depends on M686 || M586MMX || M586TSC || M586 || M486 || MGEODEGX1
index b6c3b821acf65a017a2a2bdebc9d9fe237a41bb6..722aa3b0462448fc5442cd4c72a485fc23cbf5f8 100644 (file)
@@ -172,23 +172,7 @@ static inline int atomic_add_negative(int i, atomic_t *v)
  */
 static inline int atomic_add_return(int i, atomic_t *v)
 {
-#ifdef CONFIG_M386
-       int __i;
-       unsigned long flags;
-       if (unlikely(boot_cpu_data.x86 <= 3))
-               goto no_xadd;
-#endif
-       /* Modern 486+ processor */
        return i + xadd(&v->counter, i);
-
-#ifdef CONFIG_M386
-no_xadd: /* Legacy 386 processor */
-       raw_local_irq_save(flags);
-       __i = atomic_read(v);
-       atomic_set(v, i + __i);
-       raw_local_irq_restore(flags);
-       return i + __i;
-#endif
 }
 
 /**
index c8bed0da434a40dcd23ef16ecd518fa9cc164bc1..2d89e3980cbdbab0f76f7801e07d6be2d8ffb48a 100644 (file)
@@ -124,27 +124,11 @@ static inline int local_add_negative(long i, local_t *l)
  */
 static inline long local_add_return(long i, local_t *l)
 {
-       long __i;
-#ifdef CONFIG_M386
-       unsigned long flags;
-       if (unlikely(boot_cpu_data.x86 <= 3))
-               goto no_xadd;
-#endif
-       /* Modern 486+ processor */
-       __i = i;
+       long __i = i;
        asm volatile(_ASM_XADD "%0, %1;"
                     : "+r" (i), "+m" (l->a.counter)
                     : : "memory");
        return i + __i;
-
-#ifdef CONFIG_M386
-no_xadd: /* Legacy 386 processor */
-       local_irq_save(flags);
-       __i = local_read(l);
-       local_set(l, i + __i);
-       local_irq_restore(flags);
-       return i + __i;
-#endif
 }
 
 static inline long local_sub_return(long i, local_t *l)
index 07611759ce35b4cdcd298b402c22d39ada73e39a..b0c30dae9f559a0103fa15f85d33d479955ac2e6 100644 (file)
@@ -31,7 +31,7 @@ config X86_64
        select MODULES_USE_ELF_RELA
 
 config RWSEM_XCHGADD_ALGORITHM
-       def_bool X86_XADD && 64BIT
+       def_bool 64BIT
 
 config RWSEM_GENERIC_SPINLOCK
        def_bool !RWSEM_XCHGADD_ALGORITHM