Re: [PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg

2020-09-29 Thread Zhou Wang
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

Re: [PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg

2020-09-28 Thread Will Deacon
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

[PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg

2020-09-28 Thread Zhou Wang
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 wi