mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: drop a bogus cc clobber
@ 2016-09-19 13:27 Jan Beulich
  2016-09-20 14:58 ` [tip:locking/core] locking/rwsem, x86: Drop " tip-bot for Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2016-09-19 13:27 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: linux-kernel

With the addition of uses of gcc's condition code outputs (commit
35ccfb7114 "x86, asm: Use CC_SET()/CC_OUT() in <asm/rwsem.h>") there's
now an overlap of outputs and clobbers in __down_write_trylock(). Such
overlaps are generally getting tagged with an error (occasionally even
with an ICE). I can't really tell why plain gcc 6.2 doesn't detect this
(judging by the code it is meant to), while the slightly modified one I
use does. Since condition code clobbers are never necessary on x86
(other than perhaps for documentation purposes, which doesn't really
get done consistently), remove it altogether rather than inventing
something like CC_CLOBBER (to accompany CC_SET/CC_OUT).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -154,7 +154,7 @@ static inline bool __down_write_trylock(
 		     : "+m" (sem->count), "=&a" (tmp0), "=&r" (tmp1),
 		       CC_OUT(e) (result)
 		     : "er" (RWSEM_ACTIVE_WRITE_BIAS)
-		     : "memory", "cc");
+		     : "memory");
 	return result;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-20 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 13:27 [PATCH] x86: drop a bogus cc clobber Jan Beulich
2016-09-20 14:58 ` [tip:locking/core] locking/rwsem, x86: Drop " tip-bot for Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome