mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
9f61521c7a
Add a powerpc specific implementation of queued spinlocks. This is the build framework with a very simple (non-queued) spinlock implementation to begin with. Later changes add queueing, and other features and optimisations one-at-a-time. It is done this way to more easily see how the queued spinlocks are built, and to make performance and correctness bisects more useful. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Drop paravirt.h & processor.h changes to fix 32-bit build] [mpe: Fix 32-bit build of qspinlock.o & disallow GENERIC_LOCKBREAK per Nick] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/CONLLQB6DCJU.2ZPOS7T6S5GRR@bobo
17 lines
354 B
C
17 lines
354 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#include <linux/export.h>
|
|
#include <linux/processor.h>
|
|
#include <asm/qspinlock.h>
|
|
|
|
void queued_spin_lock_slowpath(struct qspinlock *lock)
|
|
{
|
|
while (!queued_spin_trylock(lock))
|
|
cpu_relax();
|
|
}
|
|
EXPORT_SYMBOL(queued_spin_lock_slowpath);
|
|
|
|
#ifdef CONFIG_PARAVIRT_SPINLOCKS
|
|
void pv_spinlocks_init(void)
|
|
{
|
|
}
|
|
#endif
|