All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Frank van Maarseveen <frankvm@frankvm.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@kernel.org
Subject: [2.6 patch] arch/i386/kernel/cpu/intel_cacheinfo.c: fix section mismatch
Date: Tue, 10 Jul 2007 02:10:34 +0200	[thread overview]
Message-ID: <20070710001034.GN3492@stusta.de> (raw)
In-Reply-To: <20070709184200.GA2496@janus>

On Mon, Jul 09, 2007 at 08:42:01PM +0200, Frank van Maarseveen wrote:
>...
> WARNING: arch/i386/kernel/built-in.o(.exit.text+0x1c): Section mismatch: reference to .init.text: (between 'cache_remove_dev' and 'ffh_cstate_exit')
>...

Below is the fix in -mm for this bug.

> Frank

cu
Adrian


<--  snip  -->


From: Sam Ravnborg <sam@ravnborg.org>

Fix following warning:
WARNING: arch/i386/kernel/built-in.o(.init.text+0x3818): Section mismatch: reference to .exit.text:cache_remove_dev (between 'cacheinfo_cpu_callback' and 'cache_sysfs_init')

It points out that a function marked __cpuexit is calling a function marked
__cpuinit => oops.

The call happens only in an error-condition which may explain why we have
not seen it before.

The offending function was not used anywhere else - so marked it __cpuexit.

Note: This warning triggers only with a local copy of modpost
      but that version will soon be pushed out.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

@stable:
Real bug present with gcc < 4.0 that should be fixed.

 arch/i386/kernel/cpu/intel_cacheinfo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/kernel/cpu/intel_cacheinfo.c~i386-fix-section-mismatch-warning-in-intel_cacheinfo arch/i386/kernel/cpu/intel_cacheinfo.c
--- a/arch/i386/kernel/cpu/intel_cacheinfo.c~i386-fix-section-mismatch-warning-in-intel_cacheinfo
+++ a/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -746,7 +746,7 @@ static int __cpuinit cache_add_dev(struc
 	return retval;
 }
 
-static void __cpuexit cache_remove_dev(struct sys_device * sys_dev)
+static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
 {
 	unsigned int cpu = sys_dev->id;
 	unsigned long i;
_

  parent reply	other threads:[~2007-07-10  0:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-09 18:42 2.6.22: section mismatch warnings Frank van Maarseveen
2007-07-09 19:45 ` Adrian Bunk
2007-07-09 19:48   ` Frank van Maarseveen
2007-07-10  0:05     ` [2.6 patch] arch/i386/kernel/smpboot.c:setup_trampoline() must be __cpuinit Adrian Bunk
2007-10-15 15:02       ` Frank van Maarseveen
2007-07-10  0:10 ` Adrian Bunk [this message]
2007-07-10  0:14 ` 2.6.22: section mismatch warnings Adrian Bunk
2007-07-10  8:34   ` Frank van Maarseveen

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=20070710001034.GN3492@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@linux-foundation.org \
    --cc=frankvm@frankvm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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.