lkml.org 
[lkml]   [2004]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] 2.6.6-rc2 Allow architectures to reenable interrupts on contended spinlocks


    On Tue, 27 Apr 2004, Keith Owens wrote:
    >
    > This patch consists of an ia64 specific change (David Mosberger is
    > happy with it) and an architecture independent change. The latter has
    > no effect unless the architecture implements this feature and defines
    > __HAVE_ARCH_RAW_SPIN_LOCK_FLAGS. IOW, this change has no effect on
    > anything except ia64, unless the other architecture maintainers want to
    > implement this feature for their architecture.

    Aargh. Ugly ugly. Can you instead _first_ do all the infrastructure, and
    just add the unused "flags" argument to all architectures, ie take this
    part of the patch:

    > Index: 2.6.6-rc2/include/linux/spinlock.h
    > ===================================================================
    > --- 2.6.6-rc2.orig/include/linux/spinlock.h Thu Dec 18 13:58:49 2003
    > +++ 2.6.6-rc2/include/linux/spinlock.h Tue Apr 27 11:48:03 2004
    > @@ -184,6 +184,12 @@
    >
    > #endif /* !SMP */
    >
    > +#ifdef __HAVE_ARCH_RAW_SPIN_LOCK_FLAGS
    > +#define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0)
    > +#else
    > +#define _raw_spin_lock_flags(lock, flags) do { (void)flags; _raw_spin_lock(lock); } while(0)
    > +#endif
    > +
    > /*
    > * Define the various spin_lock and rw_lock methods. Note we define these
    > * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various
    > @@ -257,7 +263,7 @@
    > do { \
    > local_irq_save(flags); \
    > preempt_disable(); \
    > - _raw_spin_lock(lock); \
    > + _raw_spin_lock_flags(lock, flags); \
    > } while (0)
    >
    > #define spin_lock_irq(lock) \

    And remove the need for "__HAVE_ARCH_RAW_SPIN_LOCK_FLAGS", and instead
    create a patch where _all_ architectures have that

    _raw_spin_lock_flags()

    define, it's just that they ignore the "flags" value.

    I think the patch makes sense, but I'd rather make the infrastructure
    clean, than have another silly architecture flag.

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

    \
     
     \ /
      Last update: 2009-11-18 23:46    [W:0.021 / U:1.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site