Commit 31391ff7 authored by Christopher M. Riedl's avatar Christopher M. Riedl Committed by Michael Ellerman

powerpc/spinlocks: Rename SPLPAR-only spinlocks

The __rw_yield and __spin_yield locks only pertain to SPLPAR mode.
Rename them to make this relationship obvious.
Signed-off-by: default avatarChristopher M. Riedl <cmr@informatik.wtf>
Reviewed-by: default avatarAndrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190813031314.1828-3-cmr@informatik.wtf
parent d57b7835
...@@ -101,8 +101,10 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) ...@@ -101,8 +101,10 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
#if defined(CONFIG_PPC_SPLPAR) #if defined(CONFIG_PPC_SPLPAR)
/* We only yield to the hypervisor if we are in shared processor mode */ /* We only yield to the hypervisor if we are in shared processor mode */
extern void __spin_yield(arch_spinlock_t *lock); void splpar_spin_yield(arch_spinlock_t *lock);
extern void __rw_yield(arch_rwlock_t *lock); void splpar_rw_yield(arch_rwlock_t *lock);
#define __spin_yield(x) splpar_spin_yield(x)
#define __rw_yield(x) splpar_rw_yield(x)
#else /* SPLPAR */ #else /* SPLPAR */
#define __spin_yield(x) barrier() #define __spin_yield(x) barrier()
#define __rw_yield(x) barrier() #define __rw_yield(x) barrier()
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <asm/hvcall.h> #include <asm/hvcall.h>
#include <asm/smp.h> #include <asm/smp.h>
void __spin_yield(arch_spinlock_t *lock) void splpar_spin_yield(arch_spinlock_t *lock)
{ {
unsigned int lock_value, holder_cpu, yield_count; unsigned int lock_value, holder_cpu, yield_count;
...@@ -36,14 +36,14 @@ void __spin_yield(arch_spinlock_t *lock) ...@@ -36,14 +36,14 @@ void __spin_yield(arch_spinlock_t *lock)
plpar_hcall_norets(H_CONFER, plpar_hcall_norets(H_CONFER,
get_hard_smp_processor_id(holder_cpu), yield_count); get_hard_smp_processor_id(holder_cpu), yield_count);
} }
EXPORT_SYMBOL_GPL(__spin_yield); EXPORT_SYMBOL_GPL(splpar_spin_yield);
/* /*
* Waiting for a read lock or a write lock on a rwlock... * Waiting for a read lock or a write lock on a rwlock...
* This turns out to be the same for read and write locks, since * This turns out to be the same for read and write locks, since
* we only know the holder if it is write-locked. * we only know the holder if it is write-locked.
*/ */
void __rw_yield(arch_rwlock_t *rw) void splpar_rw_yield(arch_rwlock_t *rw)
{ {
int lock_value; int lock_value;
unsigned int holder_cpu, yield_count; unsigned int holder_cpu, yield_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment