+ cpu-hotplug-make-register_cpu_notifier-init-time-only.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     cpu hotplug: make [un]register_cpu_notifier init time only

has been added to the -mm tree.  Its filename is

     cpu-hotplug-make-register_cpu_notifier-init-time-only.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: make [un]register_cpu_notifier init time only
From: Chandra Seetharaman <sekharan@xxxxxxxxxx>


CPUs come online only at init time (unless CONFIG_HOTPLUG_CPU is defined). 
So, cpu_notifier functionality need to be available only at init time.

This patch makes register_cpu_notifier() available only at init time, unless
CONFIG_HOTPLUG_CPU is defined.

This patch exports register_cpu_notifier() and unregister_cpu_notifier() only
if CONFIG_HOTPLUG_CPU is defined.

Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Cc: Ashok Raj <ashok.raj@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/cpu.h |    6 ++++++
 kernel/cpu.c        |    8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff -puN include/linux/cpu.h~cpu-hotplug-make-register_cpu_notifier-init-time-only include/linux/cpu.h
--- a/include/linux/cpu.h~cpu-hotplug-make-register_cpu_notifier-init-time-only
+++ a/include/linux/cpu.h
@@ -41,7 +41,13 @@ struct notifier_block;
 #ifdef CONFIG_SMP
 /* Need to know about CPUs going up/down? */
 extern int register_cpu_notifier(struct notifier_block *nb);
+#ifdef CONFIG_HOTPLUG_CPU
 extern void unregister_cpu_notifier(struct notifier_block *nb);
+#else
+static inline void unregister_cpu_notifier(struct notifier_block *nb)
+{
+}
+#endif
 extern int current_in_cpu_hotplug(void);
 
 int cpu_up(unsigned int cpu);
diff -puN kernel/cpu.c~cpu-hotplug-make-register_cpu_notifier-init-time-only kernel/cpu.c
--- a/kernel/cpu.c~cpu-hotplug-make-register_cpu_notifier-init-time-only
+++ a/kernel/cpu.c
@@ -18,7 +18,7 @@
 /* This protects CPUs going up and down... */
 static DEFINE_MUTEX(cpucontrol);
 
-static BLOCKING_NOTIFIER_HEAD(cpu_chain);
+static __cpuinitdata BLOCKING_NOTIFIER_HEAD(cpu_chain);
 
 #ifdef CONFIG_HOTPLUG_CPU
 static struct task_struct *lock_cpu_hotplug_owner;
@@ -69,10 +69,13 @@ EXPORT_SYMBOL_GPL(lock_cpu_hotplug_inter
 #endif	/* CONFIG_HOTPLUG_CPU */
 
 /* Need to know about CPUs going up/down? */
-int register_cpu_notifier(struct notifier_block *nb)
+int __cpuinit register_cpu_notifier(struct notifier_block *nb)
 {
 	return blocking_notifier_chain_register(&cpu_chain, nb);
 }
+
+#ifdef CONFIG_HOTPLUG_CPU
+
 EXPORT_SYMBOL(register_cpu_notifier);
 
 void unregister_cpu_notifier(struct notifier_block *nb)
@@ -81,7 +84,6 @@ void unregister_cpu_notifier(struct noti
 }
 EXPORT_SYMBOL(unregister_cpu_notifier);
 
-#ifdef CONFIG_HOTPLUG_CPU
 static inline void check_for_tasks(int cpu)
 {
 	struct task_struct *p;
_

Patches currently in -mm which might be from sekharan@xxxxxxxxxx are

cpu-hotplug-revert-init-patch-submitted-for-2617.patch
cpu-hotplug-revert-initdata-patch-submitted-for-2617.patch
cpu-hotplug-make-register_cpu_notifier-init-time-only.patch
cpu-hotplug-make-cpu_notifier-related-notifier-blocks-__cpuinit-only.patch
cpu-hotplug-make-cpu_notifier-related-notifier-calls-__cpuinit-only.patch
cpu-hotplug-add-hotplug-versions-of-cpu_notifier.patch
cpu-hotplug-use-hotplug-version-of-cpu-notifier-in-appropriate-places.patch
per-task-delay-accounting-cpu-delay-collection-via-schedstats.patch
task-watchers-task-watchers.patch
task-watchers-task-watchers-tidy.patch
task-watchers-register-per-task-delay-accounting.patch
task-watchers-add-support-for-per-task-watchers.patch
task-watchers-add-support-for-per-task-watchers-warning-fix.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux