[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120301113031.GD3124@opensource.wolfsonmicro.com>
Date: Thu, 1 Mar 2012 11:30:32 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: "Ying-Chun Liu (PaulLiu)" <paul.liu@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linaro-dev@...ts.linaro.org, patches@...aro.org,
Samuel Ortiz <sameo@...ux.intel.com>,
Shawn Guo <shawn.guo@...aro.org>
Subject: Re: [PATCH v5 1/2] mfd: Add anatop mfd driver
On Thu, Mar 01, 2012 at 05:10:51PM +0800, Ying-Chun Liu (PaulLiu) wrote:
> + spin_lock(&adata->reglock);
> + val = readl(adata->ioreg + addr);
> + spin_unlock(&adata->reglock);
Do you really need to take a lock for a single read operation from a
memory mapped register? I'd expect this to be atomic in itself. You
need to lock on read/modify/write cycles to make sure that you don't get
a read/read/modify/modify/write/write and misplace one of the modifies
but that's not an issue for an isolated read.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists