summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/local.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-11-28 23:50:25 +0400
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-30 01:23:02 +0400
commit7ac468b1300f35143a9b5b100e3970ca7ae1d9b8 (patch)
tree1c928b80c897acc8bf7f47de8ef3793c5ba30c2c /arch/x86/include/asm/local.h
parentd55c5a93db2d5fa95f233ab153f594365d95b777 (diff)
downloadlinux-7ac468b1300f35143a9b5b100e3970ca7ae1d9b8.tar.xz
x86, 386 removal: Remove CONFIG_XADD
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
Diffstat (limited to 'arch/x86/include/asm/local.h')
-rw-r--r--arch/x86/include/asm/local.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
index c8bed0da434a..2d89e3980cbd 100644
--- a/arch/x86/include/asm/local.h
+++ b/arch/x86/include/asm/local.h
@@ -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)