• Andrew Morton's avatar
    [PATCH] Allow architectures to reenable interrupts on contended spinlocks · 07f94531
    Andrew Morton authored
    From: Keith Owens <kaos@sgi.com>
    
    As requested by Linus, update all architectures to add the common
    infrastructure.  Tested on ia64 and i386.
    
    Enable interrupts while waiting for a disabled spinlock, but only if
    interrupts were enabled before issuing spin_lock_irqsave().
    
    This patch consists of three sections :-
    
    * An architecture independent change to call _raw_spin_lock_flags()
      instead of _raw_spin_lock() when the flags are available.
    
    * An ia64 specific change to implement _raw_spin_lock_flags() and to
      define _raw_spin_lock(lock) as _raw_spin_lock_flags(lock, 0) for the
      ASM_SUPPORTED case.
    
    * Patches for all other architectures and for ia64 with !ASM_SUPPORTED
      to map _raw_spin_lock_flags(lock, flags) to _raw_spin_lock(lock).
      Architecture maintainers can define _raw_spin_lock_flags() to do
      something useful if they want to enable interrupts while waiting for
      a disabled spinlock.
    07f94531
spinlock.h 3.56 KB