diff options
Diffstat (limited to 'arch/powerpc/include/asm/rwsem.h')
-rw-r--r-- | arch/powerpc/include/asm/rwsem.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/powerpc/include/asm/rwsem.h b/arch/powerpc/include/asm/rwsem.h index bc1acc229223..f86fdf743afb 100644 --- a/arch/powerpc/include/asm/rwsem.h +++ b/arch/powerpc/include/asm/rwsem.h | |||
@@ -28,38 +28,11 @@ | |||
28 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS | 28 | #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS |
29 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) | 29 | #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) |
30 | 30 | ||
31 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
32 | # define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } | ||
33 | #else | ||
34 | # define __RWSEM_DEP_MAP_INIT(lockname) | ||
35 | #endif | ||
36 | |||
37 | #define __RWSEM_INITIALIZER(name) \ | ||
38 | { \ | ||
39 | RWSEM_UNLOCKED_VALUE, \ | ||
40 | __SPIN_LOCK_UNLOCKED((name).wait_lock), \ | ||
41 | LIST_HEAD_INIT((name).wait_list) \ | ||
42 | __RWSEM_DEP_MAP_INIT(name) \ | ||
43 | } | ||
44 | |||
45 | #define DECLARE_RWSEM(name) \ | ||
46 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | ||
47 | |||
48 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); | 31 | extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); |
49 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); | 32 | extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); |
50 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); | 33 | extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem); |
51 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); | 34 | extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); |
52 | 35 | ||
53 | extern void __init_rwsem(struct rw_semaphore *sem, const char *name, | ||
54 | struct lock_class_key *key); | ||
55 | |||
56 | #define init_rwsem(sem) \ | ||
57 | do { \ | ||
58 | static struct lock_class_key __key; \ | ||
59 | \ | ||
60 | __init_rwsem((sem), #sem, &__key); \ | ||
61 | } while (0) | ||
62 | |||
63 | /* | 36 | /* |
64 | * lock for reading | 37 | * lock for reading |
65 | */ | 38 | */ |