From: Rob Herring <robh@kernel.org>
To: Oreoluwa Babatunde <quic_obabatun@quicinc.com>
Cc: catalin.marinas@arm.com, will@kernel.org, frowand.list@gmail.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org, kernel@quicinc.com
Subject: Re: [RFC PATCH 1/3] of: reserved_mem: Change the order that reserved_mem regions are stored
Date: Tue, 24 Oct 2023 14:15:48 -0500 [thread overview]
Message-ID: <20231024191548.GA358703-robh@kernel.org> (raw)
In-Reply-To: <7e6ddffc-81a5-4183-9e59-7060776c936a@quicinc.com>
On Thu, Oct 19, 2023 at 03:45:37PM -0700, Oreoluwa Babatunde wrote:
>
> On 10/19/2023 12:46 PM, Rob Herring wrote:
> > On Thu, Oct 19, 2023 at 1:49 PM Oreoluwa Babatunde
> > <quic_obabatun@quicinc.com> wrote:
> >> The dynamic allocation of the reserved_mem array needs to be done after
> >> paging_init() is called because memory allocated using memblock_alloc()
> >> is not writeable before that.
> >> --- a/arch/arm64/kernel/setup.c
> >> +++ b/arch/arm64/kernel/setup.c
> >> @@ -27,6 +27,8 @@
> >> #include <linux/proc_fs.h>
> >> #include <linux/memblock.h>
> >> #include <linux/of_fdt.h>
> >> +#include <linux/of_reserved_mem.h>
> >> +
> >> #include <linux/efi.h>
> >> #include <linux/psci.h>
> >> #include <linux/sched/task.h>
> >> @@ -346,6 +348,8 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p)
> >>
> >> paging_init();
> >>
> >> + fdt_init_reserved_mem();
> >> +
> > You removed this call from the common code and add it to arm64 arch
> > code, doesn't that break every other arch?
> Yes, the same changes will be needed for every other arch. I was hoping to
> get some feedback on the RFC before implementing this on other archs which
> is why the change is currently only in arm64.
> > The very next thing done here is unflattening the DT. So another call
> > from the arch code to the DT code isn't needed either.
> Yes, I see that unflatten_device_tree() is being called right after here.
> Just to clarify, are you suggesting to move fdt_init_reserved_mem() into the
> unflatten_device_tree() call?
In general, I want fewer calls between arch code and DT core and for the
DT core to be more in control of the ordering that things happen. Your
series does the opposite.
Rob
next prev parent reply other threads:[~2023-10-24 19:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 18:48 [RFC PATCH 0/3] Dynamic allocation of reserved_mem array Oreoluwa Babatunde
2023-10-19 18:48 ` [RFC PATCH 1/3] of: reserved_mem: Change the order that reserved_mem regions are stored Oreoluwa Babatunde
2023-10-19 19:46 ` Rob Herring
2023-10-19 22:45 ` Oreoluwa Babatunde
2023-10-24 19:15 ` Rob Herring [this message]
2023-10-24 19:32 ` Rob Herring
2023-12-04 4:18 ` Oreoluwa Babatunde
2023-10-19 18:48 ` [RFC PATCH 2/3] of: reserved_mem: Add code to dynamically allocate reserved_mem array Oreoluwa Babatunde
2023-10-19 18:48 ` [RFC PATCH 3/3] of: reserved_mem: Make MAX_RESERVED_REGIONS a config option Oreoluwa Babatunde
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=20231024191548.GA358703-robh@kernel.org \
--to=robh@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=kernel@quicinc.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_obabatun@quicinc.com \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).