public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: swarren@wwwdotorg•org (Stephen Warren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init
Date: Mon, 23 Jul 2012 14:09:30 -0600	[thread overview]
Message-ID: <500DAF7A.3000302@wwwdotorg.org> (raw)
In-Reply-To: <20120718150130.GV9437@tbergstrom-lnx.Nvidia.com>

On 07/18/2012 09:01 AM, Peter De Schrijver wrote:
> On Mon, Jun 18, 2012 at 11:01:50PM +0200, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia•com>
>>
>> This solves a section mismatch warning. I hadn't noticed this before,
>> because my compiler was inlining tegra_cpu_reset_handler_enable() inside
>> tegra_cpu_reset_handler_init(), which is already __init, but I switched
>> compilers and it stopped doing that.
> 
> Why does this generate a section mismatch warning? I see why calling a
> a __init marked function from a non __init marked function is a problem, but
> the opposite should be ok no?

The issue is that tegra_cpu_reset_handler_enable() itself (which was not
__init but the patch made to be __init) was referencing variable
__tegra_cpu_reset_handler_{start,end}. This wasn't noticed before
because when tegra_cpu_reset_handler_enable() was inlined into
tegra_cpu_reset_handler_init(), tegra_cpu_reset_handler_enable() was
effectively __init. However, when built as a separate function, you
ended up with a non-__init function referencing other things that were
__init.

In other words, this is indeed nothing to do with __init function
tegra_cpu_reset_handler_init() calling non-__init function
tegra_cpu_reset_handler_enable().

You can get the details by reverting the patch and building:-)

  reply	other threads:[~2012-07-23 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 21:01 [PATCH] ARM: tegra: make tegra_cpu_reset_handler_enable() __init Stephen Warren
2012-06-18 23:44 ` Olof Johansson
2012-07-18 15:01 ` Peter De Schrijver
2012-07-23 20:09   ` Stephen Warren [this message]
2012-07-24  9:06     ` Peter De Schrijver

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=500DAF7A.3000302@wwwdotorg.org \
    --to=swarren@wwwdotorg$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox