A mechanism to allow debuggers to learn about starting/dying CPUs as early/late as possible. Arch-dependent changes for i386 and x86_64 will follow. Signed-Off-By: Jan Beulich Index: 2.6.14-nlkd/include/linux/cpu.h =================================================================== --- 2.6.14-nlkd.orig/include/linux/cpu.h 2005-11-09 10:40:17.000000000 +0100 +++ 2.6.14-nlkd/include/linux/cpu.h 2005-11-04 16:19:34.000000000 +0100 @@ -42,6 +42,10 @@ struct notifier_block; extern int register_cpu_notifier(struct notifier_block *nb); extern void unregister_cpu_notifier(struct notifier_block *nb); +#ifndef MODULE +extern int cpu_notify(unsigned long); +#endif + int cpu_up(unsigned int cpu); #else Index: 2.6.14-nlkd/include/linux/notifier.h =================================================================== --- 2.6.14-nlkd.orig/include/linux/notifier.h 2005-11-09 10:40:17.000000000 +0100 +++ 2.6.14-nlkd/include/linux/notifier.h 2005-11-04 16:19:34.000000000 +0100 @@ -65,12 +65,14 @@ extern int notifier_call_chain(struct no #define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ +#define CPU_ALIVE 0x0001 /* current CPU is alive */ #define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ #define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */ #define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */ #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ #define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ +#define CPU_DYING 0x0008 /* current CPU dying */ #endif /* __KERNEL__ */ #endif /* _LINUX_NOTIFIER_H */ Index: 2.6.14-nlkd/kernel/cpu.c =================================================================== --- 2.6.14-nlkd.orig/kernel/cpu.c 2005-11-09 10:40:17.000000000 +0100 +++ 2.6.14-nlkd/kernel/cpu.c 2005-11-04 16:19:34.000000000 +0100 @@ -41,6 +41,12 @@ void unregister_cpu_notifier(struct noti } EXPORT_SYMBOL(unregister_cpu_notifier); +int cpu_notify(unsigned long event) +{ + return notifier_call_chain(&cpu_chain, event, + (void *)(long)smp_processor_id()); +} + #ifdef CONFIG_HOTPLUG_CPU static inline void check_for_tasks(int cpu) {