diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-09-27 14:57:54 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-27 14:57:54 -0400 |
commit | 2dc94310bd94d0906febea7d0f7c188da620c952 (patch) | |
tree | 6de4096f1887e2c00966177354b1c378e59bd632 /arch/powerpc/lib/locks.c | |
parent | c06015148fa9a3cc452ec7121b8c3f59f4a7d6ac (diff) | |
parent | fb60cf4ab52f3520c2119aa42f7d4ed8e7594eb6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream into devel
Diffstat (limited to 'arch/powerpc/lib/locks.c')
-rw-r--r-- | arch/powerpc/lib/locks.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 077bed7dc52b..80b482ca30df 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/hvcall.h> | 23 | #include <asm/hvcall.h> |
24 | #include <asm/iseries/hv_call.h> | 24 | #include <asm/iseries/hv_call.h> |
25 | #include <asm/smp.h> | 25 | #include <asm/smp.h> |
26 | #include <asm/firmware.h> | ||
26 | 27 | ||
27 | void __spin_yield(raw_spinlock_t *lock) | 28 | void __spin_yield(raw_spinlock_t *lock) |
28 | { | 29 | { |
@@ -39,13 +40,12 @@ void __spin_yield(raw_spinlock_t *lock) | |||
39 | rmb(); | 40 | rmb(); |
40 | if (lock->slock != lock_value) | 41 | if (lock->slock != lock_value) |
41 | return; /* something has changed */ | 42 | return; /* something has changed */ |
42 | #ifdef CONFIG_PPC_ISERIES | 43 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
43 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, |
44 | ((u64)holder_cpu << 32) | yield_count); | 45 | ((u64)holder_cpu << 32) | yield_count); |
45 | #else | 46 | else |
46 | plpar_hcall_norets(H_CONFER, get_hard_smp_processor_id(holder_cpu), | 47 | plpar_hcall_norets(H_CONFER, |
47 | yield_count); | 48 | get_hard_smp_processor_id(holder_cpu), yield_count); |
48 | #endif | ||
49 | } | 49 | } |
50 | 50 | ||
51 | /* | 51 | /* |
@@ -69,13 +69,12 @@ void __rw_yield(raw_rwlock_t *rw) | |||
69 | rmb(); | 69 | rmb(); |
70 | if (rw->lock != lock_value) | 70 | if (rw->lock != lock_value) |
71 | return; /* something has changed */ | 71 | return; /* something has changed */ |
72 | #ifdef CONFIG_PPC_ISERIES | 72 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
73 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 73 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, |
74 | ((u64)holder_cpu << 32) | yield_count); | 74 | ((u64)holder_cpu << 32) | yield_count); |
75 | #else | 75 | else |
76 | plpar_hcall_norets(H_CONFER, get_hard_smp_processor_id(holder_cpu), | 76 | plpar_hcall_norets(H_CONFER, |
77 | yield_count); | 77 | get_hard_smp_processor_id(holder_cpu), yield_count); |
78 | #endif | ||
79 | } | 78 | } |
80 | #endif | 79 | #endif |
81 | 80 | ||