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 0B8D6C433F5 for ; Tue, 4 Oct 2022 12:31:28 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jd4BWo/6yj/xXlvwc+RJj3/OQ1oIogr/cQr3hKgCGl8=; b=vXulXkxZFiKj8Y ActBNVfwuJYqqy7bd62gJdnbXWr3nQs1sMCeWCdo3qJO9/+3PgsNxEJmp2YS3r9qtrNbJfSAfzKbf 15jMSnDNKzFmh+g/ylNIwdXp7VuGMe0D8eBNQ4MXNZFbr0rYHBretxU9XsfVMuCAk04k9DsbeS121 Z1mzwnySxJg3FPlvX7EXM0nqMe4acLKRlJOV5xqHn8gfeZ39blsxkFmes6VxDinAHZhaQilHqiPt3 QG2+iEj1hvCpr6jku+TPJb/h70t87PNJ3Ny9N+pxvTS0yZFHEqdROzk0YAWRPx0QOsflZoVexWXGL vWknZL+qaxVasc1hLkLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofh3y-009dPJ-0h; Tue, 04 Oct 2022 12:30:18 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofh3v-009dOz-3x for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 12:30:16 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C11961423; Tue, 4 Oct 2022 12:30:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D55CC433C1; Tue, 4 Oct 2022 12:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664886613; bh=rx2frixyc5Te5j8Sw/gyPUpvVto2dBti0m4sZqVyRa0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T9uw1HzlHYYWLLleKlcwX5JPZtqTEgda9vZNsYb/h2gM9lmDnatfcAdCBBa0q+297 wSnjbQk66fbku2ZmQq6fNsXz4miL8/sFyHZQVjK4rwI2IDBrd+APdHA/v94+kqXTLL L6h1QATiGCO1SWUEczp0kWoRi1XhnVh5v9jDHT6lWxf02OWI669P/p/NXya8THD962 w0yOwACLZZ7ek+DX4IpGJ+UIoB5AZ9f6MBS2jFbVgdMRXHqdGKqGQwwqa0vPTxAr5b FqQ9Dy0HSDFtOgXebX2BA+KLoKR/+t2XBFwDfbMzHEMaGkwWs4XUEZyKAEsrdwjEbu Di0Wz9eVfT+9A== Date: Tue, 4 Oct 2022 13:30:08 +0100 From: Will Deacon To: Nathan Chancellor Cc: Catalin Marinas , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev Subject: Re: [PATCH -next] arm64: alternatives: Use vdso/bits.h instead of linux/bits.h Message-ID: <20221004123008.GA23822@willie-the-truck> References: <20221003193759.1141709-1-nathan@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221003193759.1141709-1-nathan@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_053015_278450_5BB5E690 X-CRM114-Status: GOOD ( 25.87 ) 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 On Mon, Oct 03, 2022 at 12:37:59PM -0700, Nathan Chancellor wrote: > When building with CONFIG_LTO after commit ba00c2a04fa5 ("arm64: fix the > build with binutils 2.27"), the following build error occurs: > > In file included from arch/arm64/kernel/module-plts.c:6: > In file included from include/linux/elf.h:6: > In file included from arch/arm64/include/asm/elf.h:8: > In file included from arch/arm64/include/asm/hwcap.h:9: > In file included from arch/arm64/include/asm/cpufeature.h:9: > In file included from arch/arm64/include/asm/alternative-macros.h:5: > In file included from include/linux/bits.h:22: > In file included from include/linux/build_bug.h:5: > In file included from include/linux/compiler.h:248: > In file included from arch/arm64/include/asm/rwonce.h:71: > include/asm-generic/rwonce.h:67:9: error: expected string literal in 'asm' > return __READ_ONCE(*(unsigned long *)addr); > ^ > arch/arm64/include/asm/rwonce.h:43:16: note: expanded from macro '__READ_ONCE' > asm volatile(__LOAD_RCPC(b, %w0, %1) \ > ^ > arch/arm64/include/asm/rwonce.h:17:2: note: expanded from macro '__LOAD_RCPC' > ALTERNATIVE( \ > ^ > > Similar to the issue resolved by commit 0072dc1b53c3 ("arm64: avoid > BUILD_BUG_ON() in alternative-macros"), there is a circular include > dependency through when CONFIG_LTO is enabled due to > appearing in the include chain before the contents of > , which results in ALTERNATIVE() not getting > expanded properly because it has not been defined yet. > > Avoid this issue by including , which includes the > definition of the BIT() macro, instead of , as BIT() is the > only macro from bits.h that is relevant to this header. > > Fixes: ba00c2a04fa5 ("arm64: fix the build with binutils 2.27") > Link: https://github.com/ClangBuiltLinux/linux/issues/1728 > Signed-off-by: Nathan Chancellor > --- > arch/arm64/include/asm/alternative-macros.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/alternative-macros.h b/arch/arm64/include/asm/alternative-macros.h > index b5ac0b85c9bb..3622e9f4fb44 100644 > --- a/arch/arm64/include/asm/alternative-macros.h > +++ b/arch/arm64/include/asm/alternative-macros.h > @@ -2,8 +2,8 @@ > #ifndef __ASM_ALTERNATIVE_MACROS_H > #define __ASM_ALTERNATIVE_MACROS_H > > -#include > #include > +#include > > #include > #include > > base-commit: ba00c2a04fa5431d204a4183062b30372c062aa7 The 'vdso' namespace is a bit of a misnomer, but that's not your fault and I can confirm that this fixes the build on for-next/core with defconfig + thin LTO, so: Tested-by: Will Deacon Thanks! Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel