From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265127AbUHHFNa (ORCPT ); Sun, 8 Aug 2004 01:13:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265134AbUHHFNa (ORCPT ); Sun, 8 Aug 2004 01:13:30 -0400 Received: from dragnfire.mtl.istop.com ([66.11.160.179]:35583 "EHLO dsl.commfireservices.com") by vger.kernel.org with ESMTP id S265127AbUHHFN2 (ORCPT ); Sun, 8 Aug 2004 01:13:28 -0400 Date: Sun, 8 Aug 2004 01:17:19 -0400 (EDT) From: Zwane Mwaikambo To: Linus Torvalds Cc: Linux Kernel , Andrew Morton , Matt Mackall Subject: Re: [PATCH][2.6] Completely out of line spinlocks / i386 In-Reply-To: Message-ID: References: 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 On Sat, 7 Aug 2004, Linus Torvalds wrote: > On Sun, 8 Aug 2004, Zwane Mwaikambo wrote: > > > > Pulled from the -tiny tree, > > Hmm. > > You really shouldn't use %ebx for flags. Use %edx instead. > > %ebx is call-save, so by forcing gcc to use %edx, you're guaranteeing that > the compiler has to save/restore the register even for a simple function > that wouldn't otherwise need it. Thanks i'll change that. > Also, why export the "failed" ones: Actually that's now dead code since i had two variants but trimmed it, the other had the fast path acquisition code inline and called the failed procedures on contention. It'll have to go. > > +#ifdef CONFIG_COOL_SPINLOCK > > +extern void asmlinkage __spin_lock_failed(spinlock_t *); > > +extern void asmlinkage __spin_lock_failed_flags(spinlock_t *, unsigned long); > > +extern void asmlinkage __spin_lock_loop(spinlock_t *); > > +extern void asmlinkage __spin_lock_loop_flags(spinlock_t *, unsigned long); > > +EXPORT_SYMBOL(__spin_lock_failed); > > +EXPORT_SYMBOL(__spin_lock_failed_flags); > > +EXPORT_SYMBOL(__spin_lock_loop); > > +EXPORT_SYMBOL(__spin_lock_loop_flags); > > +#endif > > that looks just broken. _raw_spin_lock will have the symbol __spin_lock_loop{,_flags} when used in symbols, modules won't load otherwise.