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

Daniel Walker
2007-01-06T22:36:57Z

On Wed, 2007-01-03 at 13:12 -0800, akpm@osdl.org 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