From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH RFC] locking: Add volatile to arch_spinlock_t structures Date: Thu, 4 Dec 2014 12:12:05 -0800 Message-ID: <20141204201205.GA27787@linux.vnet.ibm.com> References: <20141204062005.GA2553@linux.vnet.ibm.com> <20141204070248.GJ25340@linux.vnet.ibm.com> <20141204183628.GT25340@linux.vnet.ibm.com> <20141204200052.GY25340@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from e37.co.us.ibm.com ([32.97.110.158]:53721 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754053AbaLDUMM (ORCPT ); Thu, 4 Dec 2014 15:12:12 -0500 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Dec 2014 13:12:12 -0700 Content-Disposition: inline In-Reply-To: <20141204200052.GY25340@linux.vnet.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Linus Torvalds Cc: "linux-arch@vger.kernel.org" , Davidlohr Bueso , Dmitry Vyukov , Peter Zijlstra , Linux Kernel Mailing List , Ingo Molnar On Thu, Dec 04, 2014 at 12:00:52PM -0800, Paul E. McKenney wrote: [ . . . ] > So any compiler that clobbers some adjacent non-bitfield variable or > field that is accessible by other threads is not just despicable, it > fails to conform to the standard. > > Whew! ;-) And part of the reason for my confusion is that I am using an old version of gcc, 4.6.3. Apparently this aspect of gcc wasn't fixed until 4.7 or thereabouts. Thanx, Paul