ARM: perf: Fix section mismatch on armpmu_init()
PATCH 1/1 ARM: perf: Fix section mismatch on armpmu_init()
WARNING: vmlinux.o(.text+0xfb80): Section mismatch in reference from the function armpmu_register() to the function .init.text:armpmu_init()
The function armpmu_register() references
the function __init armpmu_init().
This is often because armpmu_register lacks a __init annotation or the annotation of armpmu_init is wrong.
Just drop the __init marking on armpmu_init() because armpmu_register() no longer has an __init marking.
---
I doubt anyone is actually experiencing any problems because this driver probes before kernel init is over. But the warning is a bit annoying.
arch/arm/kernel/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/perf_event.c +1 -1
@@ -484,7 +484,7 @@ const struct dev_pm_ops armpmu_dev_pm_ops = { SET_RUNTIME_PM_OPS(armpmu_runtime_suspend, armpmu_runtime_resume, NULL) }; -static void __init armpmu_init (struct arm_pmu *armpmu) +static void armpmu_init (struct arm_pmu *armpmu) {atomic_set (&armpmu->active_events,0 );mutex_init (&armpmu->reserve_mutex);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Quoted 8 lines · Stephen Boyd
WARNING:
vmlinux.o(.text+0xfb80): Section mismatch in reference from the functionarmpmu_register()to the function .init.text:armpmu_init()
The functionarmpmu_register()references
the function__initarmpmu_init().
This is often becausearmpmu_registerlacks a__initannotation or the annotation ofarmpmu_initis wrong.
Quoted 4 lines
Just drop the
__initmarking onarmpmu_init()becausearmpmu_register()no longer has an__initmarking.Signed-off-by Stephen Boyd <[email protected]>
Cheers Stephen:
Can you put this into the patch system please?
Will
Quoted 12 lines · Will Deacon
Quoted 11 lines · Stephen Boyd
WARNING:
vmlinux.o(.text+0xfb80): Section mismatch in reference from the functionarmpmu_register()to the function .init.text:armpmu_init()
The functionarmpmu_register()references
the function__initarmpmu_init().
This is often becausearmpmu_registerlacks a__initannotation or the annotation ofarmpmu_initis wrong.Just drop the
__initmarking onarmpmu_init()becausearmpmu_register()no longer has an__initmarking.
Quoted 8 lines
Quoted 1 line
Signed-off-by Stephen Boyd <[email protected]>Cheers Stephen:
Acked-by Will Deacon <[email protected]>Can you put this into the patch system please?
Thanks. 7667/1
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation