lkml.org 
[lkml]   [2019]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARCv2: spinlock: remove the extra smp_mb before lock, after unlock
On Thu, Mar 07, 2019 at 05:35:46PM -0800, Vineet Gupta wrote:
> @@ -68,8 +72,6 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
> smp_mb();
>
> lock->slock = __ARCH_SPIN_LOCK_UNLOCKED__;
> -
> - smp_mb();
> }
>
> /*

> @@ -226,8 +218,6 @@ static inline void arch_write_unlock(arch_rwlock_t *rw)
> smp_mb();
>
> rw->counter = __ARCH_RW_LOCK_UNLOCKED__;
> -
> - smp_mb();
> }
>
> #else /* !CONFIG_ARC_HAS_LLSC */

I'm thinking those assignments should be WRITE_ONCE() at the very least.

\
 
 \ /
  Last update: 2019-03-08 09:38    [W:0.053 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site