Re: [PATCH v2] memblock: add no-map alloc functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 16, 2024 at 09:06:35PM +0900, skseofh@xxxxxxxxx wrote:
> From: Daero Lee <daero_le.lee@xxxxxxxxxxx>
> 
> 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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux