From: Sam Ravnborg <sam@ravnborg.org>
To: Gabriel C <nix.or.die@googlemail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
J.E.J.Bottomley@HansenPartnership.com
Subject: Re: Section mismatch warnings
Date: Mon, 30 Jul 2007 20:51:24 +0200 [thread overview]
Message-ID: <20070730185124.GA29116@uranus.ravnborg.org> (raw)
In-Reply-To: <46AE2459.7080905@googlemail.com>
On Mon, Jul 30, 2007 at 07:48:09PM +0200, Gabriel C wrote:
> Hi Sam ,
>
> I get this warnings with a randconfig ( http://194.231.229.228/git-current/randconfig-auto-36 ) :
>
>
> ...
>
I only looked at the Section mismatch warnings.
They are fixed by following patch.
James - I assume you will take this forward?
Sam
[PATCH] i386/voyager: fix section mismatch warnings
> WARNING: vmlinux.o(.text+0xeaf7): Section mismatch: reference to .init.text:init_gdt (between 'voyager_smp_prepare_boot_cpu' and 'smp_vic_cmn_interrupt')
voyager_smp_prepare_boot_cpu is marked __devinit and calls init_gdt.
init_gdt is marked __cpuinit
Fix seems to make voyager_smp_prepare_boot_cpu __init since I cannot see that
function being used for HOTPLUG. Maybe HOTPLUG_CPU but not HOTPLUG.
> WARNING: vmlinux.o(.text+0x104e3): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x1050a): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10510): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10517): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x1054a): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x1055b): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10765): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10778): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x107b6): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x107c9): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x1090e): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10935): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10944): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x10951): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x109aa): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x109b4): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x109ba): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x109c1): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'twofish_enc_blk')
> WARNING: vmlinux.o(.text+0x109e4): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'twofish_enc_blk')
voyager_cat_init is used only by smp_boot_cpus that is marked __init.
So fix is to mark voyager_cat_init as __init
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c
index 26a2d4c..f5acf06 100644
--- a/arch/i386/mach-voyager/voyager_cat.c
+++ b/arch/i386/mach-voyager/voyager_cat.c
@@ -568,8 +568,7 @@ static voyager_module_t *voyager_initial_module;
* boot cpu *after* all memory initialisation has been done (so we can
* use kmalloc) but before smp initialisation, so we can probe the SMP
* configuration and pick up necessary information. */
-void
-voyager_cat_init(void)
+void __init voyager_cat_init(void)
{
voyager_module_t **modpp = &voyager_initial_module;
voyager_asic_t **asicpp;
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index b87f854..ac06a1c 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -1899,7 +1899,7 @@ voyager_smp_prepare_cpus(unsigned int max_cpus)
smp_boot_cpus();
}
-static void __devinit voyager_smp_prepare_boot_cpu(void)
+static void __init voyager_smp_prepare_boot_cpu(void)
{
init_gdt(smp_processor_id());
switch_to_new_gdt();
next prev parent reply other threads:[~2007-07-30 18:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 17:48 Section mismatch warnings Gabriel C
2007-07-30 18:51 ` Sam Ravnborg [this message]
2007-07-30 19:31 ` Gabriel C
2007-07-31 19:45 ` Gabriel C
2007-07-31 20:48 ` Sam Ravnborg
2007-07-31 21:58 ` Gabriel C
2007-08-01 1:30 ` [PATCH] Fix section mismatch warnings in sound/pci/hda/ Gabriel C
2007-08-02 14:27 ` Section mismatch warnings Gabriel C
2007-08-02 16:31 ` Sam Ravnborg
2007-08-02 17:12 ` Gabriel C
2007-08-02 17:59 ` Sam Ravnborg
2007-08-02 18:24 ` Gabriel C
-- strict thread matches above, loose matches on Subject: below --
2006-06-23 17:40 Jan Engelhardt
2006-06-23 22:12 ` Sam Ravnborg
2006-06-23 22:22 ` Al Viro
2006-06-24 21:02 ` Sam Ravnborg
2006-06-23 22:23 ` Al Viro
2006-06-26 12:37 ` Roman Zippel
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=20070730185124.GA29116@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=J.E.J.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nix.or.die@googlemail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox