From: guoren@kernel.org <guoren@kernel.org>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH V2 0/5] Generic Ticket Spinlocks
Date: Sat, 19 Mar 2022 11:54:52 +0800 [thread overview]
Message-ID: <20220319035457.2214979-1-guoren@kernel.org> (raw)
From: Guo Ren <guoren@linux.alibaba.com>
Palmer:
Peter sent an RFC out about a year ago
<https://lore.kernel.org/lkml/YHbBBuVFNnI4kjj3@hirez.programming.kicks-ass.net/>,
but after a spirited discussion it looks like we lost track of things.
IIRC there was broad consensus on this being the way to go, but there
was a lot of discussion so I wasn't sure. Given that it's been a year,
I figured it'd be best to just send this out again formatted a bit more
explicitly as a patch.
This has had almost no testing (just a build test on RISC-V defconfig),
but I wanted to send it out largely as-is because I didn't have a SOB
from Peter on the code. I had sent around something sort of similar in
spirit, but this looks completely re-written. Just to play it safe I
wanted to send out almost exactly as it was posted. I'd probably rename
this tspinlock and tspinlock_types, as the mis-match kind of makes my
eyes go funny, but I don't really care that much. I'll also go through
the other ports and see if there's any more candidates, I seem to
remember there having been more than just OpenRISC but it's been a
while.
I'm in no big rush for this and given the complex HW dependencies I
think it's best to target it for 5.19, that'd give us a full merge
window for folks to test/benchmark it on their systems to make sure it's
OK. RISC-V has a forward progress guarantee so we should be safe, but
these can always trip things up.
Guo:
Update V2 with Arnd's suggestion [1].
[1] https://lore.kernel.org/linux-arch/CAK8P3a0NMPVGVw7===uEOtNnu1hr1GqimMbZT+Kea1CUxRvPmw at mail.gmail.com/raw
Changes in V2:
- Follow Arnd suggestion to make the patch series more generic.
- Add csky in the series.
- Combine RISC-V's two patches into one.
- Modify openrisc's patch to suit the new generic version.
Guo Ren (1):
csky: Move to generic ticket-spinlock
Palmer Dabbelt (1):
RISC-V: Move to ticket-spinlocks & RW locks
Peter Zijlstra (3):
asm-generic: ticket-lock: New generic ticket-based spinlock
asm-generic: qspinlock: Indicate the use of mixed-size atomics
openrisc: Move to ticket-spinlock
arch/csky/include/asm/Kbuild | 3 +-
arch/csky/include/asm/spinlock.h | 89 --------------
arch/csky/include/asm/spinlock_types.h | 27 -----
arch/openrisc/Kconfig | 1 -
arch/openrisc/include/asm/Kbuild | 7 +-
arch/openrisc/include/asm/spinlock.h | 27 -----
arch/openrisc/include/asm/spinlock_types.h | 7 --
arch/riscv/Kconfig | 1 +
arch/riscv/include/asm/Kbuild | 2 +
arch/riscv/include/asm/spinlock.h | 135 ---------------------
arch/riscv/include/asm/spinlock_types.h | 25 ----
include/asm-generic/qspinlock.h | 30 +++++
include/asm-generic/spinlock.h | 11 +-
include/asm-generic/spinlock_types.h | 15 +++
include/asm-generic/ticket-lock-types.h | 11 ++
include/asm-generic/ticket-lock.h | 86 +++++++++++++
16 files changed, 157 insertions(+), 320 deletions(-)
delete mode 100644 arch/csky/include/asm/spinlock.h
delete mode 100644 arch/csky/include/asm/spinlock_types.h
delete mode 100644 arch/openrisc/include/asm/spinlock.h
delete mode 100644 arch/openrisc/include/asm/spinlock_types.h
delete mode 100644 arch/riscv/include/asm/spinlock.h
delete mode 100644 arch/riscv/include/asm/spinlock_types.h
create mode 100644 include/asm-generic/spinlock_types.h
create mode 100644 include/asm-generic/ticket-lock-types.h
create mode 100644 include/asm-generic/ticket-lock.h
--
2.25.1
next reply other threads:[~2022-03-19 3:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-19 3:54 guoren [this message]
2022-03-19 3:54 ` [OpenRISC] [PATCH V2 1/5] asm-generic: ticket-lock: New generic ticket-based spinlock guoren
2022-03-19 11:52 ` Arnd Bergmann
2022-03-19 13:26 ` Guo Ren
2022-03-22 3:10 ` Stafford Horne
2022-03-22 15:54 ` Waiman Long
2022-03-22 21:06 ` Stafford Horne
2022-03-22 21:14 ` Waiman Long
2022-03-22 21:24 ` Stafford Horne
2022-03-19 3:54 ` [OpenRISC] [PATCH V2 2/5] asm-generic: qspinlock: Indicate the use of mixed-size atomics guoren
2022-03-19 3:54 ` [OpenRISC] [PATCH V2 3/5] csky: Move to generic ticket-spinlock guoren
2022-03-19 3:54 ` [OpenRISC] [PATCH V2 4/5] RISC-V: Move to ticket-spinlocks & RW locks guoren
2022-03-19 3:54 ` [OpenRISC] [PATCH V2 5/5] openrisc: Move to ticket-spinlock guoren
[not found] ` <202203200824.EQJTy8pW-lkp@intel.com>
2022-03-20 3:05 ` Guo Ren
2022-03-20 3:36 ` Stafford Horne
2022-03-20 21:13 ` Stafford Horne
2022-03-22 5:26 ` Stafford Horne
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=20220319035457.2214979-1-guoren@kernel.org \
--to=guoren@kernel.org \
--cc=openrisc@lists.librecores.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 read-only IMAP folder(s) and NNTP newsgroup(s).