From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, Ian Abbott <abbotti@mev.co.uk>
Subject: Re: [PATCH master] resource: fix recently broken memory bank fusing
Date: Tue, 18 Oct 2022 10:52:54 +0200 [thread overview]
Message-ID: <20221018085254.GM6702@pengutronix.de> (raw)
In-Reply-To: <20221017133859.299705-1-a.fatoum@pengutronix.de>
On Mon, Oct 17, 2022 at 03:39:00PM +0200, Ahmad Fatoum wrote:
> barebox will fuse overlapping memory banks to avoid the common issue of
> the device tree being modified upstream to contain a minimum RAM size
> that would then conflict with a RAM size barebox determines by
> querying the memory controller. This was recently broken, because we
> changed memory banks to have IORESOURCE_MEM in their flags field,
> but resource_contains() used to compare regions won't return true if
> memory type differs. Fix this by settings .flags = IORESOURCE_MEM
> for the new resource as well.
>
> Reported-by: Ian Abbott <abbotti@mev.co.uk>
> Fixes: d0b5f6bde15b ("of: reserved-mem: reserve regions prior to mmu_initcall()")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/memory.c | 1 +
> 1 file changed, 1 insertion(+)
Applied, thanks
Sascha
>
> diff --git a/common/memory.c b/common/memory.c
> index 7e24ecb2bd03..0ae9e7383cce 100644
> --- a/common/memory.c
> +++ b/common/memory.c
> @@ -149,6 +149,7 @@ int barebox_add_memory_bank(const char *name, resource_size_t start,
> struct resource newres = {
> .start = start,
> .end = start + size - 1,
> + .flags = IORESOURCE_MEM,
> };
>
> for_each_memory_bank(bank) {
> --
> 2.30.2
>
>
>
--
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:[~2022-10-18 8:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 13:39 Ahmad Fatoum
2022-10-17 14:47 ` Ian Abbott
2022-10-18 8:52 ` Sascha Hauer [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=20221018085254.GM6702@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=abbotti@mev.co.uk \
--cc=barebox@lists.infradead.org \
/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