|
@@ -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)
|