.. | .. |
---|
44 | 44 | const char *irq_name; |
---|
45 | 45 | }; |
---|
46 | 46 | |
---|
47 | | -static DEFINE_SPINLOCK(wakeup_reason_lock); |
---|
| 47 | +static DEFINE_RAW_SPINLOCK(wakeup_reason_lock); |
---|
48 | 48 | |
---|
49 | 49 | static LIST_HEAD(leaf_irqs); /* kept in ascending IRQ sorted order */ |
---|
50 | 50 | static LIST_HEAD(parent_irqs); /* unordered */ |
---|
.. | .. |
---|
149 | 149 | { |
---|
150 | 150 | unsigned long flags; |
---|
151 | 151 | |
---|
152 | | - spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
| 152 | + raw_spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
153 | 153 | |
---|
154 | 154 | if (!capture_reasons) { |
---|
155 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 155 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
156 | 156 | return; |
---|
157 | 157 | } |
---|
158 | 158 | |
---|
159 | 159 | if (find_node_in_list(&parent_irqs, irq) == NULL) |
---|
160 | 160 | add_sibling_node_sorted(&leaf_irqs, irq); |
---|
161 | 161 | |
---|
162 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 162 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
163 | 163 | } |
---|
164 | 164 | |
---|
165 | 165 | void log_threaded_irq_wakeup_reason(int irq, int parent_irq) |
---|
.. | .. |
---|
177 | 177 | if (!capture_reasons) |
---|
178 | 178 | return; |
---|
179 | 179 | |
---|
180 | | - spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
| 180 | + raw_spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
181 | 181 | |
---|
182 | 182 | if (!capture_reasons || (find_node_in_list(&leaf_irqs, irq) != NULL)) { |
---|
183 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 183 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
184 | 184 | return; |
---|
185 | 185 | } |
---|
186 | 186 | |
---|
.. | .. |
---|
196 | 196 | } |
---|
197 | 197 | } |
---|
198 | 198 | |
---|
199 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 199 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
200 | 200 | } |
---|
201 | 201 | |
---|
202 | 202 | static void __log_abort_or_abnormal_wake(bool abort, const char *fmt, |
---|
.. | .. |
---|
204 | 204 | { |
---|
205 | 205 | unsigned long flags; |
---|
206 | 206 | |
---|
207 | | - spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
| 207 | + raw_spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
208 | 208 | |
---|
209 | 209 | /* Suspend abort or abnormal wake reason has already been logged. */ |
---|
210 | 210 | if (suspend_abort || abnormal_wake) { |
---|
211 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 211 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
212 | 212 | return; |
---|
213 | 213 | } |
---|
214 | 214 | |
---|
.. | .. |
---|
216 | 216 | abnormal_wake = !abort; |
---|
217 | 217 | vsnprintf(non_irq_wake_reason, MAX_SUSPEND_ABORT_LEN, fmt, args); |
---|
218 | 218 | |
---|
219 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 219 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
220 | 220 | } |
---|
221 | 221 | |
---|
222 | 222 | void log_suspend_abort_reason(const char *fmt, ...) |
---|
.. | .. |
---|
241 | 241 | { |
---|
242 | 242 | unsigned long flags; |
---|
243 | 243 | |
---|
244 | | - spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
| 244 | + raw_spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
245 | 245 | |
---|
246 | 246 | delete_list(&leaf_irqs); |
---|
247 | 247 | delete_list(&parent_irqs); |
---|
.. | .. |
---|
249 | 249 | abnormal_wake = false; |
---|
250 | 250 | capture_reasons = true; |
---|
251 | 251 | |
---|
252 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 252 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
253 | 253 | } |
---|
254 | 254 | |
---|
255 | 255 | static void print_wakeup_sources(void) |
---|
.. | .. |
---|
257 | 257 | struct wakeup_irq_node *n; |
---|
258 | 258 | unsigned long flags; |
---|
259 | 259 | |
---|
260 | | - spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
| 260 | + raw_spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
261 | 261 | |
---|
262 | 262 | capture_reasons = false; |
---|
263 | 263 | |
---|
264 | 264 | if (suspend_abort) { |
---|
265 | 265 | pr_info("Abort: %s\n", non_irq_wake_reason); |
---|
266 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 266 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
267 | 267 | return; |
---|
268 | 268 | } |
---|
269 | 269 | |
---|
.. | .. |
---|
276 | 276 | else |
---|
277 | 277 | pr_info("Resume cause unknown\n"); |
---|
278 | 278 | |
---|
279 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 279 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
280 | 280 | } |
---|
281 | 281 | |
---|
282 | 282 | static ssize_t last_resume_reason_show(struct kobject *kobj, |
---|
.. | .. |
---|
286 | 286 | struct wakeup_irq_node *n; |
---|
287 | 287 | unsigned long flags; |
---|
288 | 288 | |
---|
289 | | - spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
| 289 | + raw_spin_lock_irqsave(&wakeup_reason_lock, flags); |
---|
290 | 290 | |
---|
291 | 291 | if (suspend_abort) { |
---|
292 | 292 | buf_offset = scnprintf(buf, PAGE_SIZE, "Abort: %s", |
---|
293 | 293 | non_irq_wake_reason); |
---|
294 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 294 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
295 | 295 | return buf_offset; |
---|
296 | 296 | } |
---|
297 | 297 | |
---|
.. | .. |
---|
304 | 304 | buf_offset = scnprintf(buf, PAGE_SIZE, "-1 %s", |
---|
305 | 305 | non_irq_wake_reason); |
---|
306 | 306 | |
---|
307 | | - spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
| 307 | + raw_spin_unlock_irqrestore(&wakeup_reason_lock, flags); |
---|
308 | 308 | |
---|
309 | 309 | return buf_offset; |
---|
310 | 310 | } |
---|