Commit 74b85f37 authored by Chandra Seetharaman's avatar Chandra Seetharaman Committed by Linus Torvalds

[PATCH] cpu hotplug: make cpu_notifier related notifier blocks __cpuinit only

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: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 65edc68c
...@@ -747,7 +747,7 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, ...@@ -747,7 +747,7 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block cacheinfo_cpu_notifier = static struct notifier_block __cpuinitdata cacheinfo_cpu_notifier =
{ {
.notifier_call = cacheinfo_cpu_callback, .notifier_call = cacheinfo_cpu_callback,
}; };
......
...@@ -183,7 +183,7 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac ...@@ -183,7 +183,7 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac
return NOTIFY_OK; 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, .notifier_call = cpuid_class_cpu_callback,
}; };
......
...@@ -266,7 +266,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long acti ...@@ -266,7 +266,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long acti
return NOTIFY_OK; 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, .notifier_call = msr_class_cpu_callback,
}; };
......
...@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu) ...@@ -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, unsigned long action,
void *hcpu) void *hcpu)
{ {
...@@ -978,7 +978,7 @@ static int __devinit palinfo_cpu_callback(struct notifier_block *nfb, ...@@ -978,7 +978,7 @@ static int __devinit palinfo_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block palinfo_cpu_notifier = static struct notifier_block __cpuinitdata palinfo_cpu_notifier =
{ {
.notifier_call = palinfo_cpu_callback, .notifier_call = palinfo_cpu_callback,
.priority = 0, .priority = 0,
......
...@@ -422,7 +422,7 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, ...@@ -422,7 +422,7 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block cache_cpu_notifier = static struct notifier_block __cpuinitdata cache_cpu_notifier =
{ {
.notifier_call = cache_cpu_callback .notifier_call = cache_cpu_callback
}; };
......
...@@ -334,7 +334,7 @@ out: ...@@ -334,7 +334,7 @@ out:
return nid; return nid;
} }
static int cpu_numa_callback(struct notifier_block *nfb, static int __cpuinit cpu_numa_callback(struct notifier_block *nfb,
unsigned long action, unsigned long action,
void *hcpu) void *hcpu)
{ {
...@@ -609,14 +609,15 @@ static void __init *careful_allocation(int nid, unsigned long size, ...@@ -609,14 +609,15 @@ static void __init *careful_allocation(int nid, unsigned long size,
return (void *)ret; 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) void __init do_init_bootmem(void)
{ {
int nid; int nid;
unsigned int i; 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; min_low_pfn = 0;
max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
......
...@@ -647,7 +647,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) ...@@ -647,7 +647,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block mce_cpu_notifier = { static struct notifier_block __cpuinitdata mce_cpu_notifier = {
.notifier_call = mce_cpu_callback, .notifier_call = mce_cpu_callback,
}; };
......
...@@ -125,7 +125,7 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb, ...@@ -125,7 +125,7 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block topology_cpu_notifier = static struct notifier_block __cpuinitdata topology_cpu_notifier =
{ {
.notifier_call = topology_cpu_callback, .notifier_call = topology_cpu_callback,
}; };
......
...@@ -1533,7 +1533,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, ...@@ -1533,7 +1533,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block cpufreq_cpu_notifier = static struct notifier_block __cpuinitdata cpufreq_cpu_notifier =
{ {
.notifier_call = cpufreq_cpu_callback, .notifier_call = cpufreq_cpu_callback,
}; };
......
...@@ -523,7 +523,7 @@ ratelimit_handler(struct notifier_block *self, unsigned long u, void *v) ...@@ -523,7 +523,7 @@ ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
return 0; return 0;
} }
static struct notifier_block ratelimit_nb = { static struct notifier_block __cpuinitdata ratelimit_nb = {
.notifier_call = ratelimit_handler, .notifier_call = ratelimit_handler,
.next = NULL, .next = NULL,
}; };
......
...@@ -2031,7 +2031,7 @@ static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb, ...@@ -2031,7 +2031,7 @@ static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb,
return ret; return ret;
} }
static struct notifier_block pageset_notifier = static struct notifier_block __cpuinitdata pageset_notifier =
{ &pageset_cpuup_callback, NULL, 0 }; { &pageset_cpuup_callback, NULL, 0 };
void __init setup_per_cpu_pageset(void) void __init setup_per_cpu_pageset(void)
......
...@@ -1255,7 +1255,9 @@ bad: ...@@ -1255,7 +1255,9 @@ bad:
return NOTIFY_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 * swap the static kmem_list3 with kmalloced memory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment