diff options
author | Babu Moger <babu.moger@oracle.com> | 2017-05-24 17:55:13 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-25 12:06:51 -0700 |
commit | a37594f198363fd9321ece54440336fd4b2a9c8e (patch) | |
tree | 591a2cc525ac40ca81840cd1b93e615dc5dd9679 /arch/sparc/include/asm/spinlock_types.h | |
parent | a12ee2349312d7112b9b7c6ac2e70c5ec2ca334e (diff) |
arch/sparc: Enable queued rwlocks for SPARC
Enable queued rwlocks for SPARC. Here are the discussions on this feature
when this was introduced.
https://lwn.net/Articles/572765/
https://lwn.net/Articles/582200/
Cleaned-up the arch_read_xxx and arch_write_xxx definitions in spinlock_64.h.
These routines are replaced by the functions in include/asm-generic/qrwlock.h
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/spinlock_types.h')
-rw-r--r-- | arch/sparc/include/asm/spinlock_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/spinlock_types.h b/arch/sparc/include/asm/spinlock_types.h index 019c0855bf8b..64fce21b23df 100644 --- a/arch/sparc/include/asm/spinlock_types.h +++ b/arch/sparc/include/asm/spinlock_types.h @@ -7,10 +7,13 @@ typedef struct { #define __ARCH_SPIN_LOCK_UNLOCKED { 0 } +#ifdef CONFIG_QUEUED_RWLOCKS +#include <asm-generic/qrwlock_types.h> +#else typedef struct { volatile unsigned int lock; } arch_rwlock_t; #define __ARCH_RW_LOCK_UNLOCKED { 0 } - +#endif /* CONFIG_QUEUED_RWLOCKS */ #endif |