From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933848AbdKGJ4e (ORCPT ); Tue, 7 Nov 2017 04:56:34 -0500 Received: from terminus.zytor.com ([65.50.211.136]:42923 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755213AbdKGJ4a (ORCPT ); Tue, 7 Nov 2017 04:56:30 -0500 Date: Tue, 7 Nov 2017 01:51:56 -0800 From: tip-bot for Josh Poimboeuf Message-ID: Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, jpoimboe@redhat.com Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, jpoimboe@redhat.com In-Reply-To: <1570e48d9f87e0fc6f0126c32e7e1de6e109cb67.1509974104.git.jpoimboe@redhat.com> References: <1570e48d9f87e0fc6f0126c32e7e1de6e109cb67.1509974104.git.jpoimboe@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:core/objtool] objtool: Add a comment for the unreachable annotation macros Git-Commit-ID: d0c2e691d1cbe43662df3a08a4933f13acc352c3 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d0c2e691d1cbe43662df3a08a4933f13acc352c3 Gitweb: https://git.kernel.org/tip/d0c2e691d1cbe43662df3a08a4933f13acc352c3 Author: Josh Poimboeuf AuthorDate: Mon, 6 Nov 2017 07:17:37 -0600 Committer: Ingo Molnar CommitDate: Tue, 7 Nov 2017 10:48:22 +0100 objtool: Add a comment for the unreachable annotation macros Add a comment for the unreachable annotation macros to explain their purpose and the '__COUNTER__' label hack. Suggested-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1570e48d9f87e0fc6f0126c32e7e1de6e109cb67.1509974104.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar --- include/linux/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 2027104..f8734fc 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -187,6 +187,11 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, /* Unreachable code */ #ifdef CONFIG_STACK_VALIDATION +/* + * These macros help objtool understand GCC code flow for unreachable code. + * The __COUNTER__ based labels are a hack to make each instance of the macros + * unique, to convince GCC not to merge duplicate inline asm statements. + */ #define annotate_reachable() ({ \ asm("%c0:\n\t" \ ".pushsection .discard.reachable\n\t" \