hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/notifier.h
....@@ -58,7 +58,7 @@
5858 };
5959
6060 struct atomic_notifier_head {
61
- spinlock_t lock;
61
+ raw_spinlock_t lock;
6262 struct notifier_block __rcu *head;
6363 };
6464
....@@ -78,7 +78,7 @@
7878 };
7979
8080 #define ATOMIC_INIT_NOTIFIER_HEAD(name) do { \
81
- spin_lock_init(&(name)->lock); \
81
+ raw_spin_lock_init(&(name)->lock); \
8282 (name)->head = NULL; \
8383 } while (0)
8484 #define BLOCKING_INIT_NOTIFIER_HEAD(name) do { \
....@@ -95,7 +95,7 @@
9595 cleanup_srcu_struct(&(name)->srcu);
9696
9797 #define ATOMIC_NOTIFIER_INIT(name) { \
98
- .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
98
+ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
9999 .head = NULL }
100100 #define BLOCKING_NOTIFIER_INIT(name) { \
101101 .rwsem = __RWSEM_INITIALIZER((name).rwsem), \
....@@ -150,10 +150,6 @@
150150 extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh,
151151 struct notifier_block *nb);
152152
153
-extern int blocking_notifier_chain_cond_register(
154
- struct blocking_notifier_head *nh,
155
- struct notifier_block *nb);
156
-
157153 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
158154 struct notifier_block *nb);
159155 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
....@@ -165,20 +161,19 @@
165161
166162 extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh,
167163 unsigned long val, void *v);
168
-extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh,
169
- unsigned long val, void *v, int nr_to_call, int *nr_calls);
170164 extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
171165 unsigned long val, void *v);
172
-extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh,
173
- unsigned long val, void *v, int nr_to_call, int *nr_calls);
174166 extern int raw_notifier_call_chain(struct raw_notifier_head *nh,
175167 unsigned long val, void *v);
176
-extern int __raw_notifier_call_chain(struct raw_notifier_head *nh,
177
- unsigned long val, void *v, int nr_to_call, int *nr_calls);
178168 extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh,
179169 unsigned long val, void *v);
180
-extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
181
- unsigned long val, void *v, int nr_to_call, int *nr_calls);
170
+
171
+extern int atomic_notifier_call_chain_robust(struct atomic_notifier_head *nh,
172
+ unsigned long val_up, unsigned long val_down, void *v);
173
+extern int blocking_notifier_call_chain_robust(struct blocking_notifier_head *nh,
174
+ unsigned long val_up, unsigned long val_down, void *v);
175
+extern int raw_notifier_call_chain_robust(struct raw_notifier_head *nh,
176
+ unsigned long val_up, unsigned long val_down, void *v);
182177
183178 #define NOTIFY_DONE 0x0000 /* Don't care */
184179 #define NOTIFY_OK 0x0001 /* Suits me */