Re: [PATCH] riscv: make ZONE_DMA32 optional
From: Christoph Hellwig
Date: Tue Sep 24 2024 - 02:39:31 EST
On Sun, Sep 22, 2024 at 10:06:59AM +0000, Vladimir Kondratiev wrote:
> This is the whole point - there are platforms where you can't allocate 32-bit
> dma-able memory.
Ugg. They will be broke for all kinds of devices (plug in PCIe devices
IP IP blocks).
> Unless there's IOMMU or some platform specific tricks,
> DMA address is same as physical address.
Well, that's where the usual platform specific trick is, as the
platforms with high DRAM either have a mapping between physical
and DMA range (see the dma_ranges concept in the DMA and OF code)
or a mirror of the higher addresses. Or very rarely (e.g. sparc)
a required IOMMU that is always used.