From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>,
David Picard <david.picard@clermont.in2p3.fr>,
"Claude Opus 4.6" <noreply@anthropic.com>
Subject: Re: [PATCH v2 1/2] ARM: setupc_32: remove relocation code from setup_c
Date: Wed, 11 Mar 2026 20:08:26 +0100 [thread overview]
Message-ID: <abG9qn4yl5wLV7L4@pengutronix.de> (raw)
In-Reply-To: <96ca3d06-c1ec-4329-af77-5b7eb89047bb@pengutronix.de>
On Wed, Mar 11, 2026 at 03:41:04PM +0100, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 3/4/26 8:53 AM, Sascha Hauer wrote:
> > All callers of setup_c() already call relocate_to_current_adr() or
> > relocate_to_adr() before setup_c(), so the relocation (memcpy) code
> > in setup_c is dead and also the sync_caches_for_execution() is unnecessary
> > Remove it and reduce setup_c to just clearing BSS.
>
> David reports this breaks his enclustra-sa2 and I observe also a hang on
> Qemu Virt:
>
> $ make multi_v7_defconfig
> $ pytest --interactive
> Using -bios device tree at 40000000
> <hang>
>
> Please drop from next, it's likely also what's breaking CI.
r4 should be restored before returning. Let's try again with the fix
below.
Sascha
---------------------------8<------------------------------
>From 139e75d06150896add0555f2164dac0c7f90e644 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Wed, 11 Mar 2026 20:02:58 +0100
Subject: [PATCH] fixup! ARM: setupc_32: remove relocation code from setup_c
---
arch/arm/cpu/setupc_32.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/setupc_32.S b/arch/arm/cpu/setupc_32.S
index c2c3f97528..c3e53b220e 100644
--- a/arch/arm/cpu/setupc_32.S
+++ b/arch/arm/cpu/setupc_32.S
@@ -10,13 +10,13 @@
* setup_c: clear bss
*/
ENTRY(setup_c)
- mov r4, lr
+ push {r4, lr}
ldr r0, =__bss_start
mov r1, #0
ldr r2, =__bss_stop
sub r2, r2, r0
bl __memset /* clear bss */
- ret r4
+ pop {r4, pc}
ENDPROC(setup_c)
/*
--
2.47.3
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-03-11 19:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 7:53 [PATCH v2 0/2] ARM: Avoid to clear bss multiple times Sascha Hauer
2026-03-04 7:53 ` [PATCH v2 1/2] ARM: setupc_32: remove relocation code from setup_c Sascha Hauer
2026-03-04 9:02 ` Ahmad Fatoum
2026-03-11 14:41 ` Ahmad Fatoum
2026-03-11 19:08 ` Sascha Hauer [this message]
2026-03-04 7:53 ` [PATCH v2 2/2] ARM: setup_c: avoid clearing BSS twice Sascha Hauer
2026-03-04 9:05 ` Ahmad Fatoum
2026-03-10 10:44 ` Sascha Hauer
2026-03-16 13:21 ` David Picard
2026-03-17 9:06 ` Sascha Hauer
2026-03-17 9:50 ` David Picard
2026-03-17 12:43 ` David Picard
2026-03-17 15:56 ` Ahmad Fatoum
2026-03-17 16:03 ` David Picard
2026-03-17 16:11 ` Ahmad Fatoum
2026-03-18 7:49 ` David Picard
2026-03-18 8:00 ` Sascha Hauer
2026-03-18 10:06 ` David Picard
2026-03-18 14:12 ` David Picard
2026-03-18 14:55 ` Sascha Hauer
2026-03-18 15:43 ` David Picard
2026-03-23 13:22 ` David Picard
2026-03-10 10:42 ` [PATCH v2 0/2] ARM: Avoid to clear bss multiple times Sascha Hauer
2026-03-17 10:21 ` Sascha Hauer
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=abG9qn4yl5wLV7L4@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=david.picard@clermont.in2p3.fr \
--cc=noreply@anthropic.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