• Guo Ren's avatar
    csky: Fixup futex SMP implementation · d6c5cb9f
    Guo Ren authored
    Arnd said:
    I would guess that for csky, this is a mistake, as the architecture
    is fairly new and should be able to implement it.
    
    Guo reply:
    The c610, c807, c810 don't support SMP, so futex_cmpxchg_enabled = 1
    with asm-generic's implementation.
    For c860, there is no HAVE_FUTEX_CMPXCHG and cmpxchg_inatomic/inuser
    implementation, so futex_cmpxchg_enabled = 0.
    
    Thx for point it out, we'll implement cmpxchg_inatomic/inuser for
    C860 and still use asm-generic for non-smp CPUs.
    
    LTP test:
    futex_wait01    1  TPASS  :  futex_wait(): errno=ETIMEDOUT(110): Connection timed out
    futex_wait01    2  TPASS  :  futex_wait(): errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
    futex_wait01    3  TPASS  :  futex_wait(): errno=ETIMEDOUT(110): Connection timed out
    futex_wait01    4  TPASS  :  futex_wait(): errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
    futex_wait02    1  TPASS  :  futex_wait() woken up
    futex_wait03    1  TPASS  :  futex_wait() woken up
    futex_wait04    1  TPASS  :  futex_wait() returned -1: errno=EAGAIN/EWOULDBLOCK(11): Resource temporarily unavailable
    Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
    Cc: Arnd Bergmann <arnd@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Paul E. McKenney <paulmck@kernel.org>
    Link: https://lore.kernel.org/lkml/CAK8P3a3+WaQNyJ6Za2qfu6=0mBgU1hApnRXrdp1b1=P7wwyRUg@mail.gmail.com/
    d6c5cb9f
Kconfig 6.86 KB