lkml.org 
[lkml]   [2024]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] memblock: add no-map alloc functions
On Tue, Apr 16, 2024 at 09:06:35PM +0900, skseofh@gmail.com wrote:
> From: Daero Lee <daero_le.lee@samsung.com>
>
> Like reserved-memory with the 'no-map' property and only 'size' property
> (w/o 'reg' property), there are memory regions need to be allocated in
> memblock.memory marked with the MEMBLOCK_NOMAP flag, but should not be
> allocated in memblock.reserved.

This still does not explain why you need such regions.

As Wei Yang explained, memblock does not allocate memory from
memblock.reserved. The memblock.reserved array represents memory that is in
use by firmware or by early kernel allocations and cannot be freed to page
allocator.

If you have a region that's _NOMAP in memblock.memory and is absent in
memblock.reserved it will not be mapped by the kernel page tables, but it
will be considered as free memory by the core mm.

Is this really what you want?

> example : arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
> reserved-memory {
> #address-cells = <2>;
> #size-cells = <2>;
> ranges;
>
> bman_fbpr: bman-fbpr {
> compatible = "shared-dma-pool";
> size = <0 0x1000000>;
> alignment = <0 0x1000000>;
> no-map;
> };
>
> qman_fqd: qman-fqd {
> compatible = "shared-dma-pool";
> size = <0 0x400000>;
> alignment = <0 0x400000>;
> no-map;
> };
>
> qman_pfdr: qman-pfdr {
> compatible = "shared-dma-pool";
> size = <0 0x2000000>;
> alignment = <0 0x2000000>;
> no-map;
> };
> };
>

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2024-04-17 08:03    [W:0.071 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site