aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/plist.h
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2011-07-07 20:27:59 -0400
committerIngo Molnar <mingo@elte.hu>2011-07-08 08:02:53 -0400
commit732375c6a5a4cc825b676c922d547aba96b8ce15 (patch)
tree35002255d0e52ad478ffa7134b73c35452c502a0 /include/linux/plist.h
parent8edbb83e5bc3c7d5d76861fc61872105288d2610 (diff)
plist: Remove the need to supply locks to plist heads
This was legacy code brought over from the RT tree and is no longer necessary. Signed-off-by: Dima Zavin <dima@android.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Walker <dwalker@codeaurora.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Link: http://lkml.kernel.org/r/1310084879-10351-2-git-send-email-dima@android.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/plist.h')
-rw-r--r--include/linux/plist.h55
1 files changed, 3 insertions, 52 deletions
diff --git a/include/linux/plist.h b/include/linux/plist.h
index c9b9f322c8d8..aa0fb390bd29 100644
--- a/include/linux/plist.h
+++ b/include/linux/plist.h
@@ -77,14 +77,9 @@
77 77
78#include <linux/kernel.h> 78#include <linux/kernel.h>
79#include <linux/list.h> 79#include <linux/list.h>
80#include <linux/spinlock_types.h>
81 80
82struct plist_head { 81struct plist_head {
83 struct list_head node_list; 82 struct list_head node_list;
84#ifdef CONFIG_DEBUG_PI_LIST
85 raw_spinlock_t *rawlock;
86 spinlock_t *spinlock;
87#endif
88}; 83};
89 84
90struct plist_node { 85struct plist_node {
@@ -93,37 +88,13 @@ struct plist_node {
93 struct list_head node_list; 88 struct list_head node_list;
94}; 89};
95 90
96#ifdef CONFIG_DEBUG_PI_LIST
97# define PLIST_HEAD_LOCK_INIT(_lock) .spinlock = _lock
98# define PLIST_HEAD_LOCK_INIT_RAW(_lock) .rawlock = _lock
99#else
100# define PLIST_HEAD_LOCK_INIT(_lock)
101# define PLIST_HEAD_LOCK_INIT_RAW(_lock)
102#endif
103
104#define _PLIST_HEAD_INIT(head) \
105 .node_list = LIST_HEAD_INIT((head).node_list)
106
107/** 91/**
108 * PLIST_HEAD_INIT - static struct plist_head initializer 92 * PLIST_HEAD_INIT - static struct plist_head initializer
109 * @head: struct plist_head variable name 93 * @head: struct plist_head variable name
110 * @_lock: lock to initialize for this list
111 */
112#define PLIST_HEAD_INIT(head, _lock) \
113{ \
114 _PLIST_HEAD_INIT(head), \
115 PLIST_HEAD_LOCK_INIT(&(_lock)) \
116}
117
118/**
119 * PLIST_HEAD_INIT_RAW - static struct plist_head initializer
120 * @head: struct plist_head variable name
121 * @_lock: lock to initialize for this list
122 */ 94 */
123#define PLIST_HEAD_INIT_RAW(head, _lock) \ 95#define PLIST_HEAD_INIT(head) \
124{ \ 96{ \
125 _PLIST_HEAD_INIT(head), \ 97 .node_list = LIST_HEAD_INIT((head).node_list) \
126 PLIST_HEAD_LOCK_INIT_RAW(&(_lock)) \
127} 98}
128 99
129/** 100/**
@@ -141,31 +112,11 @@ struct plist_node {
141/** 112/**
142 * plist_head_init - dynamic struct plist_head initializer 113 * plist_head_init - dynamic struct plist_head initializer
143 * @head: &struct plist_head pointer 114 * @head: &struct plist_head pointer
144 * @lock: spinlock protecting the list (debugging)
145 */ 115 */
146static inline void 116static inline void
147plist_head_init(struct plist_head *head, spinlock_t *lock) 117plist_head_init(struct plist_head *head)
148{ 118{
149 INIT_LIST_HEAD(&head->node_list); 119 INIT_LIST_HEAD(&head->node_list);
150#ifdef CONFIG_DEBUG_PI_LIST
151 head->spinlock = lock;
152 head->rawlock = NULL;
153#endif
154}
155
156/**
157 * plist_head_init_raw - dynamic struct plist_head initializer
158 * @head: &struct plist_head pointer
159 * @lock: raw_spinlock protecting the list (debugging)
160 */
161static inline void
162plist_head_init_raw(struct plist_head *head, raw_spinlock_t *lock)
163{
164 INIT_LIST_HEAD(&head->node_list);
165#ifdef CONFIG_DEBUG_PI_LIST
166 head->rawlock = lock;
167 head->spinlock = NULL;
168#endif
169} 120}
170 121
171/** 122/**