Re: +spin_lock_irq-enable-interrupts-while-spinning-i386-implementation.patchadded to -mm tree

From: Daniel Walker
Date: Sat Jan 06 2007 - 17:37:28 EST


On Wed, 2007-01-03 at 13:12 -0800, akpm@xxxxxxxx wrote:
> -# define __raw_spin_lock_irq(lock) __raw_spin_lock(lock)
> +
> +static inline void __raw_spin_lock_irq(raw_spinlock_t *lock)
> +{
> + asm volatile("\n1:\t"
> + LOCK_PREFIX " ; decb %0\n\t"
> + "jns 3f\n"
> + STI_STRING "\n"
> + "2:\t"
> + "rep;nop\n\t"
> + "cmpb $0,%0\n\t"
> + "jle 2b\n\t"
> + CLI_STRING "\n"
> + "jmp 1b\n"
> + "3:\n\t"
> + : "+m" (lock->slock) : : "memory");
> +}
> #endif
>

This doesn't compile when CONFIG_PARAVIRT is enabled. It changes the
CLI_STRING and STI_STRING values.

Daniel

-
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/