From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D823C433F5 for ; Tue, 25 Jan 2022 11:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LUYxCSYps+thdhiHxqDClTxhS9VgWH2hiSsKhfLM5Aw=; b=vABMZGeBjO1JaQ f/ToI1Ajv7bxGSzhfL5KYWibKn1k3JO6FxHzcpqiNp/MzxlH68V76wnGCUqJ2gx/pfn4OHzyKCCn2 0MFqFp2k9UbrCCt4iCxQDkashhaJjE8HUJR8ROk79h5IKZj4AT/L7Lqt85VkJ+D0z/HpMI1KIHs8d JVgsJKs1rluGkOSHbxZ2JkfFr0/K49TJOiPOKtsWmQToXvKenJ6iSrmBMHB7G511uVpsDKQPqaG5N cHWy5ZAjMQQwAVRMpAyVFkN7/awuU/CLcisTG74b18dHEc9kVSaPhpJvsV6Kd5MCLJG+MBIqhtC2h kraVPBi/aTms4QG4dqtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCK46-007dUU-N6; Tue, 25 Jan 2022 11:32:46 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCK3b-007dLr-5O for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 11:32:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7DBF811FB; Tue, 25 Jan 2022 03:32:14 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 81B593F7D8; Tue, 25 Jan 2022 03:32:12 -0800 (PST) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: acme@redhat.com, ardb@kernel.org, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, jpoimboe@redhat.com, jslaby@suse.cz, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, mark.rutland@arm.com, mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de, will@kernel.org Subject: [PATCH v2 2/7] linkage: add SYM_{ENTRY,START,END}_AT() Date: Tue, 25 Jan 2022 11:31:55 +0000 Message-Id: <20220125113200.3829108-3-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220125113200.3829108-1-mark.rutland@arm.com> References: <20220125113200.3829108-1-mark.rutland@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_033215_298566_96810141 X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, the SYM_{ENTRY,START,END}() helpers define symbols in terms of the current position within the section. In subsequent patches we'll need to define symbols after moving this position. This patch splits the core out of SYM_{ENTRY,START,END}() into SYM_{ENTRY,START,END}_AT() macros which take a location argument, with SYM_{ENTRY,START,END}() passing the current position. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Ard Biesheuvel Acked-by: Mark Brown Cc: Borislav Petkov Cc: Jiri Slaby Cc: Josh Poimboeuf Cc: Peter Zijlstra --- include/linux/linkage.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/include/linux/linkage.h b/include/linux/linkage.h index dbf8506decca0..d87c2acda2540 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -147,25 +147,43 @@ /* === generic annotations === */ +#ifndef SYM_ENTRY_AT +#define SYM_ENTRY_AT(name, location, linkage) \ + linkage(name) ASM_NL \ + .set name, location ASM_NL +#endif + /* SYM_ENTRY -- use only if you have to for non-paired symbols */ #ifndef SYM_ENTRY #define SYM_ENTRY(name, linkage, align...) \ - linkage(name) ASM_NL \ align ASM_NL \ - name: + SYM_ENTRY_AT(name, ., linkage) +#endif + +/* SYM_START_AT -- use only if you have to */ +#ifndef SYM_START_AT +#define SYM_START_AT(name, location, linkage) \ + SYM_ENTRY_AT(name, location, linkage) #endif /* SYM_START -- use only if you have to */ #ifndef SYM_START #define SYM_START(name, linkage, align...) \ - SYM_ENTRY(name, linkage, align) + align ASM_NL \ + SYM_START_AT(name, ., linkage) +#endif + +/* SYM_END_AT -- use only if you have to */ +#ifndef SYM_END_AT +#define SYM_END_AT(name, location, sym_type) \ + .type name sym_type ASM_NL \ + .size name, location-name ASM_NL #endif /* SYM_END -- use only if you have to */ #ifndef SYM_END #define SYM_END(name, sym_type) \ - .type name sym_type ASM_NL \ - .size name, .-name + SYM_END_AT(name, ., sym_type) #endif /* === code annotations === */ -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel