perf/x86: Fix section mismatch in split uncore driver
authorAndi Kleen <ak@linux.intel.com>
Fri, 29 Aug 2014 17:20:58 +0000 (10:20 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 9 Sep 2014 04:53:08 +0000 (06:53 +0200)
The new split Intel uncore driver code that recently went
into tip added a section mismatch, which the build process
complains about.

uncore_pmu_register() can be called from uncore_pci_probe,()
which is not __init and can be called from pci driver ->probe.
I'm not fully sure if it's actually possible to call the probe
function later, but it seems safer to mark uncore_pmu_register
not __init.

This also fixes the warning.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1409332858-29039-1-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_uncore.c

index 4785ee8ac599b953f2a60f28495c1cf863cfc9aa..812ec5d8218a2573d84ca57ddad4b73248836b2d 100644 (file)
@@ -661,7 +661,7 @@ static struct attribute_group uncore_pmu_attr_group = {
        .attrs = uncore_pmu_attrs,
 };
 
-static int __init uncore_pmu_register(struct intel_uncore_pmu *pmu)
+static int uncore_pmu_register(struct intel_uncore_pmu *pmu)
 {
        int ret;