From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbZH0JdR (ORCPT ); Thu, 27 Aug 2009 05:33:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752128AbZH0JdQ (ORCPT ); Thu, 27 Aug 2009 05:33:16 -0400 Received: from gate.crashing.org ([63.228.1.57]:44596 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752131AbZH0JdP (ORCPT ); Thu, 27 Aug 2009 05:33:15 -0400 Subject: Re: spin_is_locked() broken for uniprocessor? From: Benjamin Herrenschmidt To: Peter Zijlstra Cc: David Howells , Steven Rostedt , Linux-Kernel List , linuxppc-dev list , Thomas Gleixner , Ingo Molnar In-Reply-To: <1250674870.7583.334.camel@twins> References: <7099.1250674686@redhat.com> <1250674870.7583.334.camel@twins> Content-Type: text/plain Date: Thu, 27 Aug 2009 19:32:34 +1000 Message-Id: <1251365554.20467.51.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2009-08-19 at 11:41 +0200, Peter Zijlstra wrote: > > > > which implies to me that spin_is_locked() will always return > false. Is this > > > > expected behavior. > > > > > > That's wrong. spin_is_locked should always return true on UP. > > > > Surely it's not that simple? Maybe spin_is_lock() should be > undefined on UP. > > #define spin_is_locked(l) panic() > > should sort things out quickly ;-) Not defining it would sort things out even faster and avoid nasty case of system panic'ing when a module is loaded :-) Cheers, Ben.