iommu/arm-smmu: convert atos spinlock to a mutex
Because of a hardware errata, arm_smmu_iova_to_phys_hard will soon be
making a TZ call to do a workaround. However, we're currently using a
spinlock to ensure atomicity of ATOS due to another hardware errata, but
scm_call is a sleeping function, so this results in a sleeping BUG. Fix
this by making the atos lock a mutex instead of a spinlock.
This isn't exactly correct since iommu_iova_to_phys itself might be
called from atomic context, so we really shouldn't be taking a mutex.
However, we don't seem to have any use cases where it will be called
from atomic context, but we should revert all of this and go back to a
spinlock as soon as this hardware errata goes away (which will happen
when Thulium v1 dies).
Change-Id: I61ea37bb3e6989fe5db43c4e828fc6473885db1e
Signed-off-by:
Mitchel Humpherys <mitchelh@codeaurora.org>
Loading
Please register or sign in to comment