summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/alternative.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-10-20 11:02:05 +0200
committerIngo Molnar <mingo@kernel.org>2017-10-20 11:02:05 +0200
commitca4b9c3b743da39a6e0756a5c68edb35f6fc5e53 (patch)
tree95ce0819f92e25bc4d768ab13cee1f385a83a7b2 /arch/x86/include/asm/alternative.h
parenta30b85df7d599f626973e9cd3056fe755bd778e0 (diff)
parent275d34b82561e695339b782950d49c386169dae3 (diff)
downloadlinux-ca4b9c3b743da39a6e0756a5c68edb35f6fc5e53.tar.bz2
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/alternative.h')
-rw-r--r--arch/x86/include/asm/alternative.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index c096624137ae..ccbe24e697c4 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -103,12 +103,12 @@ static inline int alternatives_text_reserved(void *start, void *end)
alt_end_marker ":\n"
/*
- * max without conditionals. Idea adapted from:
+ * gas compatible max based on the idea from:
* http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax
*
- * The additional "-" is needed because gas works with s32s.
+ * The additional "-" is needed because gas uses a "true" value of -1.
*/
-#define alt_max_short(a, b) "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") - (" b ")))))"
+#define alt_max_short(a, b) "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") < (" b ")))))"
/*
* Pad the second replacement alternative with additional NOPs if it is