lkml.org 
[lkml]   [2024]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] locking/pvqspinlock/x86: Use _Q_LOCKED_VAL in PV_UNLOCK_ASM macro
On Mon, Apr 22, 2024 at 9:45 PM Boqun Feng <boqun.feng@gmail.com> wrote:

> > diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/asm/qspinlock_paravirt.h
> > index 466af57b8ed6..0a985784be9b 100644
> > --- a/arch/x86/include/asm/qspinlock_paravirt.h
> > +++ b/arch/x86/include/asm/qspinlock_paravirt.h
> > @@ -40,7 +40,7 @@ __PV_CALLEE_SAVE_REGS_THUNK(__pv_queued_spin_unlock_slowpath, ".spinlock.text");
> > #define PV_UNLOCK_ASM \
> > FRAME_BEGIN \
> > "push %rdx\n\t" \
> > - "mov $0x1,%eax\n\t" \
> > + "mov $" __stringify(_Q_LOCKED_VAL) ",%eax\n\t" \
> > "xor %edx,%edx\n\t" \
> > LOCK_PREFIX "cmpxchg %dl,(%rdi)\n\t" \
> > "jne .slowpath\n\t" \
>
> There is also a "cmp $0x1,%al" afterwards.

Not anymore. Please note that the patch is against -tip, where we have:

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=91095666125a666c8f20c2323b742c53165c0325

Thanks,
Uros.

\
 
 \ /
  Last update: 2024-04-22 21:57    [W:0.062 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site