From: Peter Zijlstra Date: Thu, 18 Jan 2018 13:38:11 +0000 (+0100) Subject: jump_label: Add branch hints to static_branch_{un,}likely() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=81dcf89f03204d7e0118018666cf362254e734b6;p=openwrt%2Fstaging%2Fblogic.git jump_label: Add branch hints to static_branch_{un,}likely() For some reason these were missing, I've not observed this patch making a difference in the few code locations I checked, but this makes sense. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Borislav Petkov Cc: Jason Baron Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index e0340ca08d98..b6a29c126cc4 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -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 */