powerpc/pseries: Implement paravirt qspinlocks for SPLPAR
authorNicholas Piggin <npiggin@gmail.com>
Fri, 24 Jul 2020 13:14:21 +0000 (23:14 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 14:01:29 +0000 (00:01 +1000)
commit20c0e8269e9d515e677670902c7e1cc0209d6ad9
tree1de7272a98830301f6d21a1b8cdab7d28d0e83c1
parentaa65ff6b18e0366db1790609956a4ac7308c5668
powerpc/pseries: Implement paravirt qspinlocks for SPLPAR

This implements the generic paravirt qspinlocks using H_PROD and
H_CONFER to kick and wait.

This uses an un-directed yield to any CPU rather than the directed
yield to a pre-empted lock holder that paravirtualised simple
spinlocks use, that requires no kick hcall. This is something that
could be investigated and improved in future.

Performance results can be found in the commit which added queued
spinlocks.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200724131423.1362108-5-npiggin@gmail.com
arch/powerpc/include/asm/paravirt.h
arch/powerpc/include/asm/qspinlock.h
arch/powerpc/include/asm/qspinlock_paravirt.h [new file with mode: 0644]
arch/powerpc/include/asm/spinlock.h
arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/pseries/setup.c
include/asm-generic/qspinlock.h