The patch titled cpu hotplug: fix hotplug cpu documentation for proper usage has been added to the -mm tree. Its filename is fix-hotplug-cpu-documentation-for-proper-usage.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: cpu hotplug: fix hotplug cpu documentation for proper usage From: Chandra Seetharaman <sekharan@xxxxxxxxxx> Update hotplug cpu documentation to clearly state when to use register_cpu_notifier() and register_hotcpu_notifier. Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- Documentation/cpu-hotplug.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff -puN Documentation/cpu-hotplug.txt~fix-hotplug-cpu-documentation-for-proper-usage Documentation/cpu-hotplug.txt --- a/Documentation/cpu-hotplug.txt~fix-hotplug-cpu-documentation-for-proper-usage +++ a/Documentation/cpu-hotplug.txt @@ -251,16 +251,24 @@ A: This is what you would need in your k return NOTIFY_OK; } - static struct notifier_block foobar_cpu_notifer = + static struct notifier_block __cpuinitdata foobar_cpu_notifer = { .notifier_call = foobar_cpu_callback, }; +You need to call register_cpu_notifier() from your init function. +Init functions could be of two types: +1. early init (init function called when only the boot processor is online). +2. late init (init function called _after_ all the CPUs are online). -In your init function, +For the first case, you should add the following to your init function register_cpu_notifier(&foobar_cpu_notifier); +For the second case, you should add the following to your init function + + register_hotcpu_notifier(&foobar_cpu_notifier); + You can fail PREPARE notifiers if something doesn't work to prepare resources. This will stop the activity and send a following CANCELED event back. _ Patches currently in -mm which might be from sekharan@xxxxxxxxxx are process-events-fix-biarch-compatibility-issue-use-__u64-timestamp.patch taskstats-free-skb-avoid-returns-in.patch replace-__devinit-with-__cpuinit-for-cpu-notifications.patch fix-hotplug-cpu-documentation-for-proper-usage.patch use-hotplug-version-of-registration-in-late-inits.patch task-watchers-task-watchers.patch task-watchers-register-per-task-delay-accounting.patch task-watchers-add-support-for-per-task-watchers.patch add-srcu-based-notifier-chains.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html