All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sricharan" <sricharan@codeaurora.org>
To: 'Arnd Bergmann' <arnd@arndb.de>
Cc: devicetree@vger.kernel.org, architt@codeaurora.org,
	linux-arm-msm@vger.kernel.org, joro@8bytes.org,
	iommu@lists.linux-foundation.org, robdclark@gmail.com,
	srinivas.kandagatla@linaro.org,
	laurent.pinchart@ideasonboard.com, treding@nvidia.com,
	robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org,
	stepanm@codeaurora.org
Subject: RE: [PATCH V4 6/7] iommu/msm: Use writel_relaxed and add a barrier
Date: Wed, 18 May 2016 18:03:51 +0530	[thread overview]
Message-ID: <003101d1b101$8ce470c0$a6ad5240$@codeaurora.org> (raw)
In-Reply-To: <2638968.1a16UdaY62@wuerfel>

Hi Arnd,
>> >
>> >These comments are completely useless. What is the specific race
>> >that you are protecting against, and why are the implicit barriers
>> >not sufficient here? Please find a better way to document what
>> >is going on.
>> >
>>
>> The reason for doing this was, when the tlb maintenance ops are called
>> by  io-pgtable functions, it expects that the tlb_range ops is complete
>> only after the tlb_sync callback is called. Previously we were using
>> writel and the sync in that case was dummy. Also previously every register
>> configuration write was done using writel,  which was an overkill. So now
>> we do all the writes with writel_relaxed  and a barrier in the end. I will
>> change the documentation for this.
>
>If you need the barrier after the write, it probably was already faulty
>before, because writel only implies a barrier before the store, not
>after. Of course all the barriers likely made the whole process so
>slow that you never hit that race in the end.

ya, it could have worked in this way and i never saw a race issue before this.
The only reason for changing this was to optimise out the additonal barriers
that were happening. I do not see any issue now as well, only that the writes would
be faster.

Regards,
 Sricharan

WARNING: multiple messages have this Message-ID (diff)
From: sricharan@codeaurora.org (Sricharan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 6/7] iommu/msm: Use writel_relaxed and add a barrier
Date: Wed, 18 May 2016 18:03:51 +0530	[thread overview]
Message-ID: <003101d1b101$8ce470c0$a6ad5240$@codeaurora.org> (raw)
In-Reply-To: <2638968.1a16UdaY62@wuerfel>

Hi Arnd,
>> >
>> >These comments are completely useless. What is the specific race
>> >that you are protecting against, and why are the implicit barriers
>> >not sufficient here? Please find a better way to document what
>> >is going on.
>> >
>>
>> The reason for doing this was, when the tlb maintenance ops are called
>> by  io-pgtable functions, it expects that the tlb_range ops is complete
>> only after the tlb_sync callback is called. Previously we were using
>> writel and the sync in that case was dummy. Also previously every register
>> configuration write was done using writel,  which was an overkill. So now
>> we do all the writes with writel_relaxed  and a barrier in the end. I will
>> change the documentation for this.
>
>If you need the barrier after the write, it probably was already faulty
>before, because writel only implies a barrier before the store, not
>after. Of course all the barriers likely made the whole process so
>slow that you never hit that race in the end.

ya, it could have worked in this way and i never saw a race issue before this.
The only reason for changing this was to optimise out the additonal barriers
that were happening. I do not see any issue now as well, only that the writes would
be faster.

Regards,
 Sricharan

  reply	other threads:[~2016-05-18 12:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16  6:48 [PATCH V4 0/7] iommu/msm: Add DT adaptation and generic bindings support Sricharan R
2016-05-16  6:48 ` Sricharan R
2016-05-16  6:48 ` [PATCH V4 1/7] iommu/msm: Add DT adaptation Sricharan R
2016-05-16  6:48   ` Sricharan R
     [not found] ` <1463381341-30498-1-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-05-16  6:48   ` [PATCH V4 2/7] documentation: iommu: Add bindings for msm,iommu-v0 ip Sricharan R
2016-05-16  6:48     ` [PATCH V4 2/7] documentation: iommu: Add bindings for msm, iommu-v0 ip Sricharan R
     [not found]     ` <1463381341-30498-3-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-05-16 16:44       ` [PATCH V4 2/7] documentation: iommu: Add bindings for msm,iommu-v0 ip Rob Herring
2016-05-16 16:44         ` Rob Herring
2016-05-18 12:08         ` Sricharan
2016-05-18 12:08           ` [PATCH V4 2/7] documentation: iommu: Add bindings for msm, iommu-v0 ip Sricharan
2016-05-16  6:48   ` [PATCH V4 3/7] iommu/msm: Move the contents from msm_iommu_dev.c to msm_iommu.c Sricharan R
2016-05-16  6:48     ` Sricharan R
2016-05-16  6:48   ` [PATCH V4 4/7] iommu/msm: Add support for generic master bindings Sricharan R
2016-05-16  6:48     ` Sricharan R
2016-05-16  6:48   ` [PATCH V4 5/7] iommu/msm: use generic ARMV7S short descriptor pagetable ops Sricharan R
2016-05-16  6:48     ` Sricharan R
2016-05-16  6:49   ` [PATCH V4 6/7] iommu/msm: Use writel_relaxed and add a barrier Sricharan R
2016-05-16  6:49     ` Sricharan R
2016-05-17 13:52     ` Arnd Bergmann
2016-05-17 13:52       ` Arnd Bergmann
2016-05-18 12:07       ` Sricharan
2016-05-18 12:07         ` Sricharan
2016-05-18 12:15         ` Arnd Bergmann
2016-05-18 12:15           ` Arnd Bergmann
2016-05-18 12:33           ` Sricharan [this message]
2016-05-18 12:33             ` Sricharan
2016-05-20 11:18           ` Sricharan
2016-05-20 11:18             ` Sricharan
2016-05-16  6:49 ` [PATCH V4 7/7] iommu/msm: Remove driver BROKEN Sricharan R
2016-05-16  6:49   ` Sricharan R

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='003101d1b101$8ce470c0$a6ad5240$@codeaurora.org' \
    --to=sricharan@codeaurora.org \
    --cc=architt@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stepanm@codeaurora.org \
    --cc=treding@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.