From: Rufus & Azrael <rufus-azrael@numericable.fr>
To: Linux-kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re:[PATCH] x86: silence section mismatch warning - uv_cpu_init
Date: Wed, 20 Aug 2008 22:11:49 +0200 [thread overview]
Message-ID: <48AC7A85.40803@numericable.fr> (raw)
>
> WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
> The function __cpuinit uv_cpu_init() references
> a function __init uv_system_init().
> If uv_system_init is only used by uv_cpu_init then
> annotate uv_system_init with a matching annotation.
>
> uv_system_init was ment to be called only once, so make explicit
> by creating properly-named function and annotate it as __ref.
>
> Old code relied on uv_node_to_blade being initialized to 0,
> but it'a not initialized from anywhere and it's not static either.
>
> Signed-off-by: Marcin Slusarz<marcin.slusarz@gmail.com>
> Cc: Ingo Molnar<mingo@elte.hu>
> Cc: Jack Steiner<steiner@sgi.com>
> ---
> arch/x86/kernel/genx2apic_uv_x.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
> diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
> index 2d7e307..ecbfefa 100644
> --- a/arch/x86/kernel/genx2apic_uv_x.c
> +++ b/arch/x86/kernel/genx2apic_uv_x.c
> @@ -385,14 +385,24 @@ static __init void uv_system_init(void)
> map_mmioh_high(max_pnode);
> }
>
> +/* Wrapper for uv_system_init which calls it only once. */
> +static void __ref uv_system_init_once(void)
> +{
> + static bool uv_system_inited = false;
> +
> + if (!uv_system_inited) {
> + uv_system_init();
> + uv_system_inited = true;
> + }
> +}
> +
> /*
> * Called on each cpu to initialize the per_cpu UV data area.
> * ZZZ hotplug not supported yet
> */
> void __cpuinit uv_cpu_init(void)
> {
> - if (!uv_node_to_blade)
> - uv_system_init();
> + uv_system_init_once();
>
> uv_blade_info[uv_numa_blade_id()].nr_online_cpus++;
>
> --
> 1.5.4.5
>
>
Hi Marcin,
Your patch works fine on my box and section mismatch desappears.
Thanks.
Regards.
P.S. : 3 section mimsatches are remaining unsolved at this time on my
config :
WARNING: vmlinux.o(.meminit.text+0x2f2): Section mismatch in reference
from the function alloc_low_page() to the function
.init.text:early_ioremap()
The function __meminit alloc_low_page() references
a function __init early_ioremap().
If early_ioremap is only used by alloc_low_page then
annotate early_ioremap with a matching annotation.
WARNING: vmlinux.o(.meminit.text+0x608): Section mismatch in reference
from the function phys_pmd_init() to the function .init.text:early_iounmap()
The function __meminit phys_pmd_init() references
a function __init early_iounmap().
If early_iounmap is only used by phys_pmd_init then
annotate early_iounmap with a matching annotation.
WARNING: vmlinux.o(.meminit.text+0x861): Section mismatch in reference
from the function phys_pud_init() to the function .init.text:early_iounmap()
The function __meminit phys_pud_init() references
a function __init early_iounmap().
If early_iounmap is only used by phys_pud_init then
annotate early_iounmap with a matching annotation.
reply other threads:[~2008-08-20 20:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48AC7A85.40803@numericable.fr \
--to=rufus-azrael@numericable.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=mingo@elte.hu \
/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