|
@@ -9,8 +9,13 @@
|
|
#define _ASM_MUTEX_H
|
|
#define _ASM_MUTEX_H
|
|
/*
|
|
/*
|
|
* On pre-ARMv6 hardware this results in a swp-based implementation,
|
|
* On pre-ARMv6 hardware this results in a swp-based implementation,
|
|
- * which is the most efficient. For ARMv6+, we emit a pair of exclusive
|
|
|
|
- * accesses instead.
|
|
|
|
|
|
+ * which is the most efficient. For ARMv6+, we have exclusive memory
|
|
|
|
+ * accessors and use atomic_dec to avoid the extra xchg operations
|
|
|
|
+ * on the locking slowpaths.
|
|
*/
|
|
*/
|
|
|
|
+#if __LINUX_ARM_ARCH__ < 6
|
|
#include <asm-generic/mutex-xchg.h>
|
|
#include <asm-generic/mutex-xchg.h>
|
|
|
|
+#else
|
|
|
|
+#include <asm-generic/mutex-dec.h>
|
|
#endif
|
|
#endif
|
|
|
|
+#endif /* _ASM_MUTEX_H */
|