Commit 26c2143b authored by Chandra Seetharaman's avatar Chandra Seetharaman Committed by Linus Torvalds

[PATCH] cpu hotplug: make cpu_notifier related notifier calls __cpuinit only

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: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 74b85f37
...@@ -4734,7 +4734,8 @@ static void migrate_dead_tasks(unsigned int dead_cpu) ...@@ -4734,7 +4734,8 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
* migration_call - callback that gets triggered when a CPU is added. * migration_call - callback that gets triggered when a CPU is added.
* Here we can start up the necessary migration thread for the new CPU. * Here we can start up the necessary migration thread for the new CPU.
*/ */
static int migration_call(struct notifier_block *nfb, unsigned long action, static int __cpuinit migration_call(struct notifier_block *nfb,
unsigned long action,
void *hcpu) void *hcpu)
{ {
int cpu = (long)hcpu; int cpu = (long)hcpu;
...@@ -4805,7 +4806,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action, ...@@ -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) /* Register at highest priority so that task migration (migrate_all_tasks)
* happens before everything else. * happens before everything else.
*/ */
static struct notifier_block __devinitdata migration_notifier = { static struct notifier_block __cpuinitdata migration_notifier = {
.notifier_call = migration_call, .notifier_call = migration_call,
.priority = 10 .priority = 10
}; };
......
...@@ -516,7 +516,7 @@ static void set_ratelimit(void) ...@@ -516,7 +516,7 @@ static void set_ratelimit(void)
ratelimit_pages = (4096 * 1024) / PAGE_CACHE_SIZE; ratelimit_pages = (4096 * 1024) / PAGE_CACHE_SIZE;
} }
static int static int __cpuinit
ratelimit_handler(struct notifier_block *self, unsigned long u, void *v) ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
{ {
set_ratelimit(); set_ratelimit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment