[PATCH] Fix IXP4xx coherent allocations
Krzysztof Halasa
khc at pm.waw.pl
Sun Mar 24 17:15:36 EDT 2013
Ben Hutchings <bhutchings at solarflare.com> writes:
> I'm failing to see where it says the default can't be narrower than 32
> bits due to platform limits. And how do you think DMA mapping is
> supposed to work for PCI devices on these platforms, anyway?
The problem on ARM (and probably on powerpc, and on something called
"metag" - grep -r 'coherent DMA mask is unset' arch) is that the default
coherent DMA mask is zero. IOW, coherent DMA allocations are, by
default, disabled. A driver has to dma_set_coherent_mask() or, as many
drivers do, set dev->coherent_dma_mask directly (IMHO
dev->coherent_dma_mask along with dev->dma_mask are private DMA API
stuff and e.g. device drivers have no interest there).
The zero default is IMHO, WRT the actual DMA API, an ARM bug (and
powerpc's etc). Nevertheless, the patch I posted does everything as
required by the API. Specifically, the IXP4xx arch part makes
IXP4xx's dma_set_coherent_mask() compliant with DMA API, and the actual
dma_set_coherent_mask() calls in drivers are both valid and I guess
recommended by the API.
The patch doesn't touch the core ARM issue, that's right.
--
Krzysztof Halasa
More information about the linux-arm-kernel
mailing list