All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux-arm-kernel@lists.arm.linux.org.uk,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: ARM: Section mismatch warnings
Date: Mon, 28 May 2007 20:36:29 +0200	[thread overview]
Message-ID: <20070528183629.GA30821@uranus.ravnborg.org> (raw)
In-Reply-To: <20070528170430.GB5737@flint.arm.linux.org.uk>

> 
> > o-arm-neponset/log.out:WARNING: arch/arm/mach-sa1100/built-in.o(.text+0x1748):
>  Section mismatch: reference to .init.text:sa1110_mb_disable
>  (between 'neponset_init' and 'neponset_resume')
> 
> This one looks quite bogus.  sa1110_mb_disable() is marked __init, and
> it's called from neponset_init() which is also marked __init.

Created a neponset.i file - output:

static int neponset_init(void)
{
 platform_driver_register(&neponset_device_driver);

So we loose the __init marker during preprocessing.
Which is due the the buggy part of my path that adds __devinit.

There was a reason I noted the devinit markers should be reviewed carefully -
this one seems wrong.


> 
> > o-arm-neponset/log.out:WARNING: arch/arm/mach-sa1100/built-in.o(.text+0x17ac):
>  Section mismatch: reference to .init.data:devices
>  (between 'neponset_init' and 'neponset_resume')
> 
> No reference to 'devices' (marked __initdata) in neponset_resume but there
> is in neponset_init(), which is the only reference to it, and it is marked
> __init.  Another false positive?
It is between the symbols so the rference will never be in the latter function.
In this case it is due to my wrong __devinit marking (again).

> 
> > o-arm-s3c2410/log.out:WARNING: arch/arm/mach-s3c2410/built-in.o(.text+0x80):
>  Section mismatch: reference to .init.data:s3c2410_dma_order
>  (between 's3c2410_dma_add' and 's3c2410_pm_add')
> 
> Don't know enough about s3c stuff, but this one looks like a false positive
> as well - it's registering a sysdev driver at boot time, and the class
> and sysdev is only ever also registered at boot time and never unregistered.
> Adding __init to s3c2410_dma_add would probably be the right thing to do
> but will move the problem to be a reference to s3c2410_dma_add from
> s3c2410_dma_driver instead.
> 
> Once that's done, might need an annotation of some sort?  Not sure.
modpost allows references to .init.text from variables named *_driver - so that
would work out.
And it is not a 'false positive' in the sense that there is indeed a
reference from a .text section to a .init.text section - so the calling
function ougth to be marked __init.


So conclusion is that most of these were caused by a wrong marking from my side.
But at least I had requested special attention to that part in my patch
submission because I knew I was not sure.

I did not see any wrong-doings by modpost.

	Sam

  parent reply	other threads:[~2007-05-28 18:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-28 16:32 ARM: Section mismatch warnings Sam Ravnborg
2007-05-28 16:44 ` [PATCH] arm: fix section " Sam Ravnborg
2007-05-28 17:09   ` Russell King
2007-05-28 18:38     ` Sam Ravnborg
2007-05-28 17:04 ` ARM: Section " Russell King
2007-05-28 17:56   ` Andrew Victor
2007-05-28 18:36   ` Sam Ravnborg [this message]
2007-05-28 19:25     ` Russell King
2007-05-28 19:58       ` Sam Ravnborg
2007-05-28 20:25         ` Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070528183629.GA30821@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.