[PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg
Zhou Wang
wangzhou1 at hisilicon.com
Tue Sep 29 07:15:32 EDT 2020
On 2020/9/29 6:13, Will Deacon wrote:
> On Mon, 28 Sep 2020 16:32:02 +0800, Zhou Wang wrote:
>> In arm_smmu_evtq_thread, reading event queue is from consumer pointer,
>> which has no address dependency on producer pointer, prog_reg(MMIO) and
>> event queue memory(Normal memory) can disorder. So the load for event queue
>> can be done before the load of prod_reg, then perhaps wrong event entry
>> value will be got.
>>
>> Add rmb to make sure to get correct event queue entry value.
>
> Applied to will (for-joerg/arm-smmu/updates), thanks!
>
> [1/1] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg
> https://git.kernel.org/will/c/a76a37777f2c
>
> (please note that I changed the patch to use readl() instead of an rmb()
> in conjunction with the _relaxed() accessor, and then adjusted the cons
> side to match in terms of DMB vs DSB).
Thanks for taking this patch!
Best,
Zhou
>
> Cheers,
>
More information about the linux-arm-kernel
mailing list