From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount Date: Fri, 30 Aug 2013 10:26:48 +1000 Message-ID: <1377822408.4028.44.camel@pasglop> References: <1375758759-29629-1-git-send-email-Waiman.Long@hp.com> <1375758759-29629-2-git-send-email-Waiman.Long@hp.com> <1377751465.4028.20.camel@pasglop> <20130829070012.GC27322@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Ingo Molnar , Waiman Long , Alexander Viro , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner , linux-fsdevel , Linux Kernel Mailing List , Peter Zijlstra , Steven Rostedt , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" , Michael Neuling To: Linus Torvalds Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2013-08-29 at 16:42 -0700, Linus Torvalds wrote: > For architecture people (ie Ben, if you want to try this on ppc64), > the thing that it needs from an architecture: > > - the raw_spinlock_t and the "unsigned long" needs to fit in a u64. I assume you mean unsigned int ? :-) .../... > - the architecture needs to implement a simple > "arch_spin_value_unlocked()" macro, which takes a raw_spinlock_t value > and says whether it is unlocked or not. What's wrong with the existing arch_spin_is_locked() ? BTW. Do you have your test case at hand ? Cheers, Ben.