diff options
Diffstat (limited to 'arch/s390/lib/spinlock.c')
-rw-r--r-- | arch/s390/lib/spinlock.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c index 8d76403fcf89..59c56c3d72d0 100644 --- a/arch/s390/lib/spinlock.c +++ b/arch/s390/lib/spinlock.c | |||
@@ -39,7 +39,7 @@ static inline void _raw_yield_cpu(int cpu) | |||
39 | _raw_yield(); | 39 | _raw_yield(); |
40 | } | 40 | } |
41 | 41 | ||
42 | void _raw_spin_lock_wait(raw_spinlock_t *lp, unsigned int pc) | 42 | void _raw_spin_lock_wait(raw_spinlock_t *lp) |
43 | { | 43 | { |
44 | int count = spin_retry; | 44 | int count = spin_retry; |
45 | unsigned int cpu = ~smp_processor_id(); | 45 | unsigned int cpu = ~smp_processor_id(); |
@@ -53,15 +53,13 @@ void _raw_spin_lock_wait(raw_spinlock_t *lp, unsigned int pc) | |||
53 | } | 53 | } |
54 | if (__raw_spin_is_locked(lp)) | 54 | if (__raw_spin_is_locked(lp)) |
55 | continue; | 55 | continue; |
56 | if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) { | 56 | if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) |
57 | lp->owner_pc = pc; | ||
58 | return; | 57 | return; |
59 | } | ||
60 | } | 58 | } |
61 | } | 59 | } |
62 | EXPORT_SYMBOL(_raw_spin_lock_wait); | 60 | EXPORT_SYMBOL(_raw_spin_lock_wait); |
63 | 61 | ||
64 | int _raw_spin_trylock_retry(raw_spinlock_t *lp, unsigned int pc) | 62 | int _raw_spin_trylock_retry(raw_spinlock_t *lp) |
65 | { | 63 | { |
66 | unsigned int cpu = ~smp_processor_id(); | 64 | unsigned int cpu = ~smp_processor_id(); |
67 | int count; | 65 | int count; |
@@ -69,10 +67,8 @@ int _raw_spin_trylock_retry(raw_spinlock_t *lp, unsigned int pc) | |||
69 | for (count = spin_retry; count > 0; count--) { | 67 | for (count = spin_retry; count > 0; count--) { |
70 | if (__raw_spin_is_locked(lp)) | 68 | if (__raw_spin_is_locked(lp)) |
71 | continue; | 69 | continue; |
72 | if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) { | 70 | if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) |
73 | lp->owner_pc = pc; | ||
74 | return 1; | 71 | return 1; |
75 | } | ||
76 | } | 72 | } |
77 | return 0; | 73 | return 0; |
78 | } | 74 | } |