• Chris Metcalf's avatar
    tile: use READ_ONCE() in arch_spin_is_locked() · 627ae548
    Chris Metcalf authored
    This avoid potential issues if callers were to loop on these
    routines without some kind of memory barrier.  Currently there
    are no such users in-tree, but it seems better safe than sorry.
    
    Also, in the tilepro case we read "current" before "next",
    which gives us a slightly better guarantee that the lock was
    actually unlocked at least momentarily if we return claiming
    that it is not locked.  None of the callers actually rely on
    this behavior, as far as I know, however.
    Signed-off-by: default avatarChris Metcalf <cmetcalf@ezchip.com>
    627ae548
spinlock_64.h 4.57 KB