Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Feb 2018 03:28:19 +0000 (19:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Feb 2018 03:28:19 +0000 (19:28 -0800)
Pull locking fixlets from Ingo Molnar:
 "An endianness fix and a jump labels branch hint update"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/qrwlock: include asm/byteorder.h as needed
  jump_label: Add branch hints to static_branch_{un,}likely()

include/asm-generic/qrwlock_types.h
include/linux/jump_label.h

index 137ecdd16daa01c9ced213a9ee38de7b9f16181a..c36f1d5a2572cdbc01106730a815637419acbf35 100644 (file)
@@ -3,6 +3,7 @@
 #define __ASM_GENERIC_QRWLOCK_TYPES_H
 
 #include <linux/types.h>
+#include <asm/byteorder.h>
 #include <asm/spinlock_types.h>
 
 /*
index e0340ca08d9897bd12ecdbb47454961c0237da82..b6a29c126cc49285f62995b59dc517f17cdc3af6 100644 (file)
@@ -393,7 +393,7 @@ extern bool ____wrong_branch_error(void);
                branch = !arch_static_branch_jump(&(x)->key, true);             \
        else                                                                    \
                branch = ____wrong_branch_error();                              \
-       branch;                                                                 \
+       likely(branch);                                                         \
 })
 
 #define static_branch_unlikely(x)                                              \
@@ -405,7 +405,7 @@ extern bool ____wrong_branch_error(void);
                branch = arch_static_branch(&(x)->key, false);                  \
        else                                                                    \
                branch = ____wrong_branch_error();                              \
-       branch;                                                                 \
+       unlikely(branch);                                                       \
 })
 
 #else /* !HAVE_JUMP_LABEL */