Re: [PATCH] ARCv2: spinlock: remove the extra smp_mb before lock, after unlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-snps-arc



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux