Re: [PATCH][2.6] Completely out of line spinlocks / i386

From: Linus Torvalds
Date: Sun Aug 08 2004 - 00:02:24 EST




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/