Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965258AbVLRTzI (ORCPT ); Sun, 18 Dec 2005 14:55:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965261AbVLRTzI (ORCPT ); Sun, 18 Dec 2005 14:55:08 -0500 Received: from smtp.osdl.org ([65.172.181.4]:60549 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S965259AbVLRTzG (ORCPT ); Sun, 18 Dec 2005 14:55:06 -0500 Date: Sun, 18 Dec 2005 11:54:32 -0800 (PST) From: Linus Torvalds To: James Bottomley cc: Russell King , Nicolas Pitre , David Howells , Steven Rostedt , linux-arch@vger.kernel.org, lkml , mingo@redhat.com, Andrew Morton Subject: Re: [PATCH 1/12]: MUTEX: Implement mutexes In-Reply-To: <1134934887.3517.15.camel@mulgrave> Message-ID: References: <200512162313.jBGND7g4019623@warthog.cambridge.redhat.com> <1134791914.13138.167.camel@localhost.localdomain> <14917.1134847311@warthog.cambridge.redhat.com> <20051218092616.GA17308@flint.arm.linux.org.uk> <1134934887.3517.15.camel@mulgrave> 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: 857 Lines: 23 On Sun, 18 Dec 2005, James Bottomley wrote: > > Actually, I don't think you want might_sleep(): there are a few cases > where we do an up() from under a spinlock, which will spuriously trigger > this. I'd suggest WARN_ON(in_interrupt()) instead. Ahh, good point. Yes. However, if even the arm people aren't all that interested in this, maybe it simply doesn't matter. A lot of other architectures either have "decrement in memory" or can already use ll/sc for it. (of course, on some architectures, ll/sc is really really slow, so they might well prefer using a normal load and store instead). 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/