[2/4] ARM: tegra: avoid section mismatch warning
diff mbox series

Message ID 20181210215856.2238253-2-arnd@arndb.de
State New
Headers show
Series
  • Untitled series #80946
Related show

Commit Message

Arnd Bergmann Dec. 10, 2018, 9:58 p.m. UTC
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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-tegra/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thierry Reding Dec. 11, 2018, 10:05 a.m. UTC | #1
On Mon, Dec 10, 2018 at 10:58:37PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  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:

Acked-by: Thierry Reding <treding@nvidia.com>
Arnd Bergmann Dec. 11, 2018, 10:08 a.m. UTC | #2
On Tue, Dec 11, 2018 at 11:05 AM Thierry Reding
<thierry.reding@gmail.com> wrote:
>
> On Mon, Dec 10, 2018 at 10:58:37PM +0100, Arnd Bergmann wrote:
> > 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.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  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
Thierry Reding Dec. 11, 2018, 10:28 a.m. UTC | #3
On Tue, Dec 11, 2018 at 11:08:53AM +0100, Arnd Bergmann wrote:
> On Tue, Dec 11, 2018 at 11:05 AM Thierry Reding
> <thierry.reding@gmail.com> wrote:
> >
> > On Mon, Dec 10, 2018 at 10:58:37PM +0100, Arnd Bergmann wrote:
> > > 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.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > ---
> > >  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.

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
Olof Johansson Dec. 12, 2018, 9:57 p.m. UTC | #4
On Tue, Dec 11, 2018 at 11:28:56AM +0100, Thierry Reding wrote:
> On Tue, Dec 11, 2018 at 11:08:53AM +0100, Arnd Bergmann wrote:
> > On Tue, Dec 11, 2018 at 11:05 AM Thierry Reding
> > <thierry.reding@gmail.com> wrote:
> > >
> > > On Mon, Dec 10, 2018 at 10:58:37PM +0100, Arnd Bergmann wrote:
> > > > 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.
> > > >
> > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > > ---
> > > >  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.
> 
> 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

Patch
diff mbox series

diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c
index a69b22d37eed..a186ab663b0b 100644
--- a/arch/arm/mach-tegra/irq.c
+++ b/arch/arm/mach-tegra/irq.c
@@ -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 = {