diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-22 20:10:23 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-22 20:10:23 -0400 |
commit | 28eb177dfa5982d132edceed891cb3885df258bb (patch) | |
tree | 5f8fdc37ad1d8d0793e9c47da7d908b97c814ffb /arch/powerpc/lib/locks.c | |
parent | fd8ae94eea9bb4269d6dff1b47b9dc741bd70d0b (diff) | |
parent | db392219c5f572610645696e3672f6ea38783a65 (diff) |
Merge branch 'master' into upstream
Conflicts:
net/ieee80211/ieee80211_crypt_tkip.c
net/ieee80211/ieee80211_crypt_wep.c
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 | ||