aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/notifier.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/notifier.h')
-rw-r--r--include/linux/notifier.h82
1 files changed, 6 insertions, 76 deletions
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index c0688b0168b..d65746efc95 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -185,80 +185,17 @@ static inline int notifier_to_errno(int ret)
185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... 185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc...
186 */ 186 */
187 187
188/* netdevice notifier chain. Please remember to update the rtnetlink 188/* CPU notfiers are defined in include/linux/cpu.h. */
189 * notification exclusion list in rtnetlink_event() when adding new
190 * types.
191 */
192#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */
193#define NETDEV_DOWN 0x0002
194#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface
195 detected a hardware crash and restarted
196 - we can use this eg to kick tcp sessions
197 once done */
198#define NETDEV_CHANGE 0x0004 /* Notify device state change */
199#define NETDEV_REGISTER 0x0005
200#define NETDEV_UNREGISTER 0x0006
201#define NETDEV_CHANGEMTU 0x0007
202#define NETDEV_CHANGEADDR 0x0008
203#define NETDEV_GOING_DOWN 0x0009
204#define NETDEV_CHANGENAME 0x000A
205#define NETDEV_FEAT_CHANGE 0x000B
206#define NETDEV_BONDING_FAILOVER 0x000C
207#define NETDEV_PRE_UP 0x000D
208#define NETDEV_PRE_TYPE_CHANGE 0x000E
209#define NETDEV_POST_TYPE_CHANGE 0x000F
210#define NETDEV_POST_INIT 0x0010
211#define NETDEV_UNREGISTER_BATCH 0x0011
212#define NETDEV_RELEASE 0x0012
213#define NETDEV_NOTIFY_PEERS 0x0013
214#define NETDEV_JOIN 0x0014
215
216#define SYS_DOWN 0x0001 /* Notify of system down */
217#define SYS_RESTART SYS_DOWN
218#define SYS_HALT 0x0002 /* Notify of system halt */
219#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
220 189
221#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ 190/* netdevice notifiers are defined in include/linux/netdevice.h */
222 191
223#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ 192/* reboot notifiers are defined in include/linux/reboot.h. */
224#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
225#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
226#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
227#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
228#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
229#define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task,
230 * not handling interrupts, soon dead.
231 * Called on the dying cpu, interrupts
232 * are already disabled. Must not
233 * sleep, must not fail */
234#define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug
235 * lock is dropped */
236#define CPU_STARTING 0x000A /* CPU (unsigned)v soon running.
237 * Called on the new cpu, just before
238 * enabling interrupts. Must not sleep,
239 * must not fail */
240 193
241/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend 194/* Hibernation and suspend events are defined in include/linux/suspend.h. */
242 * operation in progress
243 */
244#define CPU_TASKS_FROZEN 0x0010
245 195
246#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN) 196/* Virtual Terminal events are defined in include/linux/vt.h. */
247#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
248#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
249#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
250#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
251#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
252#define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN)
253#define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN)
254 197
255/* Hibernation and suspend events */ 198#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */
256#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
257#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */
258#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
259#define PM_POST_SUSPEND 0x0004 /* Suspend finished */
260#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
261#define PM_POST_RESTORE 0x0006 /* Restore failed */
262 199
263/* Console keyboard events. 200/* Console keyboard events.
264 * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and 201 * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and
@@ -271,12 +208,5 @@ static inline int notifier_to_errno(int ret)
271 208
272extern struct blocking_notifier_head reboot_notifier_list; 209extern struct blocking_notifier_head reboot_notifier_list;
273 210
274/* Virtual Terminal events. */
275#define VT_ALLOCATE 0x0001 /* Console got allocated */
276#define VT_DEALLOCATE 0x0002 /* Console will be deallocated */
277#define VT_WRITE 0x0003 /* A char got output */
278#define VT_UPDATE 0x0004 /* A bigger update occurred */
279#define VT_PREWRITE 0x0005 /* A char is about to be written to the console */
280
281#endif /* __KERNEL__ */ 211#endif /* __KERNEL__ */
282#endif /* _LINUX_NOTIFIER_H */ 212#endif /* _LINUX_NOTIFIER_H */