All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: LKML <linux-kernel@vger.kernel.org>, akpm <akpm@linux-foundation.org>
Subject: Re: Help needed to fix section mismatch warnings
Date: Sat, 19 Jan 2008 11:52:55 -0800	[thread overview]
Message-ID: <20080119115255.d114065f.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20080106140728.GA3504@uranus.ravnborg.org>

On Sun, 6 Jan 2008 15:07:28 +0100 Sam Ravnborg wrote:

> kbuild emit section mismatch warnings when it detects that someone does a
> call from a non-init section to a init section.
> The rationale here is that the init section are discarded at runtime and
> if this call happens after the init section has gone we have an oops.
> 
> This check is planned to be turned into an error soon but we still
> see a bit too many warnings.
> 
> To see the list below build a kernel like this:
> 
> make allyesconfig
> Set CONFIG_HOTPLUG to n
> (In General Setup | Configure standard kernel features | Support for hot-plugable devices)
> 
> Then build the kernel like this:
> make KCFLAGS=-fno-unit-at-a-time
> 
> The flag "-fno-unit-at-a-time" tell gcc to avoid additional inlining which
> otherwise would hide several section mismatch warnings.
> 
> With latest kernel I got 113 warnings and most should fixable.
> Try to look at how other section mismatch warnings has been fixed for inspiration.
> 
> Patches can be cc:ed to me but always send it to the maintainer and lkml.
> 
> 	Sam
> 
> This is the current list of warnings
> 
> WARNING: vmlinux.o(.text+0x1ffd0): Section mismatch: reference to .init.text:register_cpu (between 'arch_register_cpu' and 'arch_unregister_cpu')

> WARNING: vmlinux.o(.text+0x21a39): Section mismatch: reference to .init.text:absent_pages_in_range (between 'reserve_hotadd' and 'unparse_node')
> WARNING: vmlinux.o(.text+0x21ae9): Section mismatch: reference to .init.data: (between 'unparse_node' and 'null_slit_node_compare')

> WARNING: vmlinux.o(.text+0x38b43): Section mismatch: reference to .init.text:idle_regs (between 'fork_idle' and 'fork_traceflag')

Above 4 seem to be mostly fixed in -mm.  I made patches for them
and then checked -mm, so I won't post the patches...


> WARNING: vmlinux.o(.text+0x43524): Section mismatch: reference to .init.text: (between 'timer_cpu_notify' and 'msleep')
> WARNING: vmlinux.o(.text+0x4c6f6): Section mismatch: reference to .init.text: (between 'rcu_cpu_notify' and 'wakeme_after_rcu')
> WARNING: vmlinux.o(.text+0x51cbe): Section mismatch: reference to .init.text: (between 'hrtimer_cpu_notify' and 'down_read_trylock')

I'll post patches for the 3 above.  However, the rcu code in -mm
is quite different, so the rcu patch may have a short life.

---
~Randy

  parent reply	other threads:[~2008-01-19 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06 14:07 Help needed to fix section mismatch warnings Sam Ravnborg
2008-01-10  6:25 ` Randy Dunlap
2008-01-10 19:19   ` Randy Dunlap
2008-01-11 18:59     ` Sam Ravnborg
2008-01-10 19:38   ` Sam Ravnborg
2008-01-19 19:52 ` Randy Dunlap [this message]
2008-01-19 21:22   ` Sam Ravnborg
2008-01-19 21:45     ` Sam Ravnborg

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=20080119115255.d114065f.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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.