lkml.org 
[lkml]   [2022]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V9 05/15] asm-generic: spinlock: Add queued spinlock support in common header
    Date
    From: Guo Ren <guoren@linux.alibaba.com>

    Select queued spinlock or ticket lock by CONFIG_QUEUED_SPINLOCKS in
    the common header file. Define smp_mb__after_spinlock with smp_mb()
    as default.

    Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
    Signed-off-by: Guo Ren <guoren@kernel.org>
    ---
    include/asm-generic/spinlock.h | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/include/asm-generic/spinlock.h b/include/asm-generic/spinlock.h
    index 6f5a1b838ca2..349cdb46a99c 100644
    --- a/include/asm-generic/spinlock.h
    +++ b/include/asm-generic/spinlock.h
    @@ -3,7 +3,11 @@
    #ifndef __ASM_GENERIC_SPINLOCK_H
    #define __ASM_GENERIC_SPINLOCK_H

    +#ifdef CONFIG_QUEUED_SPINLOCKS
    +#include <asm-generic/qspinlock.h>
    +#else
    #include <asm-generic/ticket_spinlock.h>
    +#endif
    #include <asm/qrwlock.h>

    /* See include/linux/spinlock.h */
    --
    2.36.1
    \
     
     \ /
      Last update: 2022-08-08 09:16    [W:4.314 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site