Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030186AbVINWEM (ORCPT ); Wed, 14 Sep 2005 18:04:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965059AbVINWEG (ORCPT ); Wed, 14 Sep 2005 18:04:06 -0400 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:15633 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id S965058AbVINWEA (ORCPT ); Wed, 14 Sep 2005 18:04:00 -0400 Date: Wed, 14 Sep 2005 23:03:53 +0100 From: Russell King To: Nick Piggin Cc: Roman Zippel , Linux Kernel Mailing List , Dipankar Sarma , "David S. Miller" Subject: Re: [PATCH 5/5] remove HAVE_ARCH_CMPXCHG Message-ID: <20050914230352.G30746@flint.arm.linux.org.uk> Mail-Followup-To: Nick Piggin , Roman Zippel , Linux Kernel Mailing List , Dipankar Sarma , "David S. Miller" References: <43283825.7070309@yahoo.com.au> <4328387E.6050701@yahoo.com.au> <432838E8.5030302@yahoo.com.au> <432839F1.5020907@yahoo.com.au> <43283B66.8080005@yahoo.com.au> <432854B6.1020408@yahoo.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <432854B6.1020408@yahoo.com.au>; from nickpiggin@yahoo.com.au on Thu, Sep 15, 2005 at 02:49:58AM +1000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1493 Lines: 43 On Thu, Sep 15, 2005 at 02:49:58AM +1000, Nick Piggin wrote: > Roman Zippel wrote: > > Hi, > > > > On Thu, 15 Sep 2005, Nick Piggin wrote: > > > > > >>Is there any point in keeping this around? > > > > > > Yes, for drivers which want to use it to synchronize with userspace. > > Alternatively it could be changed into a Kconfig definition. > > > > I think it already is. At least, I did grep for it and didn't > see anything. > > I think userspace synchronization may be quite a valid use of > atomic cmpxchg, but Kconfig is a far better place to do it than > testing HAVE_ARCH_CMPXCHG. What business has userspace got of telling whether cmpxchg works on an architecture by looking at kernel headers? Even if an architecture provides an implementation of it, it might rely on turning IRQs off, which may not be possible in userspace, leading to the userspace version actually being non-atomic. *Forget* kernel includes telling userspace what architecture features are available. It's extremely buggy by design. If you want to remove HAVE_ARCH_CMPXCHG that's fine. If userspace complains, you've found a bug for them. 8) -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core - 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/