Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670680
| From | Zhen Lei <thunder.leizhen@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod |
| Date | 2017-06-20 13:10 +0200 |
| Message-ID | <tUpcK-7R1-39@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This function is protected by spinlock, and the latter will do memory barrier implicitly. So that we can safely use writel_relaxed. In fact, the dmb operation will lengthen the time protected by lock, which indirectly increase the locking confliction in the stress scene. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 380969a..d2fbee3 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -728,7 +728,7 @@ static void queue_inc_prod(struct arm_smmu_queue *q) u32 prod = (Q_WRP(q, q->prod) | Q_IDX(q, q->prod)) + 1; q->prod = Q_OVF(q, q->prod) | Q_WRP(q, prod) | Q_IDX(q, prod); - writel(q->prod, q->prod_reg); + writel_relaxed(q->prod, q->prod_reg); } /* -- 2.5.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod Zhen Lei <thunder.leizhen@huawei.com> - 2017-06-20 13:10 +0200
Re: [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod Robin Murphy <robin.murphy@arm.com> - 2017-06-20 13:40 +0200
Re: [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2017-06-21 03:30 +0200
Re: [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod Will Deacon <will.deacon@arm.com> - 2017-06-21 11:10 +0200
Re: [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2017-06-26 15:40 +0200
Re: [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2017-06-26 15:50 +0200
csiph-web