Skip to contentSkip to conversation

CMA on AArch64

DISCUSSION Laura Abbott 4 participants 6 messages Nov 20, 2013 – Feb 26, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

I noticed there is currently no CMA support for AArch64. Is this already on someone's TODO list or is this still open?

Thanks,
Laura

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw

Hi Laura,

Quoted 2 lines · Laura Abbott

I noticed there is currently no CMA support for AArch64. Is this already on someone's TODO list or is this still open?

It's more like a wish list but there were other things that took priority. The arm64 DMA mapping code currently only supports swiotlb and our next plan is for IOMMU mapping. But I would like parts of the DMA IOMMU code under arch/arm to be made into a library (similar to the lib/swiotlb.c) so that other architectures can easily make use of it.

Yet another feature is DMA cache coherency management (primarily streaming DMA) and I have a patch but I want this driven via DT rather than drivers or SoC code calling set_dma_ops explicitly (the bindings definition is work in progress).

Anyway, I think the CMA support wouldn't interfere much with the above and could be merged. If you have time, please feel free to send some patches ;).

Signature · 1 line
Catalin
#2 lore raw
Quoted 11 lines · Catalin Marinas

Hi Laura,

Quoted 2 lines · Laura Abbott

I noticed there is currently no CMA support for AArch64. Is this already on someone's TODO list or is this still open?

It's more like a wish list but there were other things that took priority. The arm64 DMA mapping code currently only supports swiotlb and our next plan is for IOMMU mapping. But I would like parts of the DMA IOMMU code under arch/arm to be made into a library (similar to the lib/swiotlb.c) so that other architectures can easily make use of it.

If you're referring to dmabounce.c, that's a 100% no-way-ever-even-if- hell-freezes-over NACK.

#3 lore raw
Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Catalin Marinas
Quoted 2 lines · Laura Abbott

I noticed there is currently no CMA support for AArch64. Is this already on someone's TODO list or is this still open?

Quoted 8 lines
Quoted 5 lines

It's more like a wish list but there were other things that took priority. The arm64 DMA mapping code currently only supports swiotlb and our next plan is for IOMMU mapping. But I would like parts of the DMA IOMMU code under arch/arm to be made into a library (similar to the lib/swiotlb.c) so that other architectures can easily make use of it.

If you're referring to dmabounce.c, that's a 100% no-way-ever-even-if- hell-freezes-over NACK.

Does dmabounce.c implement IOMMU support? I'm talking about functions like __alloc_iova, __iommu_create_mapping etc.

The generic swiotlb code has enough bouncing capabilities for my needs.

Signature · 1 line
Catalin
#4 lore raw
In reply to Catalin Marinas
Quoted 5 lines

Yet another feature is DMA cache coherency management (primarily streaming DMA) and I have a patch but I want this driven via DT rather than drivers or SoC code calling set_dma_ops explicitly (the bindings definition is work in progress).

Hi Catalin,

Is there the plan or the progress about this part (streaming DMA)? :)

#5 lore raw
Quoted 6 lines · Hwang Chih-Chyuan
Quoted 4 lines

Yet another feature is DMA cache coherency management (primarily streaming DMA) and I have a patch but I want this driven via DT rather than drivers or SoC code calling set_dma_ops explicitly (the bindings definition is work in progress).

Is there the plan or the progress about this part (streaming DMA)? :)

You can grab a patch here:

https://git.kernel.org/cgit/linux/kernel/git/cmarinas/linux-aarch64.git/commit/?h=devel&id=96f083d416c0d01687ed5b37074831f461838455

However, I'd like to see some progress on defining the system topology via DT rather than driver manually setting the dma ops. Dave Martin is looking at this but I don't have an ETA yet.

Signature · 1 line
Catalin