All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@lists.codethink.co.uk,
	linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ben Dooks <ben.dooks@codethink.co.uk>
Subject: Re: [PATCH 1/2] cpufreq: exynos: use relaxed IO accesors
Date: Wed, 22 Jun 2016 11:53:32 +0200	[thread overview]
Message-ID: <3668897.kYSEflAvDO@wuerfel> (raw)
In-Reply-To: <1466587984-14105-1-git-send-email-ben.dooks@codethink.co.uk>

On Wednesday, June 22, 2016 10:33:03 AM CEST Ben Dooks wrote:
> The use of __raw IO accesors is not endian safe and should be used
> sparingly. The relaxed variants should be as lightweight and also
> are endian safe.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> 

Why not use the normal readl/writel() here instead of the relaxed version?

Either one should work here, but in general I'd recommend using the
non-relaxed version unless code is particularly performance sensitive.

The main argument for that is to not let people get used to using
_relaxed() all the time because it causes some very hard to debug
problems in the cases where you actually need the barriers.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] cpufreq: exynos: use relaxed IO accesors
Date: Wed, 22 Jun 2016 11:53:32 +0200	[thread overview]
Message-ID: <3668897.kYSEflAvDO@wuerfel> (raw)
In-Reply-To: <1466587984-14105-1-git-send-email-ben.dooks@codethink.co.uk>

On Wednesday, June 22, 2016 10:33:03 AM CEST Ben Dooks wrote:
> The use of __raw IO accesors is not endian safe and should be used
> sparingly. The relaxed variants should be as lightweight and also
> are endian safe.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> 

Why not use the normal readl/writel() here instead of the relaxed version?

Either one should work here, but in general I'd recommend using the
non-relaxed version unless code is particularly performance sensitive.

The main argument for that is to not let people get used to using
_relaxed() all the time because it causes some very hard to debug
problems in the cases where you actually need the barriers.

	Arnd

  parent reply	other threads:[~2016-06-22  9:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  9:33 [PATCH 1/2] cpufreq: exynos: use relaxed IO accesors Ben Dooks
2016-06-22  9:33 ` Ben Dooks
2016-06-22  9:35 ` Viresh Kumar
2016-06-22  9:35   ` Viresh Kumar
2016-06-22  9:37   ` Ben Dooks
2016-06-22  9:37     ` Ben Dooks
2016-06-22  9:53 ` Arnd Bergmann [this message]
2016-06-22  9:53   ` Arnd Bergmann
2016-06-22 10:36   ` Krzysztof Kozlowski
2016-06-22 10:36     ` Krzysztof Kozlowski
2016-06-22 10:37     ` Viresh Kumar
2016-06-22 10:37       ` Viresh Kumar
2016-06-22 11:59 ` Krzysztof Kozlowski
2016-06-22 11:59   ` Krzysztof Kozlowski

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=3668897.kYSEflAvDO@wuerfel \
    --to=arnd@arndb.de \
    --cc=ben.dooks@codethink.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.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 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.