From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>,
barebox@lists.infradead.org,
Sascha Hauer <s.hauer@pengutronix.de>
Cc: David Jander <david@protonic.nl>
Subject: Re: [PATCH v2 4/4] arm: boards: protonic-imx8ml: Add ECC + scrubbing
Date: Mon, 9 Mar 2026 16:21:46 +0100 [thread overview]
Message-ID: <e411ed96-4ba4-49cc-847b-f0b521605004@pengutronix.de> (raw)
In-Reply-To: <20260309-v2026-02-0-topic-imx8-ecc-v2-4-6aab6d795061@pengutronix.de>
On 3/9/26 8:46 AM, Steffen Trumtrar wrote:
> +ENTRY_FUNCTION(start_prt_prt8ml_ecc, r0, r1, r2)
> +{
> + imx8mp_cpu_lowlevel_init();
> +
> + relocate_to_current_adr();
> + setup_c();
> +
> + prt_prt8ml_start(&prt8ml_dram_ecc_timing);
Taking the address of a global variable in a function that calls
relocate_to_* is not a good idea, see commit f36c980fd6e5 ("ARM: cpu:
add compiler barrier around unrelocated access") for an example where
GCC miscompiled such a pattern.
I would suggest you pass an ecc = true/false here and move taking the
address into the noinline function. I expect that the compiler should
optimize the other struct away. If not, you will have to define two
noinline functions instead...
Sorry about that, I hope we will get rid of this error prone wart in the
coming months, so that the board entry point runs with relocations
applied right away.
Thanks,
Ahmad
--
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 |
prev parent reply other threads:[~2026-03-09 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 7:46 [PATCH v2 0/4] ARM: i.MX8: add DDRC-ECC support Steffen Trumtrar
2026-03-09 7:46 ` [PATCH v2 1/4] ARM: i.MX: esdctl: fix spelling of ad(d)ress Steffen Trumtrar
2026-03-09 14:56 ` Ahmad Fatoum
2026-03-09 7:46 ` [PATCH v2 2/4] arm: mach-imx: esdctl.c: Add support for imx8mp inline ECC Steffen Trumtrar
2026-03-09 14:56 ` Ahmad Fatoum
2026-03-09 7:46 ` [PATCH v2 3/4] drivers: ddr: imx8m: ddr_init.c: support ECC scrubbing Steffen Trumtrar
2026-03-09 15:12 ` Ahmad Fatoum
2026-03-09 7:46 ` [PATCH v2 4/4] arm: boards: protonic-imx8ml: Add ECC + scrubbing Steffen Trumtrar
2026-03-09 15:21 ` Ahmad Fatoum [this message]
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=e411ed96-4ba4-49cc-847b-f0b521605004@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=david@protonic.nl \
--cc=s.hauer@pengutronix.de \
--cc=s.trumtrar@pengutronix.de \
/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