Re: [PATCH v2] sh: Call paging_init() earlier in the init sequence

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <0e813c8498bf3d9ed5d8fd5b171ac9980dc2999c.camel@physik.fu-berlin.de>
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

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.