sw64: iommu: fix 32-bit devices dma ops
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OSP -------------------------------- dma_mask is not sufficient to determine whether the device is 32-bit or not, while coherent_dma_mask is required as well. The addressing capability of a device depends on the minimum of them. Because 32-bit devices with sunway_dma_ops have to be set to IOMMU_DOMAIN_DMA, which may raise DMA using address allocated by BIOS and lead to iommu exception. So we change dma ops to arch-specific direct dma_ops for 32-bit devices. Signed-off-by:Zheng Chongzhen <zhengchongzhen@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com> Acked-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment