linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: peterz@infradead.org
To: ren_guo@c-sky.com
Cc: linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
	mathieu.desnoyers@efficios.com, Will Deacon <will@kernel.org>
Subject: csky: smp_mb__after_spinlock
Date: Wed, 5 Aug 2020 12:41:46 +0200	[thread overview]
Message-ID: <20200805104146.GP2674@hirez.programming.kicks-ass.net> (raw)

Hi,

While doing an audit of smp_mb__after_spinlock, I found that csky
defines it, why?

CSKY only has smp_mb(), it doesn't override __atomic_acquire_fence or
otherwise special cases it's atomic*_acquire() primitives. It has an
explicit smp_mb() in its arch_spin_lock().

---
diff --git a/arch/csky/include/asm/spinlock.h b/arch/csky/include/asm/spinlock.h
index 7cf3f2b34cea..22a05caf2d18 100644
--- a/arch/csky/include/asm/spinlock.h
+++ b/arch/csky/include/asm/spinlock.h
@@ -88,9 +88,6 @@ static inline int arch_spin_is_contended(arch_spinlock_t *lock)
 
 #include <asm/qrwlock.h>
 
-/* See include/linux/spinlock.h */
-#define smp_mb__after_spinlock()	smp_mb()
-
 #else /* CONFIG_QUEUED_RWLOCKS */
 
 /*

             reply	other threads:[~2020-08-05 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 10:41 peterz [this message]
2020-08-05 10:44 ` csky: smp_mb__after_spinlock peterz
2020-08-07  0:23   ` Guo Ren
2020-08-07  0:22 ` Guo Ren
2020-08-07  8:12   ` peterz

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=20200805104146.GP2674@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=ren_guo@c-sky.com \
    --cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).