From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: mol@pengutronix.de
Subject: [PATCH 0/6] memory: fuse overlapping memory banks
Date: Mon, 31 May 2021 09:12:33 +0200 [thread overview]
Message-ID: <20210531071239.30653-1-a.fatoum@pengutronix.de> (raw)
The request region code makes sense to ensure drivers don't try to claim
(I/O) memory region claimed by another driver or by the memory
allocator. It doesn't make as much sense for registering available
memory banks, because there is often overlap:
- device tree often defines the (minimally) available /memory across
variants
- subarchitectures like i.MX, STM32MP, OMAP or SAMA5 query the main
RAM size from controller registers
So far, overlap went mostly unnoticed, because the RAM controller
drivers didn't check for errors. However, if barebox is already running
from RAM outside that described by the device tree, there will be errors
and /delete-node/ annotations that need to be added into device trees.
Upstream device tree can be extended later on with a /memory node, which
in turn will break barebox. This series fixes all of that. Overlapping
memory banks are combined into one. Errors are propagated everywhere.
/delete-node/ memory@X shouldn't be needed for new boards.
Ahmad Fatoum (6):
common: memory: allocate all memory devices at once
memory: fuse overlapping memory banks
of: propagate errors inside barebox_register_{of,fdt} into initcalls
of: warn about of_add_memory_bank errors
ARM: <asm/memory.h>: propagate error codes from arm_add_mem_device()
ARM: report probe error at arm_add_mem_device() callsites on failure
arch/arm/boards/qemu-virt/board.c | 3 +-
arch/arm/cpu/dtb.c | 4 +-
arch/arm/include/asm/memory.h | 6 +--
arch/arm/mach-at91/ddramc.c | 4 +-
arch/arm/mach-imx/esdctl.c | 56 +++++++++++++--------------
arch/arm/mach-omap/am33xx_scrm.c | 4 +-
arch/arm/mach-stm32mp/ddrctrl.c | 4 +-
arch/kvx/lib/dtb.c | 4 +-
arch/mips/boot/dtb.c | 13 ++++---
arch/openrisc/lib/dtb.c | 4 +-
arch/riscv/lib/dtb.c | 5 ++-
arch/sandbox/board/dtb.c | 4 +-
common/memory.c | 64 +++++++++++++++++++++++++++----
common/resource.c | 22 +++++++++++
drivers/of/base.c | 40 ++++++++++++-------
drivers/of/mem_generic.c | 5 ++-
include/linux/ioport.h | 20 ++++++++++
include/memory.h | 1 -
include/of.h | 6 +--
19 files changed, 181 insertions(+), 88 deletions(-)
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2021-05-31 7:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-31 7:12 Ahmad Fatoum [this message]
2021-05-31 7:12 ` [PATCH 1/6] common: memory: allocate all memory devices at once Ahmad Fatoum
2021-05-31 7:12 ` [PATCH 2/6] memory: fuse overlapping memory banks Ahmad Fatoum
2021-05-31 7:12 ` [PATCH 3/6] of: propagate errors inside barebox_register_{of, fdt} into initcalls Ahmad Fatoum
2021-05-31 7:12 ` [PATCH 4/6] of: warn about of_add_memory_bank errors Ahmad Fatoum
2021-05-31 7:12 ` [PATCH 5/6] ARM: <asm/memory.h>: propagate error codes from arm_add_mem_device() Ahmad Fatoum
2021-05-31 7:12 ` [PATCH 6/6] ARM: report probe error at arm_add_mem_device() callsites on failure Ahmad Fatoum
2021-06-02 6:38 ` [PATCH 0/6] memory: fuse overlapping memory banks 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=20210531071239.30653-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=mol@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