386/smp issue with atomic_add_return()
Hi
Is there any smp box with 386 cpu?
If it exist, then I think atomic_add_return has a problem.
Just disabling local interrupts can not keep another cpu from entering this function. What do you think about this?
This is the code (copied from 2.6.16.4):
#ifdef CONFIG_M386
no_xadd: /* Legacy 386 processor */
local_irq_disable();
__i = atomic_read(v);
atomic_set(v, i + __i);
local_irq_enable();
return i + __i;
#endifQuoted 8 lines · lepton
Hi
Is there any smp box with 386 cpu?
If it exist, then I thinkatomic_add_returnhas a problem.
Just disabling local interrupts can not keep another cpu from entering this function. What do you think about this?This is the code (copied from 2.6.16.4):
Quoted 8 lines
#ifdef
CONFIG_M386
no_xadd: /* Legacy 386 processor */local_irq_disable(); __i = atomic_read(v); atomic_set(v, i + __i); local_irq_enable(); return i + __i; #endif
If such a box exists (and I doubt), it is not a commody PC. First x86 SMP motherboard I heard of was a P1 with two processors.