arm64/dma-mapping: __generic_dma_ops always call swiotlb_dma_ops
authorJianqun Xu <jay.xu@rock-chips.com>
Tue, 26 Jul 2016 09:21:25 +0000 (17:21 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Tue, 26 Jul 2016 11:11:09 +0000 (19:11 +0800)
commit3e89f7de9a3abe9cff127e161d4e11699554cb76
treed48ca7765b13dece7689892cae6b3a1a4b82223d
parent9774b15bc34f22fe7cf96208864b5fe4fc5f87b4
arm64/dma-mapping: __generic_dma_ops always call swiotlb_dma_ops

Arm64 dma-mapping will return dummy_dma_ops if none call arch_setup_dma_ops
at device creation time.

For ion APIS, ion_pages_sync_for_device and ion_pages_sync_for_cpu always
pass "NULL" as device, then dma-mapping return dummy_dma_ops, which cause
ion pages fail to sync.

This patch fixs __generic_dma_ops to return swiotlb_dma_ops instead of
dummy_dma_ops.

Change-Id: Ic00db5d4547bcd5f74e5fd155133fde408a05cdb
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
arch/arm64/include/asm/dma-mapping.h
arch/arm64/mm/dma-mapping.c