From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265119AbUHHFBV (ORCPT ); Sun, 8 Aug 2004 01:01:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265127AbUHHFBV (ORCPT ); Sun, 8 Aug 2004 01:01:21 -0400 Received: from fw.osdl.org ([65.172.181.6]:5064 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S265119AbUHHFBT (ORCPT ); Sun, 8 Aug 2004 01:01:19 -0400 Date: Sat, 7 Aug 2004 22:01:15 -0700 (PDT) From: Linus Torvalds To: Zwane Mwaikambo 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 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. Also, why export the "failed" ones: > +#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. Linus