iommu: msm: Fix attach reference counting
During attach and detach the IOMMU driver calls into Performance
Monitor Unit (PMU) code to synchronize PMU register access. This
ensures PMU register access only occurs when IOMMU is powered ON.
However, the reference counting might get out of sync if a client
attaches to the same context bank more than once. On 2nd and
subsequent attach the reference count won't be incremented but
it will be decremented on each detach.
Change attach code to ensure every attach is accounted for.
Change-Id: I8c39ed77ca4980920fbc93c3a854cc2b11056b30
Signed-off-by:
Olav Haugan <ohaugan@codeaurora.org>
Loading
Please register or sign in to comment