On Sat, Mar 26, 2011 at 12:49 PM, Christoph Lameter wrote: > On Sat, 26 Mar 2011, Christoph Lameter wrote: > >> Tejun: Whats going on there? I should be getting offsets into the per cpu >> area and not kernel addresses. > > Its a UP kernel running on dual Athlon. So its okay ... Argh.... The > following patch fixes it by using the fallback code for cmpxchg_double: Hmm. Looking closer, I think there are more bugs in that cmpxchg_double thing. In particular, it doesn't mark memory as changed, so gcc might miscompile it even on SMP. Also, I think we'd be better off using the 'cmpxchg16b' instruction even on UP, so it's sad to disable it entirely there. Wouldn't something like the attached be better? NOTE! TOTALLY UNTESTED! Linus