powerpc: Correct annotations of pmu registration functions
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Wed, 29 Jun 2011 04:54:00 +0000 (04:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 19 Jul 2011 05:12:40 +0000 (15:12 +1000)
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: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/mpc7450-pmu.c
arch/powerpc/kernel/perf_event.c
arch/powerpc/kernel/power4-pmu.c
arch/powerpc/kernel/power5+-pmu.c
arch/powerpc/kernel/power5-pmu.c
arch/powerpc/kernel/power6-pmu.c
arch/powerpc/kernel/power7-pmu.c
arch/powerpc/kernel/ppc970-pmu.c

index 2cc5e0301d0b532a2291e400cb7bdc0a87aa89cd..a6de23d5ef4134ef4417f0caf1c851592aad22d1 100644 (file)
@@ -405,7 +405,7 @@ struct power_pmu mpc7450_pmu = {
        .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 ||
            strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
index 822f63008ae11642b570986c7faf8ca61478ae10..31ab78f3bee4a9bee954b9d3ed83ae56919cfbdf 100644 (file)
@@ -1408,7 +1408,7 @@ power_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu
        return NOTIFY_OK;
 }
 
-int register_power_pmu(struct power_pmu *pmu)
+int __cpuinit register_power_pmu(struct power_pmu *pmu)
 {
        if (ppmu)
                return -EBUSY;          /* something's already registered */
index ead8b3c2649ebba98c00423727e7dae54c6f5a7f..4eb70950139602b32b8809df17a7c1a2bc9790c2 100644 (file)
@@ -604,7 +604,7 @@ static struct power_pmu power4_pmu = {
        .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 ||
            strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
index eca0ac595cb6c5b790ea4fd37d77ebb3a8ee474b..23aaadbc729c02adfdd62e0e37ddf037977cbebf 100644 (file)
@@ -672,7 +672,7 @@ static struct power_pmu power5p_pmu = {
        .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 ||
            (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+")
index d5ff0f64a5e645e01ddc6f9b56c91c60e14b204a..589e49af8e7225ef30726bbd3448a99d22a952c5 100644 (file)
@@ -612,7 +612,7 @@ static struct power_pmu power5_pmu = {
        .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 ||
            strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
index 31603927e376e7e8854bf6a0faf86bc2bc9e56f7..e13dcda4fa98364e786695d3aafb7ab57cabad15 100644 (file)
@@ -535,7 +535,7 @@ static struct power_pmu power6_pmu = {
        .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 ||
            strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
index 593740fcb799d6fc9c29faca49425ad97b15b19a..81230400843c35f687fc83455d20dc5e7fa434c4 100644 (file)
@@ -360,7 +360,7 @@ static struct power_pmu power7_pmu = {
        .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 ||
            strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7"))
index 9a6e093858fe13fd30d2a79adb82e38e8c424b84..45d787920991fe818bbb09bac903a3c5b127552f 100644 (file)
@@ -484,7 +484,7 @@ static struct power_pmu ppc970_pmu = {
        .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 ||
            (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
This page took 0.031398 seconds and 5 git commands to generate.