|
11 | 11 | #include "blk-mq.h" |
12 | 12 |
|
13 | 13 | static LIST_HEAD(blk_mq_cpu_notify_list); |
14 | | -static DEFINE_SPINLOCK(blk_mq_cpu_notify_lock); |
| 14 | +static DEFINE_RAW_SPINLOCK(blk_mq_cpu_notify_lock); |
15 | 15 |
|
16 | 16 | static int blk_mq_main_cpu_notify(struct notifier_block *self, |
17 | 17 | unsigned long action, void *hcpu) |
18 | 18 | { |
19 | 19 | unsigned int cpu = (unsigned long) hcpu; |
20 | 20 | struct blk_mq_cpu_notifier *notify; |
21 | 21 |
|
22 | | - spin_lock(&blk_mq_cpu_notify_lock); |
| 22 | + raw_spin_lock(&blk_mq_cpu_notify_lock); |
23 | 23 |
|
24 | 24 | list_for_each_entry(notify, &blk_mq_cpu_notify_list, list) |
25 | 25 | notify->notify(notify->data, action, cpu); |
26 | 26 |
|
27 | | - spin_unlock(&blk_mq_cpu_notify_lock); |
| 27 | + raw_spin_unlock(&blk_mq_cpu_notify_lock); |
28 | 28 | return NOTIFY_OK; |
29 | 29 | } |
30 | 30 |
|
31 | 31 | void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier) |
32 | 32 | { |
33 | 33 | BUG_ON(!notifier->notify); |
34 | 34 |
|
35 | | - spin_lock(&blk_mq_cpu_notify_lock); |
| 35 | + raw_spin_lock(&blk_mq_cpu_notify_lock); |
36 | 36 | list_add_tail(¬ifier->list, &blk_mq_cpu_notify_list); |
37 | | - spin_unlock(&blk_mq_cpu_notify_lock); |
| 37 | + raw_spin_unlock(&blk_mq_cpu_notify_lock); |
38 | 38 | } |
39 | 39 |
|
40 | 40 | void blk_mq_unregister_cpu_notifier(struct blk_mq_cpu_notifier *notifier) |
41 | 41 | { |
42 | | - spin_lock(&blk_mq_cpu_notify_lock); |
| 42 | + raw_spin_lock(&blk_mq_cpu_notify_lock); |
43 | 43 | list_del(¬ifier->list); |
44 | | - spin_unlock(&blk_mq_cpu_notify_lock); |
| 44 | + raw_spin_unlock(&blk_mq_cpu_notify_lock); |
45 | 45 | } |
46 | 46 |
|
47 | 47 | void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, |
|
0 commit comments