x86: avoid section mismatch involving arch_register_cpu
authorAlexander van Heukelum <heukelum@mailshack.com>
Fri, 1 Feb 2008 16:49:43 +0000 (17:49 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 1 Feb 2008 16:49:43 +0000 (17:49 +0100)
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 <heukelum@fastmail.fm>
CC: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

index 78cbb655aa79d1201954a18c542ec9ce85596c5d..e6757aaa202bda9c7dfc1992d3e148fa55541f45 100644 (file)
@@ -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)
index 85ece5f10e9ee9b69807e32091114cedb32298fc..73f2ea84fd74b024fa4ebc8e91cabcdab4340108 100644 (file)
@@ -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);