summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2022-11-26 19:59:21 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-12-02 17:48:49 +1100
commite1a31e7fd7130628cfd229253da2b4630e7a809c (patch)
tree3c328928ed0e74716e71ccee0458f3f75ccd7131 /arch/powerpc/lib
parent0944534ef4d5cf39c8133575524be0be3337dd62 (diff)
downloadlinux-e1a31e7fd7130628cfd229253da2b4630e7a809c.tar.gz
linux-e1a31e7fd7130628cfd229253da2b4630e7a809c.tar.bz2
linux-e1a31e7fd7130628cfd229253da2b4630e7a809c.zip
powerpc/qspinlock: store owner CPU in lock word
Store the owner CPU number in the lock word so it may be yielded to, as powerpc's paravirtualised simple spinlocks do. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20221126095932.1234527-7-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/qspinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/lib/qspinlock.c b/arch/powerpc/lib/qspinlock.c
index 9cd442d46b9f..4d74db0e565f 100644
--- a/arch/powerpc/lib/qspinlock.c
+++ b/arch/powerpc/lib/qspinlock.c
@@ -55,7 +55,7 @@ static inline int decode_tail_cpu(u32 val)
*/
static __always_inline u32 trylock_clean_tail(struct qspinlock *lock, u32 tail)
{
- u32 newval = _Q_LOCKED_VAL;
+ u32 newval = queued_spin_encode_locked_val();
u32 prev, tmp;
asm volatile(