[PATCH] cpu hotplug: make cpu_notifier related notifier calls __cpuinit only
authorChandra Seetharaman <sekharan@us.ibm.com>
Tue, 27 Jun 2006 09:54:10 +0000 (02:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 00:32:41 +0000 (17:32 -0700)
Make notifier_calls associated with cpu_notifier as __cpuinit.

__cpuinit makes sure that the function is init time only unless
CONFIG_HOTPLUG_CPU is defined.

[akpm@osdl.org: section fix]
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c
mm/page-writeback.c

index b8deddb7833a52d2ad0ca4b439f45becea53ee1c..3e57712aefdf5d8e73cf8bbdb98061b1bd32229b 100644 (file)
@@ -4734,8 +4734,9 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
  * migration_call - callback that gets triggered when a CPU is added.
  * Here we can start up the necessary migration thread for the new CPU.
  */
-static int migration_call(struct notifier_block *nfb, unsigned long action,
-                         void *hcpu)
+static int __cpuinit migration_call(struct notifier_block *nfb,
+                       unsigned long action,
+                       void *hcpu)
 {
        int cpu = (long)hcpu;
        struct task_struct *p;
@@ -4805,7 +4806,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action,
 /* Register at highest priority so that task migration (migrate_all_tasks)
  * happens before everything else.
  */
-static struct notifier_block __devinitdata migration_notifier = {
+static struct notifier_block __cpuinitdata migration_notifier = {
        .notifier_call = migration_call,
        .priority = 10
 };
index 8ac6bfb400736c4ae92f33bcd6524b529f6f3459..4ec7026c7bab14e1f4a9e512742e318a6630607f 100644 (file)
@@ -516,7 +516,7 @@ static void set_ratelimit(void)
                ratelimit_pages = (4096 * 1024) / PAGE_CACHE_SIZE;
 }
 
-static int
+static int __cpuinit
 ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
 {
        set_ratelimit();