diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-01-26 08:11:03 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-01-26 08:11:14 -0500 |
commit | 3b4beb31759765efdda9f9431aebfedf828bbfe0 (patch) | |
tree | 9d8a7de6c484f8f2bbda874f41ebcad4af7c9d53 /include/asm-s390/spinlock.h | |
parent | 9f4b0ba81f158df459fa2cfc98ab1475c090f29c (diff) |
[S390] Remove owner_pc member from raw_spinlock_t.
Used to contain the address of the holder of the lock. But since the
spinlock code is not inlined anymore all locks contain the same address
anyway. And since in addtition nobody complained about that for ages
its obviously unused. So remove it.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/spinlock.h')
-rw-r--r-- | include/asm-s390/spinlock.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/include/asm-s390/spinlock.h b/include/asm-s390/spinlock.h index 3fd43826fd0b..c1d6e7e304e2 100644 --- a/include/asm-s390/spinlock.h +++ b/include/asm-s390/spinlock.h | |||
@@ -58,39 +58,32 @@ _raw_compare_and_swap(volatile unsigned int *lock, | |||
58 | do { while (__raw_spin_is_locked(lock)) \ | 58 | do { while (__raw_spin_is_locked(lock)) \ |
59 | _raw_spin_relax(lock); } while (0) | 59 | _raw_spin_relax(lock); } while (0) |
60 | 60 | ||
61 | extern void _raw_spin_lock_wait(raw_spinlock_t *, unsigned int pc); | 61 | extern void _raw_spin_lock_wait(raw_spinlock_t *); |
62 | extern int _raw_spin_trylock_retry(raw_spinlock_t *, unsigned int pc); | 62 | extern int _raw_spin_trylock_retry(raw_spinlock_t *); |
63 | extern void _raw_spin_relax(raw_spinlock_t *lock); | 63 | extern void _raw_spin_relax(raw_spinlock_t *lock); |
64 | 64 | ||
65 | static inline void __raw_spin_lock(raw_spinlock_t *lp) | 65 | static inline void __raw_spin_lock(raw_spinlock_t *lp) |
66 | { | 66 | { |
67 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); | ||
68 | int old; | 67 | int old; |
69 | 68 | ||
70 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); | 69 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); |
71 | if (likely(old == 0)) { | 70 | if (likely(old == 0)) |
72 | lp->owner_pc = pc; | ||
73 | return; | 71 | return; |
74 | } | 72 | _raw_spin_lock_wait(lp); |
75 | _raw_spin_lock_wait(lp, pc); | ||
76 | } | 73 | } |
77 | 74 | ||
78 | static inline int __raw_spin_trylock(raw_spinlock_t *lp) | 75 | static inline int __raw_spin_trylock(raw_spinlock_t *lp) |
79 | { | 76 | { |
80 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); | ||
81 | int old; | 77 | int old; |
82 | 78 | ||
83 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); | 79 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); |
84 | if (likely(old == 0)) { | 80 | if (likely(old == 0)) |
85 | lp->owner_pc = pc; | ||
86 | return 1; | 81 | return 1; |
87 | } | 82 | return _raw_spin_trylock_retry(lp); |
88 | return _raw_spin_trylock_retry(lp, pc); | ||
89 | } | 83 | } |
90 | 84 | ||
91 | static inline void __raw_spin_unlock(raw_spinlock_t *lp) | 85 | static inline void __raw_spin_unlock(raw_spinlock_t *lp) |
92 | { | 86 | { |
93 | lp->owner_pc = 0; | ||
94 | _raw_compare_and_swap(&lp->owner_cpu, lp->owner_cpu, 0); | 87 | _raw_compare_and_swap(&lp->owner_cpu, lp->owner_cpu, 0); |
95 | } | 88 | } |
96 | 89 | ||