Commit 1278d6b8 authored by Zheng Chongzhen's avatar Zheng Chongzhen Committed by Zheng Zengkai
Browse files

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: default avatarZheng Chongzhen <zhengchongzhen@wxiat.com>

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 4313f5f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment