Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932108AbXHWUN2 (ORCPT ); Thu, 23 Aug 2007 16:13:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758648AbXHWUNT (ORCPT ); Thu, 23 Aug 2007 16:13:19 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:50451 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757719AbXHWUNR (ORCPT ); Thu, 23 Aug 2007 16:13:17 -0400 Date: Thu, 23 Aug 2007 13:12:32 -0700 (PDT) From: Linus Torvalds To: Segher Boessenkool cc: Hirokazu Takata , "Robert P. J. Day" , paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, "Luck, Tony" , akpm@linux-foundation.org, linux-arch@vger.kernel.org, Chris Snook , Chris Friesen Subject: Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r In-Reply-To: Message-ID: References: <46C03885.7000109@redhat.com> <20070813112452.GK24018@shell.boston.redhat.com> <46CC42EF.3030602@redhat.com> <8fc86c23579e12b012891d6e69b1b107@kernel.crashing.org> 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: 772 Lines: 30 On Thu, 23 Aug 2007, Segher Boessenkool wrote: > > This simply isn't true. The compiler *can* combine asm stuff: Please Segher, just shut up. The combining, which I've mentioned *multiple*times* is if (atomic_read(&x) <= 1) and dammit, if that doesn't result in a *single* instruction, the code generation is pure and utter crap. It should result in cmpl $1,offset(reg) and nothing else. And there is no way in hell you are doing that with "atomic_read()" being inline asm. So can you now just go away? Linus - 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/