|
@@ -183,6 +183,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
|
|
|
{
|
|
|
int __i;
|
|
|
#ifdef CONFIG_M386
|
|
|
+ unsigned long flags;
|
|
|
if(unlikely(boot_cpu_data.x86==3))
|
|
|
goto no_xadd;
|
|
|
#endif
|
|
@@ -196,10 +197,10 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
|
|
|
|
|
|
#ifdef CONFIG_M386
|
|
|
no_xadd: /* Legacy 386 processor */
|
|
|
- local_irq_disable();
|
|
|
+ local_irq_save(flags);
|
|
|
__i = atomic_read(v);
|
|
|
atomic_set(v, i + __i);
|
|
|
- local_irq_enable();
|
|
|
+ local_irq_restore(flags);
|
|
|
return i + __i;
|
|
|
#endif
|
|
|
}
|