Commit 77c2342a authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Benjamin Herrenschmidt

powerpc: Correct annotations of pmu registration functions

This fixes the following warning:
WARNING: arch/powerpc/kernel/built-in.o(.text+0x29768): Section mismatch in reference from the function .register_power_pmu() to the function .cpuinit.text:.power_pmu_notifier()
The function .register_power_pmu() references
the function __cpuinit .power_pmu_notifier().
This is often because .register_power_pmu lacks a __cpuinit
annotation or the annotation of .power_pmu_notifier is wrong.
Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 0e0ebdb9
...@@ -405,7 +405,7 @@ struct power_pmu mpc7450_pmu = { ...@@ -405,7 +405,7 @@ struct power_pmu mpc7450_pmu = {
.cache_events = &mpc7450_cache_events, .cache_events = &mpc7450_cache_events,
}; };
static int init_mpc7450_pmu(void) static int __init init_mpc7450_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450")) strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
......
...@@ -1408,7 +1408,7 @@ power_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu ...@@ -1408,7 +1408,7 @@ power_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu
return NOTIFY_OK; return NOTIFY_OK;
} }
int register_power_pmu(struct power_pmu *pmu) int __cpuinit register_power_pmu(struct power_pmu *pmu)
{ {
if (ppmu) if (ppmu)
return -EBUSY; /* something's already registered */ return -EBUSY; /* something's already registered */
......
...@@ -604,7 +604,7 @@ static struct power_pmu power4_pmu = { ...@@ -604,7 +604,7 @@ static struct power_pmu power4_pmu = {
.cache_events = &power4_cache_events, .cache_events = &power4_cache_events,
}; };
static int init_power4_pmu(void) static int __init init_power4_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4")) strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
......
...@@ -672,7 +672,7 @@ static struct power_pmu power5p_pmu = { ...@@ -672,7 +672,7 @@ static struct power_pmu power5p_pmu = {
.cache_events = &power5p_cache_events, .cache_events = &power5p_cache_events,
}; };
static int init_power5p_pmu(void) static int __init init_power5p_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
(strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+") (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+")
......
...@@ -612,7 +612,7 @@ static struct power_pmu power5_pmu = { ...@@ -612,7 +612,7 @@ static struct power_pmu power5_pmu = {
.cache_events = &power5_cache_events, .cache_events = &power5_cache_events,
}; };
static int init_power5_pmu(void) static int __init init_power5_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5")) strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
......
...@@ -535,7 +535,7 @@ static struct power_pmu power6_pmu = { ...@@ -535,7 +535,7 @@ static struct power_pmu power6_pmu = {
.cache_events = &power6_cache_events, .cache_events = &power6_cache_events,
}; };
static int init_power6_pmu(void) static int __init init_power6_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
......
...@@ -360,7 +360,7 @@ static struct power_pmu power7_pmu = { ...@@ -360,7 +360,7 @@ static struct power_pmu power7_pmu = {
.cache_events = &power7_cache_events, .cache_events = &power7_cache_events,
}; };
static int init_power7_pmu(void) static int __init init_power7_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7")) strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7"))
......
...@@ -484,7 +484,7 @@ static struct power_pmu ppc970_pmu = { ...@@ -484,7 +484,7 @@ static struct power_pmu ppc970_pmu = {
.cache_events = &ppc970_cache_events, .cache_events = &ppc970_cache_events,
}; };
static int init_ppc970_pmu(void) static int __init init_ppc970_pmu(void)
{ {
if (!cur_cpu_spec->oprofile_cpu_type || if (!cur_cpu_spec->oprofile_cpu_type ||
(strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970") (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
......
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