Commit-ID: 81dcf89f03204d7e0118018666cf362254e734b6 Gitweb: https://git.kernel.org/tip/81dcf89f03204d7e0118018666cf362254e734b6 Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx> AuthorDate: Thu, 18 Jan 2018 14:38:11 +0100 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Tue, 6 Feb 2018 10:28:57 +0100 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) <peterz@xxxxxxxxxxxxx> Reviewed-by: Borislav Petkov <bp@xxxxxxx> Cc: Jason Baron <jbaron@xxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: linux-kernel@xxxxxxxxxxxxxxx Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- include/linux/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index e0340ca..b6a29c1 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 */ -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |