OK. The gcc patches were for __sync_sychronize(), which I have replaced
with a "dmb" asm, and for __sync_lock_release(), which I do not use.
If I understand Paolo and Uli correctly (a dubious assumption, to be
sure), then the memory barriers and atomicity should be supplied by
the libraries and/or kernel for the other __sync_ primitives.
So for ARMv7, my prior patch should suffice. (Or am I still missing
something?)
Additional patches are no doubt required for other ARM flavors, and
perhaps also for older compilers and kernels.
--