On Thu, Nov 26, 2020 at 09:36:34AM +0800, Guo Ren wrote:
> On Wed, Nov 25, 2020 at 10:31 PM Will Deacon wrote:
> > On Wed, Nov 25, 2020 at 03:16:45PM +0100, Peter Zijlstra wrote:
> > > @@ -207,6 +187,32 @@ static __always_inline void
> > > clear_pending_set_locked(struct qspinlock *lock)
> > >
Hi Will,
On Wed, Nov 25, 2020 at 10:31 PM Will Deacon wrote:
>
> On Wed, Nov 25, 2020 at 03:16:45PM +0100, Peter Zijlstra wrote:
> > @@ -207,6 +187,32 @@ static __always_inline void
> > clear_pending_set_locked(struct qspinlock *lock)
> > atomic_add(-_Q_PENDING_VAL + _Q_LOCKED_VAL, &lock->
On Wed, Nov 25, 2020 at 03:16:45PM +0100, Peter Zijlstra wrote:
> @@ -207,6 +187,32 @@ static __always_inline void
> clear_pending_set_locked(struct qspinlock *lock)
> atomic_add(-_Q_PENDING_VAL + _Q_LOCKED_VAL, &lock->val);
> }
>
> +#endif /* _Q_PENDING_BITS == 8 */
> +
> +#if _Q_PENDING
On Wed, Nov 25, 2020 at 08:52:23AM +0800, Guo Ren wrote:
> > I'm pretty sure there's a handfull of implementations like this out
> > there... if only we could share.
> Michael has sent qspinlock before, ref to Link below. He reused mips' code.
>
> Link:
> https://lore.kernel.org/linux-riscv/2019
On Tue, Nov 24, 2020 at 04:00:14PM +0100, Arnd Bergmann wrote:
> On Tue, Nov 24, 2020 at 3:39 PM Peter Zijlstra wrote:
> > On Tue, Nov 24, 2020 at 01:43:54PM +, guo...@kernel.org wrote:
> > > diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
>
> > > + if (
On Tue, Nov 24, 2020 at 11:00 PM Arnd Bergmann wrote:
>
> On Tue, Nov 24, 2020 at 3:39 PM Peter Zijlstra wrote:
> > On Tue, Nov 24, 2020 at 01:43:54PM +, guo...@kernel.org wrote:
> > > diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
>
> > > + if (align)
Thx Peter,
On Tue, Nov 24, 2020 at 10:39 PM Peter Zijlstra wrote:
>
> On Tue, Nov 24, 2020 at 01:43:54PM +, guo...@kernel.org wrote:
> > diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
> > index 59dd7be..6f5f438 100644
> > --- a/arch/riscv/include/asm/Kbuild
> > +++
On Tue, Nov 24, 2020 at 3:39 PM Peter Zijlstra wrote:
> On Tue, Nov 24, 2020 at 01:43:54PM +, guo...@kernel.org wrote:
> > diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
> > + if (align) {\
> > + _
On Tue, Nov 24, 2020 at 01:43:54PM +, guo...@kernel.org wrote:
> diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
> index 59dd7be..6f5f438 100644
> --- a/arch/riscv/include/asm/Kbuild
> +++ b/arch/riscv/include/asm/Kbuild
> @@ -6,3 +6,6 @@ generic-y += kvm_para.h
> ge
From: Guo Ren
riscv only support lr.wd/s(c).w(d) with word(double word) size &
align access. There are not lr.h/sc.h instructions. But qspinlock.c
need xchg with short type variable:
xchg_tail -> xchg_releaxed(&lock->tail, ...
typedef struct qspinlock {
union {
atomic_t
10 matches
Mail list logo