Files
linux/drivers/iommu
Will Deacon d1069fc142 iommu/arm-smmu-v3: Use explicit mb() when moving cons pointer
[ Upstream commit a868e85304 ]

After removing an entry from a queue (e.g. reading an event in
arm_smmu_evtq_thread()) it is necessary to advance the MMIO consumer
pointer to free the queue slot back to the SMMU. A memory barrier is
required here so that all reads targetting the queue entry have
completed before the consumer pointer is updated.

The implementation of queue_inc_cons() relies on a writel() to complete
the previous reads, but this is incorrect because writel() is only
guaranteed to complete prior writes. This patch replaces the call to
writel() with an mb(); writel_relaxed() sequence, which gives us the
read->write ordering which we require.

Cc: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:44:54 +01:00
..
2018-09-09 20:01:24 +02:00
2015-02-03 18:47:18 +01:00
2016-06-21 13:56:00 +02:00
2017-12-20 10:07:28 +01:00
2016-09-16 09:34:15 +01:00