[PATCH v2 2/2] ARM: setup_c: avoid clearing BSS twice

Sascha Hauer s.hauer at pengutronix.de
Tue Mar 10 03:44:08 PDT 2026


On Wed, Mar 04, 2026 at 10:05:38AM +0100, Ahmad Fatoum wrote:
> Hi,
> 
> On 3/4/26 8:53 AM, Sascha Hauer wrote:
> > Add a bss_cleared variable that is set after the first call to
> > setup_c(). On subsequent calls, the BSS clear is skipped to avoid
> > wiping already-initialized data.
> > 
> > Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
> > Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> 
> Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> 
> Minor point below:
> 
> > +.section .data
> 
> .data.bss_cleared or is it already in its own section?

Fixed while applying.

Sascha

-- 
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 |



More information about the barebox mailing list