From: Florian Fainelli <f.fainelli@gmail.com>
To: stable@vger.kernel.org
Cc: Jian Cai <caij2003@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Florian Fainelli <f.fainelli@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Tony Lindgren <tony@atomide.com>,
Hans Ulli Kroll <ulli.kroll@googlemail.com>,
Ard Biesheuvel <ardb@kernel.org>, Stefan Agner <stefan@agner.ch>,
Nicolas Pitre <nico@fluxnic.net>,
Andre Przywara <andre.przywara@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT),
linux-kernel@vger.kernel.org (open list),
linux-crypto@vger.kernel.org (open list:CRYPTO API),
linux-omap@vger.kernel.org (open list:OMAP2+ SUPPORT),
clang-built-linux@googlegroups.com (open list:CLANG/LLVM BUILD
SUPPORT), Sasha Levin <sashal@kernel.org>
Subject: [PATCH stable 5.4 03/11] ARM: 8971/1: replace the sole use of a symbol with its definition
Date: Wed, 29 Jun 2022 11:02:19 -0700 [thread overview]
Message-ID: <20220629180227.3408104-4-f.fainelli@gmail.com> (raw)
In-Reply-To: <20220629180227.3408104-1-f.fainelli@gmail.com>
From: Jian Cai <caij2003@gmail.com>
commit a780e485b5768e78aef087502499714901b68cc4 upstream
ALT_UP_B macro sets symbol up_b_offset via .equ to an expression
involving another symbol. The macro gets expanded twice when
arch/arm/kernel/sleep.S is assembled, creating a scenario where
up_b_offset is set to another expression involving symbols while its
current value is based on symbols. LLVM integrated assembler does not
allow such cases, and based on the documentation of binutils, "Values
that are based on expressions involving other symbols are allowed, but
some targets may restrict this to only being done once per assembly", so
it may be better to avoid such cases as it is not clearly stated which
targets should support or disallow them. The fix in this case is simple,
as up_b_offset has only one use, so we can replace the use with the
definition and get rid of up_b_offset.
Link:https://github.com/ClangBuiltLinux/linux/issues/920
Reviewed-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <caij2003@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm/include/asm/assembler.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index 6b3e64e19fb6..70e1c23feedb 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -279,10 +279,9 @@
.endif ;\
.popsection
#define ALT_UP_B(label) \
- .equ up_b_offset, label - 9998b ;\
.pushsection ".alt.smp.init", "a" ;\
.long 9998b ;\
- W(b) . + up_b_offset ;\
+ W(b) . + (label - 9998b) ;\
.popsection
#else
#define ALT_SMP(instr...)
--
2.25.1
next prev parent reply other threads:[~2022-06-29 18:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 18:02 [PATCH stable 5.4 00/11] ARM 32-bit build with Clang IAS Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 01/11] ARM: 8989/1: use .fpu assembler directives instead of assembler arguments Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 02/11] ARM: 8990/1: use VFP assembler mnemonics in register load/store macros Florian Fainelli
2022-06-29 18:02 ` Florian Fainelli [this message]
2022-06-29 18:02 ` [PATCH stable 5.4 04/11] crypto: arm/sha256-neon - avoid ADRL pseudo instruction Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 05/11] crypto: arm/sha512-neon " Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 06/11] ARM: 8933/1: replace Sun/Solaris style flag on section directive Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 07/11] ARM: 8929/1: use APSR_nzcv instead of r15 as mrc operand Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 08/11] ARM: OMAP2+: drop unnecessary adrl Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 09/11] ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 10/11] crypto: arm - use Kconfig based compiler checks for crypto opcodes Florian Fainelli
2022-06-29 18:02 ` [PATCH stable 5.4 11/11] crypto: arm/ghash-ce - define fpu before fpu registers are referenced Florian Fainelli
2022-06-30 13:29 ` [PATCH stable 5.4 00/11] ARM 32-bit build with Clang IAS Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220629180227.3408104-4-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andre.przywara@arm.com \
--cc=ardb@kernel.org \
--cc=caij2003@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ndesaulniers@google.com \
--cc=nico@fluxnic.net \
--cc=rmk+kernel@armlinux.org.uk \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=stefan@agner.ch \
--cc=tony@atomide.com \
--cc=ulli.kroll@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox