From: Zhou Wang <wangzhou1@hisilicon.com>
To: Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
Joerg Roedel <joro@8bytes.org>
Cc: catalin.marinas@arm.com, iommu@lists.linux-foundation.org,
kernel-team@android.com, linuxarm@huawei.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg
Date: Tue, 29 Sep 2020 19:15:32 +0800 [thread overview]
Message-ID: <5F731754.5040609@hisilicon.com> (raw)
In-Reply-To: <160132830305.1858738.13352352759100546799.b4-ty@kernel.org>
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,
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-09-29 11:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 8:32 [PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg Zhou Wang
2020-09-28 22:13 ` Will Deacon
2020-09-29 11:15 ` Zhou Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5F731754.5040609@hisilicon.com \
--to=wangzhou1@hisilicon.com \
--cc=catalin.marinas@arm.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=joro@8bytes.org \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).