>>> On 01.09.17 at 11:55, <jbeul...@suse.com> wrote: >>>> On 01.09.17 at 10:37, <chao....@intel.com> wrote: >> it seems add_sized() won't be a LOCKed instruction. >> #define build_add_sized(name, size, type, reg) \ >> static inline void name(volatile type *addr, type val) \ >> { \ >> asm volatile("add" size " %1,%0" \ >> : "=m" (*addr) \ >> : reg (val)); \ >> } > > Oh, you're right. But then I'd still like you to not add a new > user, as I don't see why it was introduced in the first place: > Independent of architecture it is equivalent to > > write_atomic(p, read_atomic(p) + c) > > and hence I'd like to get rid of it as misleading/redundant.
Actually, on x86 it still is a bit better than the generic replacement, i.e. it would only be worthwhile dropping the custom ARM variant in favor of a generic one. Keep using it here then. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel