Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 989471cc authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

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: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 27e7a6ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment