LKML Archive on
help / color / mirror / Atom feed
From: Alexander van Heukelum <>
Cc: Sam Ravnborg <>,
	Alexander van Heukelum <>
Subject: Avoid section mismatch involving arch_register_cpu
Date: Fri, 1 Feb 2008 15:56:50 +0100	[thread overview]
Message-ID: <> (raw)

Avoid section mismatch involving arch_register_cpu.

Marking arch_register_cpu as __init and removing the export
for non-hotplug-cpu configurations makes the following warning
go away:

Section mismatch in reference from the function 
arch_register_cpu() to the function .devinit.text:register_cpu()
The function  arch_register_cpu() references
the function __devinit register_cpu().
This is often because arch_register_cpu lacks a __devinit 
annotation or the annotation of register_cpu is wrong.

The only external user of arch_register_cpu in the tree is
in drivers/acpi/processor_core.c where it is guarded by
ACPI_HOTPLUG_CPU (which depends on HOTPLUG_CPU).

Signed-off-by: Alexander van Heukelum <>
CC: Sam Ravnborg <>

diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 78cbb65..e6757aa 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -57,11 +57,10 @@ void arch_unregister_cpu(int num)
-int arch_register_cpu(int num)
+static int __init arch_register_cpu(int num)
 	return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
 static int __init topology_init(void)
diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h
index 85ece5f..73f2ea8 100644
--- a/include/asm-x86/cpu.h
+++ b/include/asm-x86/cpu.h
@@ -10,8 +10,9 @@
 struct x86_cpu {
 	struct cpu cpu;
-extern int arch_register_cpu(int num);
+extern int arch_register_cpu(int num);
 extern void arch_unregister_cpu(int);

             reply	other threads:[~2008-02-01 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 14:56 Alexander van Heukelum [this message]
2008-02-01 15:03 ` Sam Ravnborg
2008-02-01 15:21   ` Alexander van Heukelum
2008-02-01 16:37     ` Sam Ravnborg
2008-02-01 16:44 ` Sam Ravnborg
2008-02-01 16:51   ` Ingo Molnar

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: Avoid section mismatch involving arch_register_cpu' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).