From: Oreoluwa Babatunde <quic_obabatun@quicinc.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
<ysato@users.sourceforge.jp>, <dalias@libc.org>
Cc: <akpm@linux-foundation.org>, <linux-sh@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <robh+dt@kernel.org>,
<kernel@quicinc.com>, Rob Herring <robh@kernel.org>,
Rob Landley <rob@landley.net>
Subject: Re: [PATCH v2] sh: Call paging_init() earlier in the init sequence
Date: Mon, 20 May 2024 11:03:50 -0700 [thread overview]
Message-ID: <e6436f2f-ac51-4f18-90f2-e39a2ff1c520@quicinc.com> (raw)
In-Reply-To: <0e813c8498bf3d9ed5d8fd5b171ac9980dc2999c.camel@physik.fu-berlin.de>
On 5/7/2024 3:41 PM, John Paul Adrian Glaubitz wrote:
> Hello Oreoluwa,
>
> On Tue, 2024-05-07 at 14:42 -0700, Oreoluwa Babatunde wrote:
>> memblock_alloc() marks all its allocations as reserved by calling
>> memblock_reserve().
>> https://elixir.bootlin.com/linux/latest/source/mm/memblock.c#L1463
>>
>> This should normally stop other users from allocating from within that
>> region of memory.
>>
>> But in this case, since all the free memory regions have already been
>> transferred over to the bootmem framework by paging_init(), I am not
>> sure if that logic will still hold for the unflatten_deivcetree allocated memory.
>>
>> The main goal of this patch is to make sure that the reserved memory
>> regions defined in the DT are set aside before any memblock allocations
>> are done (which includes the allocation done by unflatten_devicetree).
>>
>> Hence, I can restructure the patch to only remove the portion of code that is
>> is responsible for setting aside the DT defined reserved memory regions from
>> within paging_init(), and move it above the unflatten_devicetree() call.
>> https://elixir.bootlin.com/linux/latest/source/arch/sh/mm/init.c#L292
>>
>> I will explore further and possibly restructure this patch based on my findings.
> OK, sounds like a plan. In the meantime, I have set up my J2 Turtle Board and
> I am actually now able to test patches for this target, so that I would be
> able to verify that your patch didn't break anything.
>
> However, I think for v6.10 I think the ship has sailed.
>
> Adrian
Hi Adrian,
I have uploaded v3 of this patch now.
https://lore.kernel.org/all/20240520175802.2002183-1-quic_obabatun@quicinc.com/
In this new version, paging_init() is left in its original position and only the portion
of code that is responsible for setting aside the reserved memory regions is moved.
Thank you!
Oreoluwa
next prev parent reply other threads:[~2024-05-20 18:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 23:31 [PATCH v2] sh: Call paging_init() earlier in the init sequence Oreoluwa Babatunde
2024-04-24 4:47 ` John Paul Adrian Glaubitz
2024-04-24 8:45 ` Markus Elfring
2024-04-24 10:24 ` John Paul Adrian Glaubitz
2024-04-24 11:06 ` [v2] " Markus Elfring
2024-04-29 9:03 ` [PATCH v2] " John Paul Adrian Glaubitz
2024-04-29 16:28 ` Oreoluwa Babatunde
2024-04-29 17:26 ` John Paul Adrian Glaubitz
2024-04-29 17:54 ` Oreoluwa Babatunde
2024-05-01 17:18 ` John Paul Adrian Glaubitz
2024-05-02 10:29 ` John Paul Adrian Glaubitz
2024-05-07 21:42 ` Oreoluwa Babatunde
2024-05-07 22:41 ` John Paul Adrian Glaubitz
2024-05-20 18:03 ` Oreoluwa Babatunde [this message]
2024-05-20 18:24 ` John Paul Adrian Glaubitz
2024-05-20 18:49 ` 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=e6436f2f-ac51-4f18-90f2-e39a2ff1c520@quicinc.com \
--to=quic_obabatun@quicinc.com \
--cc=akpm@linux-foundation.org \
--cc=dalias@libc.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=kernel@quicinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=ysato@users.sourceforge.jp \
/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