Commit 14058d20c155ab3ff473fb60eca4fa7aa21a16ac
Committed by
Linus Torvalds
1 parent
dad337501d
Exists in
master
and in
16 other branches
lockref: include mutex.h rather than reinvent arch_mutex_cpu_relax
arch_mutex_cpu_relax is already conditionally defined in mutex.h, so simply include that header rather than replicate the code here. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 8 deletions Side-by-side Diff
lib/lockref.c
1 | 1 | #include <linux/export.h> |
2 | 2 | #include <linux/lockref.h> |
3 | +#include <linux/mutex.h> | |
3 | 4 | |
4 | 5 | #if USE_CMPXCHG_LOCKREF |
5 | 6 | |
... | ... | @@ -9,14 +10,6 @@ |
9 | 10 | */ |
10 | 11 | #ifndef cmpxchg64_relaxed |
11 | 12 | # define cmpxchg64_relaxed cmpxchg64 |
12 | -#endif | |
13 | - | |
14 | -/* | |
15 | - * Allow architectures to override the default cpu_relax() within CMPXCHG_LOOP. | |
16 | - * This is useful for architectures with an expensive cpu_relax(). | |
17 | - */ | |
18 | -#ifndef arch_mutex_cpu_relax | |
19 | -# define arch_mutex_cpu_relax() cpu_relax() | |
20 | 13 | #endif |
21 | 14 | |
22 | 15 | /* |