OSDN Git Service

iommu/arm-smmu: Check the return type of map_sg and take appropriate action
authorRohit Vaswani <rvaswani@codeaurora.org>
Wed, 19 Aug 2015 00:57:44 +0000 (17:57 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:14:03 +0000 (11:14 -0700)
commit599de5c63b6d9af25ee0af903d78836178adc6b0
treefcede8935a48b4e11c5bcce585fa7dd47cda56e7
parent0934068545d730e892b00d9f641699a94eea926a
iommu/arm-smmu: Check the return type of map_sg and take appropriate action

We cannot call unmap directly if the map_sg fails partially as the tlb
invalidate functions need to enable/prepare clocks, which require
non-atomic context. Let map_sg return the failure and handle this when
we are out of the atomic context.

Change-Id: I6401c1e281850aeda27e32524cae34324045f762
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
drivers/iommu/arm-smmu.c
drivers/iommu/io-pgtable-arm.c
drivers/iommu/io-pgtable.h