diff options
author | Satyam Sharma <satyam@infradead.org> | 2007-10-17 12:04:40 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@inhelltoy.tec.linutronix.de> | 2007-10-17 14:16:49 -0400 |
commit | c789c037e9d0d93d6081e796ab70b488b2ff69f2 (patch) | |
tree | 47c4e65bfa447145b86ab6c15969bba4d05764b8 /arch/x86 | |
parent | 0b4b5dde45a9416bf57c1e2e5ccf748e538368aa (diff) |
x86: call cache_add_dev() from cache_sysfs_init() explicitly
Call cache_add_dev() from cache_sysfs_init() explicitly, instead of
referencing the CPU notifier callback directly from generic startup
code. Looks cleaner (to me at least) this way, and also makes it
possible to use other tricks to replace __cpuinit{data} annotations, as
recently discussed on this list.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 6f9dd38029bd..1826395ebeeb 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -794,8 +794,9 @@ static int __cpuinit cache_sysfs_init(void) | |||
794 | register_hotcpu_notifier(&cacheinfo_cpu_notifier); | 794 | register_hotcpu_notifier(&cacheinfo_cpu_notifier); |
795 | 795 | ||
796 | for_each_online_cpu(i) { | 796 | for_each_online_cpu(i) { |
797 | cacheinfo_cpu_callback(&cacheinfo_cpu_notifier, CPU_ONLINE, | 797 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned int)i); |
798 | (void *)(long)i); | 798 | |
799 | cache_add_dev(sys_dev); | ||
799 | } | 800 | } |
800 | 801 | ||
801 | return 0; | 802 | return 0; |