]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] cpu hotplug: make cpu_notifier related notifier blocks __cpuinit only
authorChandra Seetharaman <sekharan@us.ibm.com>
Tue, 27 Jun 2006 09:54:09 +0000 (02:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 00:32:41 +0000 (17:32 -0700)
Make notifier_blocks associated with cpu_notifier as __cpuinitdata.

__cpuinitdata makes sure that the data is init time only unless
CONFIG_HOTPLUG_CPU is defined.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
12 files changed:
arch/i386/kernel/cpu/intel_cacheinfo.c
arch/i386/kernel/cpuid.c
arch/i386/kernel/msr.c
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/topology.c
arch/powerpc/mm/numa.c
arch/x86_64/kernel/mce.c
drivers/base/topology.c
drivers/cpufreq/cpufreq.c
mm/page-writeback.c
mm/page_alloc.c
mm/slab.c

index 1d4ab10479823f798dba281c46e37e2f1508d147..e9f0b928b0a9925e534ddeadb3c868493240df58 100644 (file)
@@ -747,7 +747,7 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
 }
 
-static struct notifier_block cacheinfo_cpu_notifier =
+static struct notifier_block __cpuinitdata cacheinfo_cpu_notifier =
 {
     .notifier_call = cacheinfo_cpu_callback,
 };
index 1d9a4abcdfc71f034c1c822853049280b32de0a2..f6dfa9fb675c1bfc5eba75ba74317ba2815b6da1 100644 (file)
@@ -183,7 +183,7 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac
        return NOTIFY_OK;
 }
 
-static struct notifier_block cpuid_class_cpu_notifier =
+static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier =
 {
        .notifier_call = cpuid_class_cpu_callback,
 };
index 7a328230e540f8b073e5d0306f457a1a9bffbc28..d022cb8fd7251ccc79e3eeb89a8210e5f92b85d1 100644 (file)
@@ -266,7 +266,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long acti
        return NOTIFY_OK;
 }
 
-static struct notifier_block msr_class_cpu_notifier =
+static struct notifier_block __cpuinitdata msr_class_cpu_notifier =
 {
        .notifier_call = msr_class_cpu_callback,
 };
index 6386f63c413e60b82449d691cf2f1f17bf333aab..303a9afcf2a1ce7b5845335c36591f23c3c3b360 100644 (file)
@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu)
        }
 }
 
-static int __devinit palinfo_cpu_callback(struct notifier_block *nfb,
+static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb,
                                                                unsigned long action,
                                                                void *hcpu)
 {
@@ -978,7 +978,7 @@ static int __devinit palinfo_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
 }
 
-static struct notifier_block palinfo_cpu_notifier =
+static struct notifier_block __cpuinitdata palinfo_cpu_notifier =
 {
        .notifier_call = palinfo_cpu_callback,
        .priority = 0,
index f07c382b57b8c7eec4139cb8ed76acb4a859965d..5511d9c6c70152fe67b1025c1fe8ea8044926760 100644 (file)
@@ -422,7 +422,7 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
 }
 
-static struct notifier_block cache_cpu_notifier =
+static struct notifier_block __cpuinitdata cache_cpu_notifier =
 {
        .notifier_call = cache_cpu_callback
 };
index aa98cb3b59d82a3c9ff49f35089ba0244eca60d6..fbe23933f73192662b1780ff7d99c728a4eddaf9 100644 (file)
@@ -334,7 +334,7 @@ out:
        return nid;
 }
 
-static int cpu_numa_callback(struct notifier_block *nfb,
+static int __cpuinit cpu_numa_callback(struct notifier_block *nfb,
                             unsigned long action,
                             void *hcpu)
 {
@@ -609,14 +609,15 @@ static void __init *careful_allocation(int nid, unsigned long size,
        return (void *)ret;
 }
 
+static struct notifier_block __cpuinitdata ppc64_numa_nb = {
+       .notifier_call = cpu_numa_callback,
+       .priority = 1 /* Must run before sched domains notifier. */
+};
+
 void __init do_init_bootmem(void)
 {
        int nid;
        unsigned int i;
-       static struct notifier_block ppc64_numa_nb = {
-               .notifier_call = cpu_numa_callback,
-               .priority = 1 /* Must run before sched domains notifier. */
-       };
 
        min_low_pfn = 0;
        max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
index efe8500a5b9db7af0a60dd2c59ab5250d7f9353a..88845674c661a39feefc5b35bb5c5dd9b2255be8 100644 (file)
@@ -647,7 +647,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
        return NOTIFY_OK;
 }
 
-static struct notifier_block mce_cpu_notifier = {
+static struct notifier_block __cpuinitdata mce_cpu_notifier = {
        .notifier_call = mce_cpu_callback,
 };
 
index 915810f6237eeca929235e1502983080989a3376..c2d621632383306a493fd5f60d5d3b9b55721f70 100644 (file)
@@ -125,7 +125,7 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
 }
 
-static struct notifier_block topology_cpu_notifier =
+static struct notifier_block __cpuinitdata topology_cpu_notifier =
 {
        .notifier_call = topology_cpu_callback,
 };
index 3533e26f837d02db4da4999399be4a6643aab744..35e0b9ceecf7faa90f9ab34784112533e7d48ec7 100644 (file)
@@ -1533,7 +1533,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
 }
 
-static struct notifier_block cpufreq_cpu_notifier =
+static struct notifier_block __cpuinitdata cpufreq_cpu_notifier =
 {
     .notifier_call = cpufreq_cpu_callback,
 };
index 8ccf6f1b1473c1e26e0da73e5f8f95c4b041def9..8ac6bfb400736c4ae92f33bcd6524b529f6f3459 100644 (file)
@@ -523,7 +523,7 @@ ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
        return 0;
 }
 
-static struct notifier_block ratelimit_nb = {
+static struct notifier_block __cpuinitdata ratelimit_nb = {
        .notifier_call  = ratelimit_handler,
        .next           = NULL,
 };
index e9fb2d4064c892e4bdd51287fa79a1d7ce417e27..dafd12ec7a0c100a9d6e3961230e8fed5b4494e0 100644 (file)
@@ -2031,7 +2031,7 @@ static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb,
        return ret;
 }
 
-static struct notifier_block pageset_notifier =
+static struct notifier_block __cpuinitdata pageset_notifier =
        { &pageset_cpuup_callback, NULL, 0 };
 
 void __init setup_per_cpu_pageset(void)
index 631c0feb9645a4c0b83de61ad3af548633791cfb..d1d55279202e0759f1d60c5b19ba483606e1973b 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1255,7 +1255,9 @@ bad:
        return NOTIFY_BAD;
 }
 
-static struct notifier_block cpucache_notifier = { &cpuup_callback, NULL, 0 };
+static struct notifier_block __cpuinitdata cpucache_notifier = {
+       &cpuup_callback, NULL, 0
+};
 
 /*
  * swap the static kmem_list3 with kmalloced memory