Commit 4313f5f5 authored by Zheng Chongzhen's avatar Zheng Chongzhen Committed by Zheng Zengkai
Browse files

sw64: re-implement sw64_dma_direct_ops according upstream

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56OSP



--------------------------------

The upstream changes the interface implementation of the dma map to
remove the swiotlb_dma_ops and the dma_direct_ops, which is mentioned
in commit 55897af6 ("dma-direct: merge swiotlb_dma_ops into the
dma_direct code") and commit 356da6d0 ("dma-mapping: bypass
indirect calls for dma-direct"), so we re-implement the arch-specific
direct dma_ops and merge swiotlb_dma_ops.

There is still a risk for 32-bit devices, as there is no guarantee that
less than 4G address will be successfully allocated under the current
default policy. In this case, it should add "swiotlb=force" to cmdline
to use swiotlb map to ensure correctness. Why not use swiotlb in the
default policy? One reason is that there are few 32-bit devices today,
while dma performance of 64-bit devices will suffer when enabled.

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 79d64e05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment