@@ -48,7 +48,7 @@ enum wakeup_reason_flag {
48
48
RESUME_ABNORMAL ,
49
49
};
50
50
51
- static DEFINE_SPINLOCK (wakeup_reason_lock );
51
+ static DEFINE_RAW_SPINLOCK (wakeup_reason_lock );
52
52
53
53
static LIST_HEAD (leaf_irqs ); /* kept in ascending IRQ sorted order */
54
54
static LIST_HEAD (parent_irqs ); /* unordered */
@@ -152,22 +152,22 @@ void log_irq_wakeup_reason(int irq)
152
152
{
153
153
unsigned long flags ;
154
154
155
- spin_lock_irqsave (& wakeup_reason_lock , flags );
155
+ raw_spin_lock_irqsave (& wakeup_reason_lock , flags );
156
156
if (wakeup_reason == RESUME_ABNORMAL || wakeup_reason == RESUME_ABORT ) {
157
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
157
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
158
158
return ;
159
159
}
160
160
161
161
if (!capture_reasons ) {
162
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
162
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
163
163
return ;
164
164
}
165
165
166
166
if (find_node_in_list (& parent_irqs , irq ) == NULL )
167
167
add_sibling_node_sorted (& leaf_irqs , irq );
168
168
169
169
wakeup_reason = RESUME_IRQ ;
170
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
170
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
171
171
}
172
172
173
173
void log_threaded_irq_wakeup_reason (int irq , int parent_irq )
@@ -185,15 +185,15 @@ void log_threaded_irq_wakeup_reason(int irq, int parent_irq)
185
185
if (!capture_reasons )
186
186
return ;
187
187
188
- spin_lock_irqsave (& wakeup_reason_lock , flags );
188
+ raw_spin_lock_irqsave (& wakeup_reason_lock , flags );
189
189
190
190
if (wakeup_reason == RESUME_ABNORMAL || wakeup_reason == RESUME_ABORT ) {
191
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
191
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
192
192
return ;
193
193
}
194
194
195
195
if (!capture_reasons || (find_node_in_list (& leaf_irqs , irq ) != NULL )) {
196
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
196
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
197
197
return ;
198
198
}
199
199
@@ -209,7 +209,7 @@ void log_threaded_irq_wakeup_reason(int irq, int parent_irq)
209
209
}
210
210
}
211
211
212
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
212
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
213
213
}
214
214
EXPORT_SYMBOL_GPL (log_threaded_irq_wakeup_reason );
215
215
@@ -218,11 +218,11 @@ static void __log_abort_or_abnormal_wake(bool abort, const char *fmt,
218
218
{
219
219
unsigned long flags ;
220
220
221
- spin_lock_irqsave (& wakeup_reason_lock , flags );
221
+ raw_spin_lock_irqsave (& wakeup_reason_lock , flags );
222
222
223
223
/* Suspend abort or abnormal wake reason has already been logged. */
224
224
if (wakeup_reason != RESUME_NONE ) {
225
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
225
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
226
226
return ;
227
227
}
228
228
@@ -233,7 +233,7 @@ static void __log_abort_or_abnormal_wake(bool abort, const char *fmt,
233
233
234
234
vsnprintf (non_irq_wake_reason , MAX_SUSPEND_ABORT_LEN , fmt , args );
235
235
236
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
236
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
237
237
}
238
238
239
239
void log_suspend_abort_reason (const char * fmt , ...)
@@ -260,28 +260,28 @@ void clear_wakeup_reasons(void)
260
260
{
261
261
unsigned long flags ;
262
262
263
- spin_lock_irqsave (& wakeup_reason_lock , flags );
263
+ raw_spin_lock_irqsave (& wakeup_reason_lock , flags );
264
264
265
265
delete_list (& leaf_irqs );
266
266
delete_list (& parent_irqs );
267
267
wakeup_reason = RESUME_NONE ;
268
268
capture_reasons = true;
269
269
270
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
270
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
271
271
}
272
272
273
273
static void print_wakeup_sources (void )
274
274
{
275
275
struct wakeup_irq_node * n ;
276
276
unsigned long flags ;
277
277
278
- spin_lock_irqsave (& wakeup_reason_lock , flags );
278
+ raw_spin_lock_irqsave (& wakeup_reason_lock , flags );
279
279
280
280
capture_reasons = false;
281
281
282
282
if (wakeup_reason == RESUME_ABORT ) {
283
283
pr_info ("Abort: %s\n" , non_irq_wake_reason );
284
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
284
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
285
285
return ;
286
286
}
287
287
@@ -294,7 +294,7 @@ static void print_wakeup_sources(void)
294
294
else
295
295
pr_info ("Resume cause unknown\n" );
296
296
297
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
297
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
298
298
}
299
299
300
300
static ssize_t last_resume_reason_show (struct kobject * kobj ,
@@ -304,12 +304,12 @@ static ssize_t last_resume_reason_show(struct kobject *kobj,
304
304
struct wakeup_irq_node * n ;
305
305
unsigned long flags ;
306
306
307
- spin_lock_irqsave (& wakeup_reason_lock , flags );
307
+ raw_spin_lock_irqsave (& wakeup_reason_lock , flags );
308
308
309
309
if (wakeup_reason == RESUME_ABORT ) {
310
310
buf_offset = scnprintf (buf , PAGE_SIZE , "Abort: %s" ,
311
311
non_irq_wake_reason );
312
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
312
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
313
313
return buf_offset ;
314
314
}
315
315
@@ -322,7 +322,7 @@ static ssize_t last_resume_reason_show(struct kobject *kobj,
322
322
buf_offset = scnprintf (buf , PAGE_SIZE , "-1 %s" ,
323
323
non_irq_wake_reason );
324
324
325
- spin_unlock_irqrestore (& wakeup_reason_lock , flags );
325
+ raw_spin_unlock_irqrestore (& wakeup_reason_lock , flags );
326
326
327
327
return buf_offset ;
328
328
}
0 commit comments