OSDN Git Service

iommu/arm-smmu: Make arm_smmu_unprepare_pgtable atomic
authorMitchel Humpherys <mitchelh@codeaurora.org>
Thu, 30 Jul 2015 20:04:22 +0000 (13:04 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:13:47 +0000 (11:13 -0700)
commit2b39d026fbde0220f85980f1a3b2bad36bd4fad0
treee519e23d9f3bce36ddd39a714866c0b392bff64a
parent52c8720e5cf479aae5dc8d0ac7d2c4afd261e446
iommu/arm-smmu: Make arm_smmu_unprepare_pgtable atomic

Currently, arm_smmu_unprepare_pgtable makes a hypervisor call to
unassign the memory being freed up.  However, this is a sleeping call
and arm_smmu_unprepare_pgtable can be called from atomic context.  Fix
this by making arm_smmu_unprepare_pgtable atomic in a similar manner to
arm_smmu_prepare_pgtable (put the addresses to be unprepared on a list
and unprepare them at the end of unmap).

Change-Id: Ifba40ca3ceb4aaf328a1a570e0ee6c39088075ba
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
drivers/iommu/arm-smmu.c