From: Arnd Bergmann <arnd@kernel.org>
To: Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>
Cc: Ard Biesheuvel <ardb@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: proc-v7: fix out-of-range adr instruction
Date: Thu, 2 Feb 2023 11:25:32 +0100 [thread overview]
Message-ID: <20230202102538.999026-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
Before the change to CONFIG_ARCH_MULTIPLATFORM, some CONFIG_ARM_ERRATA_*
options were always hidden, but now they are user visible in expert
configurations, which caused a compile-time failure in randconfig
builds with all of the errata enabled.
arch/arm/mm/proc-v7.S:545: Error: invalid constant (fffffffffffffbf4) after fixup
/tmp/proc-v7-5b364b.s:1611:2: error: out of range pc-relative fixup value
adr r3, v7_crval
The problem is that the extra code size puts the v7_crval definition just
outside of the range of the 'adr' instruction. Use the adr_l macro instead
to allow longer offsets.
Fixes: 84fc86360623 ("ARM: make ARCH_MULTIPLATFORM user-visible")
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mm/proc-v7.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 6b4ef9539b68..fe1469aa5be5 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -544,7 +544,7 @@ __errata_finish:
mcr p14, 6, r0, c0, c0, 0 @ stop userspace TEEHBR access
1:
#endif
- adr r3, v7_crval
+ adr_l r3, v7_crval
ldmia r3, {r3, r6}
ARM_BE8(orr r6, r6, #1 << 25) @ big-endian page tables
#ifdef CONFIG_SWP_EMULATE
--
2.39.0
reply other threads:[~2023-02-02 10:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230202102538.999026-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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