diff options
author | Satyam Sharma <satyam@infradead.org> | 2007-10-02 16:39:45 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-10-12 17:13:38 -0400 |
commit | db6a5cef7f474a5bad476a31f4e4c69a69fab8b1 (patch) | |
tree | 9f27269dd89c0e88a5bf9396fd124cc22de27983 /arch/ia64/kernel/palinfo.c | |
parent | 782e3b3b3804c38d5130c7f21d7ec7bf6709023f (diff) |
[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 <satyam@infradead.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/palinfo.c')
-rw-r--r-- | arch/ia64/kernel/palinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 85829e27785c..6ef6ffb943a0 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -907,7 +907,7 @@ palinfo_read_entry(char *page, char **start, off_t off, int count, int *eof, voi | |||
907 | return len; | 907 | return len; |
908 | } | 908 | } |
909 | 909 | ||
910 | static void | 910 | static void __cpuinit |
911 | create_palinfo_proc_entries(unsigned int cpu) | 911 | create_palinfo_proc_entries(unsigned int cpu) |
912 | { | 912 | { |
913 | # define CPUSTR "cpu%d" | 913 | # define CPUSTR "cpu%d" |
@@ -968,7 +968,7 @@ remove_palinfo_proc_entries(unsigned int hcpu) | |||
968 | } | 968 | } |
969 | } | 969 | } |
970 | 970 | ||
971 | static int palinfo_cpu_callback(struct notifier_block *nfb, | 971 | static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb, |
972 | unsigned long action, void *hcpu) | 972 | unsigned long action, void *hcpu) |
973 | { | 973 | { |
974 | unsigned int hotcpu = (unsigned long)hcpu; | 974 | unsigned int hotcpu = (unsigned long)hcpu; |
@@ -986,7 +986,7 @@ static int palinfo_cpu_callback(struct notifier_block *nfb, | |||
986 | return NOTIFY_OK; | 986 | return NOTIFY_OK; |
987 | } | 987 | } |
988 | 988 | ||
989 | static struct notifier_block palinfo_cpu_notifier = | 989 | static struct notifier_block palinfo_cpu_notifier __cpuinitdata = |
990 | { | 990 | { |
991 | .notifier_call = palinfo_cpu_callback, | 991 | .notifier_call = palinfo_cpu_callback, |
992 | .priority = 0, | 992 | .priority = 0, |