Hi Christoph,
On Mon, Nov 15, 2021 at 09:59:50AM -0800, Christoph Hellwig wrote:
This is just popping out of nowhere on lkml, but yes ARM LPAE uses a 64-bit dma_addr_t, as a 64-bit phys_addr_t implies that. Same for x86-32 PAE and similar cases on MIPS and probably a few other architectures.
But what is the actual problem with a 32-bit virtual and 64-bit pysical/dma address? That is a pretty common setup and absolutely needs to be deal with in drivers and inrastructure.
page_pool (the API in question), apart from allocating memory can manage the mappings for you. However while doing so it stores some parts (incl the dma addr) in struct page. The code in there could be simplified if we skipped support of the 'mapping' feature for 32-bit architectures with 64-bit DMA. We thought no driver was using the mapping feature (on 32bits) and cleaned up that part, but apparently we missed '32-bit -- LPAE -- page pool manages DMA mappings'
Regards /Ilias