• Jan Beulich's avatar
    x86/asm: Improve how GEN_*_SUFFIXED_RMWcc() specify clobbers · 700b7c54
    Jan Beulich authored
    Commit:
    
      df340524 ("x86/asm: Add suffix macro for GEN_*_RMWcc()")
    
    ... introduced "suffix" RMWcc operations, adding bogus clobber specifiers:
    For one, on x86 there's no point explicitly clobbering "cc".
    
    In fact, with GCC properly fixed, this results in an overlap being detected by
    the compiler between outputs and clobbers.
    
    Furthermore it seems bad practice to me to have clobber specification
    and use of the clobbered register(s) disconnected - it should rather be
    at the invocation place of that GEN_{UN,BIN}ARY_SUFFIXED_RMWcc() macros
    that the clobber is specified which this particular invocation needs.
    
    Drop the "cc" clobber altogether and move the "cx" one to refcount.h.
    Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
    Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/5A8AF1F802000078001A91E1@prv-mh.provo.novell.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    700b7c54
rmwcc.h 1.62 KB