iommu/arm-smmu: Consolidate stream map entry state

In order to consider SMR masking, we really want to be able to validate
ID/mask pairs against existing SMR contents to prevent stream match
conflicts, which at best would cause transactions to fault unexpectedly,
and at worst lead to silent unpredictable behaviour. With our SMMU
instance data holding only an allocator bitmap, and the SMR values
themselves scattered across master configs hanging off devices which we
may have no way of finding, there's essentially no way short of digging
everything back out of the hardware. Similarly, the thought of power
management ops to support suspend/resume faces the exact same problem.

By massaging the software state into a closer shape to the underlying
hardware, everything comes together quite nicely; the allocator and the
high-level view of the data become a single centralised state which we
can easily keep track of, and to which any updates can be validated in
full before being synchronised to the hardware itself.

Change-Id: I8cb45bcabb0ab88412336e09d9d837670cd206ea
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: 1f3d5ca43019bff1105838712d55be087d93c0da
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-4.4
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
1 file changed