From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Rob Herring <robh@kernel.org>
Cc: linux-mm@kvack.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Mike Rapoport <rppt@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Oreoluwa Babatunde <oreoluwa.babatunde@oss.qualcomm.com>,
Wandun <chenwandun1@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3 0/2] of: reserved_mem: use dynamically allocated reserved_mem array
Date: Thu, 22 Oct 2026 11:59:47 +0200 [thread overview]
Message-ID: <e42637d0-c800-48fe-b943-4ec6ac540d82@samsung.com> (raw)
In-Reply-To: <20261021134138.GC3667411-robh@kernel.org>
On 21.10.2026 15:41, Rob Herring wrote:
> On Thu, Oct 15, 2026 at 10:23:10AM +0200, Marek Szyprowski wrote:
>> Mike Rapoport suggested [1] how to properly use dynamically allocated
>> arrays during early boot.
>>
>> Use this approach for reserved_mem array during early scan of the
>> reserved regions. Having all the reserved regions in a single array
>> removes the need of the two pass initialization introduced by commit
>> 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved memory
>> regions are processed"), so implement it to make the code simpler,
>> easier to understand and ready for adding proper error checking.
>>
>> Tested on ARM32, ARM64 and RiscV64 based boards. Arch specific issues
>> with early mappings were discovered by LLM.
>>
>> [1] https://lore.kernel.org/all/asc6brs_g0ky0wOM@kernel.org/
>>
>>
>> Best regards
>> Marek Szyprowski, PhD
>> Samsung R&D Institute Poland
>>
>>
>> Changelog:
>>
>> v3:
>> - allocate the reserved_mem array only after all static regions are
>> reserved or marked as no-map, so it cannot be placed inside any of
>> them
>> - record failures of the early static reservations and print a single
>> message asking to fix the device-tree
>> - restore conditional compilation of the early mapping code, because
>> some architectures lack support for it (C-SKY & Sparc64 as reported
>> by kbuild robot)
>> - allocate the array bottom-up, to avoid allocating from highmem, what
>> might be an issue on Xtensa, C-SKY and MIPS32
>> - don't use the early mapping on PPC64, where the scan is done before
>> early_ioremap_setup()
>>
>> v2: https://lore.kernel.org/all/20261008152403.766439-1-m.szyprowski@samsung.com/
>> - removed superfluous ifdefs
>>
>> v1: https://lore.kernel.org/all/20261008094125.3197971-1-m.szyprowski@samsung.com/
>> - initial version
>>
>>
>> Patch summary:
>>
>> Marek Szyprowski (2):
>> of: reserved_mem: group allocation helpers together
>> of: reserved_mem: allocate and map the reserved_mem array early
> Can you confirm the sashiko issues are not issues?
I've replied sashiko review. That are again the preexisting issues initially
targeted by Wandun's patchset:
https://lore.kernel.org/all/20260920092852.614973-1-chenwandun1@gmail.com/
> I'll apply this after rc1. Are you willing to be added as reviewer or
> maintainer for this code? I'd prefer not to have another entry just for
> the reserved mem code, so you'd have to filter out the rest of the DT
> code (not the bindings and dts firehose) which isn't too much.
Okay, I can try to take a look at the drivers/of related code as reviewer.
I will filter it out to reserved_mem related changes locally.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
prev parent reply other threads:[~2026-10-22 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261015082333eucas1p28bad74cde14ee0afac2eea11bbe6696c@eucas1p2.samsung.com>
2026-10-15 8:23 ` Marek Szyprowski
[not found] ` <CGME20261015082333eucas1p2ab2904e28a33bf2c74f5c7c9befeedb8@eucas1p2.samsung.com>
2026-10-15 8:23 ` [PATCH v3 1/2] of: reserved_mem: group allocation helpers together Marek Szyprowski
[not found] ` <CGME20261015082334eucas1p2a3bbf3650f279abbd39d05d63e35aba6@eucas1p2.samsung.com>
2026-10-15 8:23 ` [PATCH v3 2/2] of: reserved_mem: allocate and map the reserved_mem array early Marek Szyprowski
2026-10-21 13:41 ` [PATCH v3 0/2] of: reserved_mem: use dynamically allocated reserved_mem array Rob Herring
2026-10-22 9:59 ` Marek Szyprowski [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=e42637d0-c800-48fe-b943-4ec6ac540d82@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=chenwandun1@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oreoluwa.babatunde@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=rppt@kernel.org \
--cc=saravanak@kernel.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
all inboxes | Powered by JetHome®