aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/locks.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c
index a6ebba56fdd4..bb7cfecf2788 100644
--- a/arch/powerpc/lib/locks.c
+++ b/arch/powerpc/lib/locks.c
@@ -19,11 +19,9 @@
19#include <linux/smp.h> 19#include <linux/smp.h>
20 20
21/* waiting for a spinlock... */ 21/* waiting for a spinlock... */
22#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) 22#if defined(CONFIG_PPC_SPLPAR)
23#include <asm/hvcall.h> 23#include <asm/hvcall.h>
24#include <asm/iseries/hv_call.h>
25#include <asm/smp.h> 24#include <asm/smp.h>
26#include <asm/firmware.h>
27 25
28void __spin_yield(arch_spinlock_t *lock) 26void __spin_yield(arch_spinlock_t *lock)
29{ 27{
@@ -40,14 +38,8 @@ void __spin_yield(arch_spinlock_t *lock)
40 rmb(); 38 rmb();
41 if (lock->slock != lock_value) 39 if (lock->slock != lock_value)
42 return; /* something has changed */ 40 return; /* something has changed */
43 if (firmware_has_feature(FW_FEATURE_ISERIES)) 41 plpar_hcall_norets(H_CONFER,
44 HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, 42 get_hard_smp_processor_id(holder_cpu), yield_count);
45 ((u64)holder_cpu << 32) | yield_count);
46#ifdef CONFIG_PPC_SPLPAR
47 else
48 plpar_hcall_norets(H_CONFER,
49 get_hard_smp_processor_id(holder_cpu), yield_count);
50#endif
51} 43}
52 44
53/* 45/*
@@ -71,14 +63,8 @@ void __rw_yield(arch_rwlock_t *rw)
71 rmb(); 63 rmb();
72 if (rw->lock != lock_value) 64 if (rw->lock != lock_value)
73 return; /* something has changed */ 65 return; /* something has changed */
74 if (firmware_has_feature(FW_FEATURE_ISERIES)) 66 plpar_hcall_norets(H_CONFER,
75 HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, 67 get_hard_smp_processor_id(holder_cpu), yield_count);
76 ((u64)holder_cpu << 32) | yield_count);
77#ifdef CONFIG_PPC_SPLPAR
78 else
79 plpar_hcall_norets(H_CONFER,
80 get_hard_smp_processor_id(holder_cpu), yield_count);
81#endif
82} 68}
83#endif 69#endif
84 70