Re: linux-next: Tree for May 3

From: Christoph Hellwig
Date: Wed May 11 2022 - 10:40:41 EST


On Wed, May 11, 2022 at 05:37:50PM +0300, Mike Rapoport wrote:
> Presuming that devices see [0x1000200000-0x103fffffff] as
> [0x200000-0x3fffffff] we may try something like
>
> min = memblock_start_of_DRAM();
> max = min + 0xffffffff;
>
> if (flags & SWIOTLB_ANY)
> max = MEMBLOCK_ALLOC_ACCESSIBLE;
>
> tlb = memblock_alloc_try_nid(bytes, PAGE_SIZE, min, max, NUMA_NO_NODE);

While there is still no guarantee the first 32-bits worth of DRAM
are actually mapped to a usable address, this looks like a much better
default than what we have right now.