From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751152AbZHRWYg (ORCPT ); Tue, 18 Aug 2009 18:24:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750926AbZHRWYf (ORCPT ); Tue, 18 Aug 2009 18:24:35 -0400 Received: from www.tglx.de ([62.245.132.106]:55249 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbZHRWYf (ORCPT ); Tue, 18 Aug 2009 18:24:35 -0400 Date: Wed, 19 Aug 2009 00:24:02 +0200 (CEST) From: Thomas Gleixner To: Kumar Gala cc: Linux-Kernel List , Benjamin Herrenschmidt , linuxppc-dev list , Ingo Molnar , Peter Zijlstra , Steven Rostedt Subject: Re: spin_is_locked() broken for uniprocessor? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Aug 2009, Kumar Gala wrote: > I just want to validate that what I'm seeing (for UP, non-debug features): > > spin_is_locked() is defined as: > > include/linux/spinlock.h:#define spin_is_locked(lock) > __raw_spin_is_locked(&(lock)->raw_lock) > > for UP that should get us: > > include/linux/spinlock_up.h:#define __raw_spin_is_locked(lock) ((void)(lock), > 0) > > 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. Thanks, tglx