Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758911AbXHQXjX (ORCPT ); Fri, 17 Aug 2007 19:39:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752190AbXHQXjK (ORCPT ); Fri, 17 Aug 2007 19:39:10 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:46455 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbXHQXjI (ORCPT ); Fri, 17 Aug 2007 19:39:08 -0400 Date: Sat, 18 Aug 2007 05:21:42 +0530 (IST) From: Satyam Sharma X-X-Sender: satyam@enigma.security.iitk.ac.in To: Segher Boessenkool cc: Paul Mackerras , heiko.carstens@de.ibm.com, horms@verge.net.au, Linux Kernel Mailing List , rpjday@mindspring.com, ak@suse.de, netdev@vger.kernel.org, cfriesen@nortel.com, Nick Piggin , linux-arch@vger.kernel.org, jesper.juhl@gmail.com, Andrew Morton , zlynx@acm.org, clameter@sgi.com, schwidefsky@de.ibm.com, Chris Snook , Herbert Xu , davem@davemloft.net, Linus Torvalds , wensong@linux-vs.org, wjiang@resilience.com Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures In-Reply-To: Message-ID: References: <46C32618.2080108@redhat.com> <20070815234021.GA28775@gondor.apana.org.au> <3694fb2e4ed1e4d9bf873c0d050c911e@kernel.crashing.org> <46C3B50E.7010702@yahoo.com.au> <194369f4c96ea0e24decf8f9197d5bad@kernel.crashing.org> <46C505B2.6030704@yahoo.com.au> <18117.4848.695269.72976@cargo.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1617 Lines: 45 On Sat, 18 Aug 2007, Segher Boessenkool wrote: > > #define forget(a) __asm__ __volatile__ ("" :"=m" (a) :"m" (a)) > > > > [ This is exactly equivalent to using "+m" in the constraints, as recently > > explained on a GCC list somewhere, in response to the patch in my bitops > > series a few weeks back where I thought "+m" was bogus. ] > > [It wasn't explained on a GCC list in response to your patch, as > far as I can see -- if I missed it, please point me to an archived > version of it]. http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01758.html is a follow-up in the thread on the gcc-patches@gcc.gnu.org mailing list, which began with: http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01677.html that was posted by Jan Kubicka, as he quotes in that initial posting, after I had submitted: http://lkml.org/lkml/2007/7/23/252 which was a (wrong) patch to "rectify" what I thought was the "bogus" "+m" constraint, as per the quoted extract from gcc docs (that was given in that (wrong) patch's changelog). That's when _I_ came to know how GCC interprets "+m", but probably this has been explained on those lists multiple times. Who cares, anyway? > One last time: it isn't equivalent on older (but still supported > by Linux) versions of GCC. Current versions of GCC allow it, but > it has no documented behaviour at all, so use it at your own risk. True. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/