x86, 386 removal: Remove CONFIG_XADD
[firefly-linux-kernel-4.4.55.git] / arch / x86 / include / asm / atomic.h
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
 }
 
 /**