From: peterz@infradead.org (Peter Zijlstra)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] ARCv2: spinlock: remove the extra smp_mb before lock, after unlock
Date: Fri, 8 Mar 2019 09:37:48 +0100 [thread overview]
Message-ID: <20190308083748.GP32477@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1552008946-8008-1-git-send-email-vgupta@synopsys.com>
On Thu, Mar 07, 2019@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.
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Vineet Gupta <vineet.gupta1@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARCv2: spinlock: remove the extra smp_mb before lock, after unlock
Date: Fri, 8 Mar 2019 09:37:48 +0100 [thread overview]
Message-ID: <20190308083748.GP32477@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1552008946-8008-1-git-send-email-vgupta@synopsys.com>
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.
next prev parent reply other threads:[~2019-03-08 8:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 1:35 [PATCH] ARCv2: spinlock: remove the extra smp_mb before lock, after unlock Vineet Gupta
2019-03-08 1:35 ` Vineet Gupta
2019-03-08 8:35 ` Peter Zijlstra
2019-03-08 8:35 ` Peter Zijlstra
2019-03-08 8:37 ` Peter Zijlstra [this message]
2019-03-08 8:37 ` Peter Zijlstra
2019-03-08 18:50 ` Vineet Gupta
2019-03-08 18:50 ` Vineet Gupta
2019-03-08 8:39 ` Peter Zijlstra
2019-03-08 8:39 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190308083748.GP32477@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-snps-arc@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.