From db6a5cef7f474a5bad476a31f4e4c69a69fab8b1 Mon Sep 17 00:00:00 2001 From: Satyam Sharma Date: Tue, 2 Oct 2007 13:39:45 -0700 Subject: [IA64] tree-wide: Misc __cpu{initdata, init, exit} annotations * palinfo.c: palinfo_cpu_notifier is a CPU hotplug notifier_block, and can be marked __cpuinitdata, and the callback function palinfo_cpu_callback() itself can be marked __cpuinit. create_palinfo_proc_entries() is only called from __cpuinit callback or general __init code, therefore a candidate for __cpuinit itself. remove_palinfo_proc_entries() is only called from __cpuinit callback or general __exit code, therefore a candidate for __cpuexit. * salinfo.c: The CPU hotplug notifier_block can be __cpuinitdata. The callback salinfo_cpu_callback() is incorrectly marked __devinit -- it must be __cpuinit instead. * topology.c: cache_sysfs_init() is only called at device_initcall() time so marking it as __cpuinit is wrong and wasteful. It should be unconditionally __init. Also cleanup reference to hotplug notifier callback function from this function and replace with cache_add_dev(), which could also enable us to use other tricks to replace __cpuinit{data} annotations, as recently discussed on this list. cache_shared_cpu_map_setup() is only ever called from __cpuinit-marked functions hence both its definitions (SMP or !SMP) are candidates for __cpuinit itself. Also all_cpu_cache_info can be __cpuinitdata because only referenced from __cpuinit code. Signed-off-by: Satyam Sharma Cc: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- arch/ia64/kernel/salinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/ia64/kernel/salinfo.c') diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 25cd75f50ab..779c3cca206 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c @@ -574,7 +574,7 @@ static const struct file_operations salinfo_data_fops = { .write = salinfo_log_write, }; -static int __devinit +static int __cpuinit salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) { unsigned int i, cpu = (unsigned long)hcpu; @@ -615,7 +615,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu return NOTIFY_OK; } -static struct notifier_block salinfo_cpu_notifier = +static struct notifier_block salinfo_cpu_notifier __cpuinitdata = { .notifier_call = salinfo_cpu_callback, .priority = 0, -- cgit v1.2.3