Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753340AbXHKEke (ORCPT ); Sat, 11 Aug 2007 00:40:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750900AbXHKEkW (ORCPT ); Sat, 11 Aug 2007 00:40:22 -0400 Received: from turing-police.cc.vt.edu ([128.173.14.107]:45759 "EHLO turing-police.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbXHKEkU (ORCPT ); Sat, 11 Aug 2007 00:40:20 -0400 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Segher Boessenkool Cc: Herbert Xu , paulmck@linux.vnet.ibm.com, heiko.carstens@de.ibm.com, horms@verge.net.au, linux-kernel@vger.kernel.org, csnook@redhat.com, rpjday@mindspring.com, netdev@vger.kernel.org, ak@suse.de, cfriesen@nortel.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, jesper.juhl@gmail.com, linux-arch@vger.kernel.org, zlynx@acm.org, schwidefsky@de.ibm.com, davem@davemloft.net, wensong@linux-vs.org, wjiang@resilience.com Subject: Re: [PATCH 1/24] make atomic_read() behave consistently on alpha In-Reply-To: Your message of "Sat, 11 Aug 2007 02:38:40 +0200." From: Valdis.Kletnieks@vt.edu References: <442f95ba19f8622ce04cf0334f34be11@kernel.crashing.org> <20070811000029.GA12779@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1186807115_3018P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Sat, 11 Aug 2007 00:38:35 -0400 Message-ID: <7943.1186807115@turing-police.cc.vt.edu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 41 --==_Exmh_1186807115_3018P Content-Type: text/plain; charset=us-ascii On Sat, 11 Aug 2007 02:38:40 +0200, Segher Boessenkool said: > >> That means GCC cannot compile Linux; it already optimises > >> some accesses to scalars to smaller accesses when it knows > >> it is allowed to. Not often though, since it hardly ever > >> helps in the cost model it employs. > > > > Please give an example code snippet + gcc version + arch > > to back this up. > > unsigned char f(unsigned long *p) > { > return *p & 1; > } Not really valid, because it's still able to do one atomic access to compute the result. Now, if you had found an example where it converts a 32-bit atomic access into 2 separate 16-bit accesses that weren't atomic as a whole.... --==_Exmh_1186807115_3018P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFGvT1LcC3lWbTT17ARAmccAKCRd2ZxCdpo0ruAOJZXkpds4qazcwCff1OA WRSvt/dpaznIWvvdf7+Q/1o= =uesa -----END PGP SIGNATURE----- --==_Exmh_1186807115_3018P-- - 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/