• Will Deacon's avatar
    iommu/arm-smmu-v3: Use explicit mb() when moving cons pointer · 2e6743c6
    Will Deacon authored
    [ Upstream commit a868e853 ]
    
    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: 's avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    2e6743c6
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
amd_iommu.c Loading commit data...
amd_iommu_debugfs.c Loading commit data...
amd_iommu_init.c Loading commit data...
amd_iommu_proto.h Loading commit data...
amd_iommu_types.h Loading commit data...
amd_iommu_v2.c Loading commit data...
arm-smmu-regs.h Loading commit data...
arm-smmu-v3.c Loading commit data...
arm-smmu.c Loading commit data...
dma-iommu.c Loading commit data...
dmar.c Loading commit data...
exynos-iommu.c Loading commit data...
fsl_pamu.c Loading commit data...
fsl_pamu.h Loading commit data...
fsl_pamu_domain.c Loading commit data...
fsl_pamu_domain.h Loading commit data...
intel-iommu-debugfs.c Loading commit data...
intel-iommu.c Loading commit data...
intel-pasid.c Loading commit data...
intel-pasid.h Loading commit data...
intel-svm.c Loading commit data...
intel_irq_remapping.c Loading commit data...
io-pgtable-arm-v7s.c Loading commit data...
io-pgtable-arm.c Loading commit data...
io-pgtable.c Loading commit data...
io-pgtable.h Loading commit data...
iommu-debugfs.c Loading commit data...
iommu-sysfs.c Loading commit data...
iommu-traces.c Loading commit data...
iommu.c Loading commit data...
iova.c Loading commit data...
ipmmu-vmsa.c Loading commit data...
irq_remapping.c Loading commit data...
irq_remapping.h Loading commit data...
msm_iommu.c Loading commit data...
msm_iommu.h Loading commit data...
msm_iommu_hw-8xxx.h Loading commit data...
mtk_iommu.c Loading commit data...
mtk_iommu.h Loading commit data...
mtk_iommu_v1.c Loading commit data...
of_iommu.c Loading commit data...
omap-iommu-debug.c Loading commit data...
omap-iommu.c Loading commit data...
omap-iommu.h Loading commit data...
omap-iopgtable.h Loading commit data...
qcom_iommu.c Loading commit data...
rockchip-iommu.c Loading commit data...
s390-iommu.c Loading commit data...
tegra-gart.c Loading commit data...
tegra-smmu.c Loading commit data...