From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 1/2] cpufreq: exynos: use relaxed IO accesors Date: Wed, 22 Jun 2016 11:53:32 +0200 Message-ID: <3668897.kYSEflAvDO@wuerfel> References: <1466587984-14105-1-git-send-email-ben.dooks@codethink.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1466587984-14105-1-git-send-email-ben.dooks@codethink.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org 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 , "Rafael J. Wysocki" , Ben Dooks List-Id: linux-pm@vger.kernel.org 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 > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 22 Jun 2016 11:53:32 +0200 Subject: [PATCH 1/2] cpufreq: exynos: use relaxed IO accesors In-Reply-To: <1466587984-14105-1-git-send-email-ben.dooks@codethink.co.uk> References: <1466587984-14105-1-git-send-email-ben.dooks@codethink.co.uk> Message-ID: <3668897.kYSEflAvDO@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 > 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