From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756099AbeARPFu (ORCPT ); Thu, 18 Jan 2018 10:05:50 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:58271 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754991AbeARO6A (ORCPT ); Thu, 18 Jan 2018 09:58:00 -0500 Message-Id: <20180118140151.487385460@infradead.org> User-Agent: quilt/0.63-1 Date: Thu, 18 Jan 2018 14:48:01 +0100 From: Peter Zijlstra From: Peter Zijlstra To: David Woodhouse , Thomas Gleixner , Josh Poimboeuf Cc: linux-kernel@vger.kernel.org, Dave Hansen , Ashok Raj , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Paolo Bonzini , Jun Nakajima , Asit Mallick , Jason Baron , Peter Zijlstra Subject: [PATCH 01/35] jump_label: Add branch hints to static_branch_{un,}likely() References: <20180118134800.711245485@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-jump_label-fix.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cc: Jason Baron Signed-off-by: Peter Zijlstra (Intel) --- include/linux/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -388,7 +388,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) \ @@ -400,7 +400,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 */