From: Ian Campbell Date: Thu, 27 Mar 2014 21:52:35 +0000 Subject: [U-Boot] [PATCH v2 2/9] sunxi: initial sun7i pinmux and gpio support In-Reply-To: <20140326090137.E004A3814B8@gemini.denx.de> References: <1395438845.2234.95.camel@hastur.hellion.org.uk> <1395438866-1193-2-git-send-email-ijc@hellion.org.uk> <201403242154.12633.marex@denx.de> <1395822638.29683.9.camel@dagon.hellion.org.uk> <20140326090137.E004A3814B8@gemini.denx.de> Message-ID: <1395957155.4541.24.camel@hastur.hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 2014-03-26 at 10:01 +0100, Wolfgang Denk wrote: > I'm not an expert for ARM, but this indeed looks suspiscious - thanks > for reporting this. FYI I made the change which prompted this and the resulting code was the same see https://groups.google.com/forum/#!topic/linux-sunxi/REZ18q0wcDY The barriers were only ever compile barrier() type, not cpu barriers. So the open coded thing was effectively: v = read(); barrier(); v = fiddlebits(b) barrier(); write(v); Whereas the code using clrsetbits is basically: write(fiddlebits(read())) Which I think is OK in this case at least. Not sure about the general case. Ian.