[PATCH] cpu hotplug: use hotplug version of registration in late inits
Use hotplug version of register_cpu_notifier in late init functions. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
7c7165c908
commit
be6b5a3505
@@ -958,9 +958,9 @@ remove_palinfo_proc_entries(unsigned int hcpu)
|
||||
}
|
||||
}
|
||||
|
||||
static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
|
||||
unsigned long action,
|
||||
void *hcpu)
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
static int palinfo_cpu_callback(struct notifier_block *nfb,
|
||||
unsigned long action, void *hcpu)
|
||||
{
|
||||
unsigned int hotcpu = (unsigned long)hcpu;
|
||||
|
||||
@@ -968,20 +968,19 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
|
||||
case CPU_ONLINE:
|
||||
create_palinfo_proc_entries(hotcpu);
|
||||
break;
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
case CPU_DEAD:
|
||||
remove_palinfo_proc_entries(hotcpu);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block __cpuinitdata palinfo_cpu_notifier =
|
||||
static struct notifier_block palinfo_cpu_notifier =
|
||||
{
|
||||
.notifier_call = palinfo_cpu_callback,
|
||||
.priority = 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
static int __init
|
||||
palinfo_init(void)
|
||||
@@ -1020,7 +1019,7 @@ palinfo_exit(void)
|
||||
/*
|
||||
* Unregister from cpu notifier callbacks
|
||||
*/
|
||||
unregister_cpu_notifier(&palinfo_cpu_notifier);
|
||||
unregister_hotcpu_notifier(&palinfo_cpu_notifier);
|
||||
}
|
||||
|
||||
module_init(palinfo_init);
|
||||
|
@@ -435,7 +435,7 @@ static int __cpuinit cache_sysfs_init(void)
|
||||
(void *)(long)i);
|
||||
}
|
||||
|
||||
register_cpu_notifier(&cache_cpu_notifier);
|
||||
register_hotcpu_notifier(&cache_cpu_notifier);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user