From: Peter Zijlstra Date: Wed, 11 Sep 2013 13:19:24 +0000 (+0200) Subject: x86: Use asm goto to implement better modify_and_test() functions X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~40^2~121 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c44c2d0f459cd7e275242b72f500137c4fa834d;p=pandora-kernel.git x86: Use asm goto to implement better modify_and_test() functions Linus suggested using asm goto to get rid of the typical SETcc + TEST instruction pair -- which also clobbers an extra register -- for our typical modify_and_test() functions. Because asm goto doesn't allow output fields it has to include an unconditinal memory clobber when it changes a memory variable to force a reload. Luckily all atomic ops already imply a compiler barrier to go along with their memory barrier semantics. Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-0mtn9siwbeo1d33bap1422se@git.kernel.org Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed