Need some information about IOMMU support for ARM64 in 4.6

Robin Murphy robin.murphy at arm.com
Thu Dec 15 06:59:06 PST 2016


Hi Barghav,

I assume you're talking about the ARM SMMU(v2)?

On 15/12/16 06:50, Bhargav Shah wrote:
> Hi,
> I am using kernel version 4.6.
> of_iommu_configure() gets IOMMU ops from of_iommu_list and call arch_setup_dma_ops.
> Presently, __iommu_setup_dma_ops() it expects iommu ops to be present. 
> Here, of_iommu_configure() get NULL iommu ops and it calls arch_setup_dma_ops with it.
> 
> So, in my current flow iommu ops is not getting set for device.

Yes. The SMMUv2 driver in 4.6 does not call of_iommu_set_ops(). That's
because it doesn't support of_xlate() either, so in general can't be
used for DMA ops. The default domain support which went into 4.6 was
just some early groundwork which, in hindsight, caused more problems
than it solved at that time.

> Am I missing something  which is causing this ?
> What is proper way to set iommu ops to device ? 

The proper way would be to update to 4.9, where full generic
configuration and DMA ops support finally landed ;)

Robin.

> 
> Thanks
> Bhargav 
> 
> 




More information about the linux-arm-kernel mailing list