Skip to contentSkip to conversation

MIPS: BMIPS: Fix section mismatch warning

PATCH In review Jaedon Shin 3 participants 4 messages Feb 6, 2018 – Feb 15, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: BMIPS: Fix section mismatch warning

Remove the __init annotation from bmips_cpu_setup() to avoid the following warning.

WARNING: vmlinux.o(.text+0x35c950): Section mismatch in reference from the function brcmstb_pm_s3() to the function .init.text:bmips_cpu_setup() The function brcmstb_pm_s3() references
the function __init bmips_cpu_setup().
This is often because brcmstb_pm_s3 lacks a __init
annotation or the annotation of bmips_cpu_setup is wrong.

---
 arch/mips/kernel/smp-bmips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/smp-bmips.c +1 -1
index 87dcac2447c8..9d41732a9146 100644
@@ -572,7 +572,7 @@ asmlinkage void __weak plat_wired_tlb_setup(void)
 	 */
 }
 
-void __init bmips_cpu_setup(void)
+void bmips_cpu_setup(void)
 {
 	void __iomem __maybe_unused *cbr = BMIPS_GET_CBR();
 	u32 __maybe_unused cfg;
Signature · 1 line
2.16.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Jaedon Shin

Remove the __init annotation from bmips_cpu_setup() to avoid the following warning.

WARNING: vmlinux.o(.text+0x35c950): Section mismatch in reference from the function brcmstb_pm_s3() to the function .init.text:bmips_cpu_setup() The function brcmstb_pm_s3() references
the function __init bmips_cpu_setup().
This is often because brcmstb_pm_s3 lacks a __init
annotation or the annotation of bmips_cpu_setup is wrong.

Should CONFIG_BRCMSTB_PM=y be in any of the bmips defconfigs to get some build coverage of this?

Thanks
James

Quoted 20 lines
---
 arch/mips/kernel/smp-bmips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/smp-bmips.c +1 -1
index 87dcac2447c8..9d41732a9146 100644
@@ -572,7 +572,7 @@ asmlinkage void __weak plat_wired_tlb_setup(void)
 	 */
 }
 
-void __init bmips_cpu_setup(void)
+void bmips_cpu_setup(void)
 {
 	void __iomem __maybe_unused *cbr = BMIPS_GET_CBR();
 	u32 __maybe_unused cfg;
Signature · 1 line
2.16.1
Reviewed-by
#2 lore raw
Quoted 10 lines · James Hogan
Quoted 9 lines · Jaedon Shin

Remove the __init annotation from bmips_cpu_setup() to avoid the following warning.

WARNING: vmlinux.o(.text+0x35c950): Section mismatch in reference from the function brcmstb_pm_s3() to the function .init.text:bmips_cpu_setup() The function brcmstb_pm_s3() references
the function __init bmips_cpu_setup().
This is often because brcmstb_pm_s3 lacks a __init
annotation or the annotation of bmips_cpu_setup is wrong.

Quoted 6 lines
Quoted 1 line

Should CONFIG_BRCMSTB_PM=y be in any of the bmips defconfigs to get some build coverage of this?

That would be a good idea, Jaedon, do you want to submit a patch doing that or should I?

Signature · 1 line
Florian
#3 lore raw
Quoted 15 lines · Florian Fainelli
Quoted 14 lines · James Hogan
Quoted 10 lines · Jaedon Shin

Remove the __init annotation from bmips_cpu_setup() to avoid the following warning.

WARNING: vmlinux.o(.text+0x35c950): Section mismatch in reference from the function brcmstb_pm_s3() to the function .init.text:bmips_cpu_setup() The function brcmstb_pm_s3() references
the function __init bmips_cpu_setup().
This is often because brcmstb_pm_s3 lacks a __init
annotation or the annotation of bmips_cpu_setup is wrong.

Quoted 7 lines
Quoted 2 lines

Should CONFIG_BRCMSTB_PM=y be in any of the bmips defconfigs to get some build coverage of this?

That would be a good idea, Jaedon, do you want to submit a patch doing that or should I?

Applied for 4.16,

Thanks
James