Skip to contentSkip to conversation

ARM: omap2: avoid section mismatch warning

PATCH Applied Arnd Bergmann 8 participants 17 messages Dec 10, 2018 – Dec 12, 2018

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

PATCH 1/4 ARM: omap2: avoid section mismatch warning

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

---
 arch/arm/mach-omap2/pm33xx-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/pm33xx-core.c +1 -1
index f4971e4a86b2..724cf5774a6c 100644
@@ -28,7 +28,7 @@ static struct clockdomain *gfx_l4ls_clkdm;
 static void __iomem *scu_base;
 static struct omap_hwmod *rtc_oh;
 
-static int __init am43xx_map_scu(void)
+static int am43xx_map_scu(void)
 {
 	scu_base = ioremap(scu_a9_get_base(), SZ_256);
 
Signature · 1 line
2.20.0
#1 lore raw

PATCH 2/4 ARM: tegra: avoid section mismatch warning

WARNING: vmlinux.o(.text+0x39ecc): Section mismatch in reference from the function tegra114_gic_cpu_pm_registration() to the (unknown reference) .init.rodata:(unknown) The function tegra114_gic_cpu_pm_registration() references
the (unknown reference) __initconst (unknown).
This is often because tegra114_gic_cpu_pm_registration lacks a __initconst
annotation or the annotation of (unknown) is wrong.

---
 arch/arm/mach-tegra/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-tegra/irq.c +2 -2
index a69b22d37eed..a186ab663b0b 100644
@@ -72,7 +72,7 @@ static const struct of_device_id tegra114_dt_gic_match[] __initconst = {
 	{ }
 };
 
-static void tegra114_gic_cpu_pm_registration(void)
+static void __init tegra114_gic_cpu_pm_registration(void)
 {
 	struct device_node *dn;
 
@@ -85,7 +85,7 @@ static void tegra114_gic_cpu_pm_registration(void)
 	cpu_pm_register_notifier(&tegra_gic_notifier_block);
 }
 #else
-static void tegra114_gic_cpu_pm_registration(void) { }
+static void __init tegra114_gic_cpu_pm_registration(void) { }
 #endif
 
 static const struct of_device_id tegra_ictlr_match[] __initconst = {
Signature · 1 line
2.20.0
Acked-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] ARM: tegra: avoid section mismatch warning

Quoted 10 lines · Arnd Bergmann

WARNING: vmlinux.o(.text+0x39ecc): Section mismatch in reference from the function tegra114_gic_cpu_pm_registration() to the (unknown reference) .init.rodata:(unknown) The function tegra114_gic_cpu_pm_registration() references
the (unknown reference) __initconst (unknown).
This is often because tegra114_gic_cpu_pm_registration lacks a __initconst
annotation or the annotation of (unknown) is wrong.

---
 arch/arm/mach-tegra/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I'm not seeing these. Do I need to enable any special options to trigger these? Or are these just so new that I haven't run into them yet?

In either case, I see that this is called by tegra_init_irq() and that does have an __init annotation, so this looks good to me:

#3 lore raw

Re: [PATCH 2/4] ARM: tegra: avoid section mismatch warning

Quoted 8 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann

WARNING: vmlinux.o(.text+0x39ecc): Section mismatch in reference from the function tegra114_gic_cpu_pm_registration() to the (unknown reference) .init.rodata:(unknown) The function tegra114_gic_cpu_pm_registration() references
the (unknown reference) __initconst (unknown).
This is often because tegra114_gic_cpu_pm_registration lacks a __initconst
annotation or the annotation of (unknown) is wrong.

Quoted 7 lines
Quoted 4 lines
---
 arch/arm/mach-tegra/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I'm not seeing these. Do I need to enable any special options to trigger these? Or are these just so new that I haven't run into them yet?

My guess would be that this is a result of the CONFIG_NO_AUTO_INLINE option that is now available in linux-next.

Arnd

#4 lore raw

Re: [PATCH 2/4] ARM: tegra: avoid section mismatch warning

Quoted 15 lines · Arnd Bergmann
Quoted 13 lines · Thierry Reding
Quoted 10 lines · Arnd Bergmann

WARNING: vmlinux.o(.text+0x39ecc): Section mismatch in reference from the function tegra114_gic_cpu_pm_registration() to the (unknown reference) .init.rodata:(unknown) The function tegra114_gic_cpu_pm_registration() references
the (unknown reference) __initconst (unknown).
This is often because tegra114_gic_cpu_pm_registration lacks a __initconst
annotation or the annotation of (unknown) is wrong.

---
 arch/arm/mach-tegra/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 5 lines
Quoted 2 lines

I'm not seeing these. Do I need to enable any special options to trigger these? Or are these just so new that I haven't run into them yet?

My guess would be that this is a result of the CONFIG_NO_AUTO_INLINE option that is now available in linux-next.

Okay, that would explain. It's not set in my configurations currently.

Do you want to apply this to ARM-SoC directly with my Acked-by, or should I queue it up for v4.22?

Thierry

#5 lore raw

Re: [PATCH 2/4] ARM: tegra: avoid section mismatch warning

Quoted 19 lines · Thierry Reding
Quoted 18 lines · Arnd Bergmann
Quoted 15 lines · Thierry Reding
Quoted 10 lines · Arnd Bergmann

WARNING: vmlinux.o(.text+0x39ecc): Section mismatch in reference from the function tegra114_gic_cpu_pm_registration() to the (unknown reference) .init.rodata:(unknown) The function tegra114_gic_cpu_pm_registration() references
the (unknown reference) __initconst (unknown).
This is often because tegra114_gic_cpu_pm_registration lacks a __initconst
annotation or the annotation of (unknown) is wrong.

---
 arch/arm/mach-tegra/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I'm not seeing these. Do I need to enable any special options to trigger these? Or are these just so new that I haven't run into them yet?

Quoted 7 lines
Quoted 2 lines

My guess would be that this is a result of the CONFIG_NO_AUTO_INLINE option that is now available in linux-next.

Okay, that would explain. It's not set in my configurations currently.

Do you want to apply this to ARM-SoC directly with my Acked-by, or should I queue it up for v4.22?

I'm picking up a few others of these, so I'll include it in that batch.

Applied to arm-soc next/soc.

Thanks!

-Olof

#6 lore raw

PATCH 3/4 ARM: ks8695: fix section mismatch warning

In reply to Arnd Bergmann

WARNING: vmlinux.o(.text+0x13250): Section mismatch in reference from the function acs5k_i2c_init() to the (unknown reference) .init.data:(unknown) The function acs5k_i2c_init() references
the (unknown reference) __initdata (unknown).
This is often because acs5k_i2c_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.

---
 arch/arm/mach-ks8695/board-acs5k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-ks8695/board-acs5k.c +1 -1
index ef835d82cdb9..5783062224c3 100644
@@ -100,7 +100,7 @@ static struct i2c_board_info acs5k_i2c_devs[] __initdata = {
 	},
 };
 
-static void acs5k_i2c_init(void)
+static void __init acs5k_i2c_init(void)
 {
 	/* The gpio interface */
 	gpiod_add_lookup_table(&acs5k_i2c_gpiod_table);
Signature · 1 line
2.20.0
#7 lore raw

Re: [PATCH 3/4] ARM: ks8695: fix section mismatch warning

Quoted 7 lines · Arnd Bergmann

WARNING: vmlinux.o(.text+0x13250): Section mismatch in reference from the function acs5k_i2c_init() to the (unknown reference) .init.data:(unknown) The function acs5k_i2c_init() references
the (unknown reference) __initdata (unknown).
This is often because acs5k_i2c_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.

Applied to next/soc in arm-soc now.

-Olof

#8 lore raw

PATCH 4/4 ARM: pxa: avoid section mismatch warning

In reply to Arnd Bergmann

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

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

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

---
 arch/arm/mach-pxa/cm-x300.c   | 2 +-
 arch/arm/mach-pxa/littleton.c | 2 +-
 arch/arm/mach-pxa/zeus.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-pxa/cm-x300.c +1 -1
index 109fab292f94..b76b566280fa 100644
@@ -564,7 +564,7 @@ static struct pxa3xx_u2d_platform_data cm_x300_u2d_platform_data = {
 	.exit		= cm_x300_u2d_exit,
 };
 
-static void cm_x300_init_u2d(void)
+static void __init cm_x300_init_u2d(void)
 {
 	pxa3xx_set_u2d_info(&cm_x300_u2d_platform_data);
 }
arch/arm/mach-pxa/littleton.c +1 -1
index 8e0b60a33026..39db4898dc4a 100644
@@ -182,7 +182,7 @@ static struct pxafb_mach_info littleton_lcd_info = {
 	.lcd_conn		= LCD_COLOR_TFT_16BPP,
 };
 
-static void littleton_init_lcd(void)
+static void __init littleton_init_lcd(void)
 {
 	pxa_set_fb_info(NULL, &littleton_lcd_info);
 }
arch/arm/mach-pxa/zeus.c +1 -1
index 897ef59fbe0c..c411f79d4cb5 100644
@@ -576,7 +576,7 @@ static struct pxaohci_platform_data zeus_ohci_platform_data = {
 	.flags		= ENABLE_PORT_ALL | POWER_SENSE_LOW,
 };
 
-static void zeus_register_ohci(void)
+static void __init zeus_register_ohci(void)
 {
 	/* Port 2 is shared between host and client interface. */
 	UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
Signature · 7 lines
2.20.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#9 lore raw

Re: [PATCH 4/4] ARM: pxa: avoid section mismatch warning

Quoted 13 lines · Arnd Bergmann

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

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

Quoted 7 lines

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

I have queued a bunch of pxa changes via my mmc tree for gpio descriptor conversions, by Linus Walleij.

Are those causing this problem? Should I queue this one via mmc tree as well?

Kind regards
Uffe

Quoted 48 lines
---
 arch/arm/mach-pxa/cm-x300.c   | 2 +-
 arch/arm/mach-pxa/littleton.c | 2 +-
 arch/arm/mach-pxa/zeus.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-pxa/cm-x300.c +1 -1
index 109fab292f94..b76b566280fa 100644
@@ -564,7 +564,7 @@ static struct pxa3xx_u2d_platform_data cm_x300_u2d_platform_data = {
        .exit           = cm_x300_u2d_exit,
 };
 
-static void cm_x300_init_u2d(void)
+static void __init cm_x300_init_u2d(void)
 {
        pxa3xx_set_u2d_info(&cm_x300_u2d_platform_data);
 }
arch/arm/mach-pxa/littleton.c +1 -1
index 8e0b60a33026..39db4898dc4a 100644
@@ -182,7 +182,7 @@ static struct pxafb_mach_info littleton_lcd_info = {
        .lcd_conn               = LCD_COLOR_TFT_16BPP,
 };
 
-static void littleton_init_lcd(void)
+static void __init littleton_init_lcd(void)
 {
        pxa_set_fb_info(NULL, &littleton_lcd_info);
 }
arch/arm/mach-pxa/zeus.c +1 -2
index 897ef59fbe0c..c411f79d4cb5 100644
@@ -576,7 +576,7 @@ static struct pxaohci_platform_data zeus_ohci_platform_data = {
        .flags          = ENABLE_PORT_ALL | POWER_SENSE_LOW,
 };
 
-static void zeus_register_ohci(void)
+static void __init zeus_register_ohci(void)
 {
        /* Port 2 is shared between host and client interface. */
        UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
--

2.20.0

#10 lore raw

Re: [PATCH 4/4] ARM: pxa: avoid section mismatch warning

Quoted 21 lines · Ulf Hansson
Quoted 19 lines · Arnd Bergmann

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

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

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

Quoted 6 lines
Quoted 1 line

I have queued a bunch of pxa changes via my mmc tree for gpio descriptor conversions, by Linus Walleij.

Are those causing this problem? Should I queue this one via mmc tree as well?

Sorry for the lack of description in the changelog. I'm fairly sure that these are old bugs that only appeared now if you build with CONFIG_NO_AUTO_INLINE, we should take these through arm-soc, and I should probably add an explanation.

Arnd

#11 lore raw

Re: [PATCH 4/4] ARM: pxa: avoid section mismatch warning

In reply to Ulf Hansson
Quoted 20 lines · Ulf Hansson
Quoted 19 lines · Arnd Bergmann

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

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

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

Quoted 6 lines
Quoted 1 line

I have queued a bunch of pxa changes via my mmc tree for gpio descriptor conversions, by Linus Walleij.

Are those causing this problem? Should I queue this one via mmc tree as well?

Nopes just correlation without causation...

I also made a bunch of patches to PXA through the regulator tree, those are not related either.

It *seems* they touch so different code lines that it shouldn't be a problem to merge orthogonally in ARM SoC.

Yours,
Linus Walleij

#12 lore raw

Re: [PATCH 4/4] ARM: pxa: avoid section mismatch warning

In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

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

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

Quoted 7 lines

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

Applied to next/soc.

-Olof

maintainer Acked-by on v1 1/4
#13 lore raw
In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

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

#14 lore raw
Quoted 8 lines · Tony Lindgren
Quoted 5 lines · Arnd Bergmann

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

Applied, thanks!

-Olof

Acked-by on v1 1/4
#15 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

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

---

maintainer Reviewed-by on v1 1/4
#16 lore raw
In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann

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