提交 1e35669d 编写于 作者: S Sam Ravnborg 提交者: Ingo Molnar

x86: fix section mismatch warning in mcheck/mce_64.c

Fix following warning:
WARNING: arch/x86/kernel/cpu/mcheck/built-in.o(.text+0x752): Section mismatch: reference to .cpuinit.text:mce_create_device in 'mce_cpu_callback'

mce_cpu_callback() is only used by mce_cpu_notofier.
The notifier is only used for hotplugable cpu's as it is
registered using register_hotcpu_notifier(),

Annotate them both __cpuinit to fix the warning.
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 ff472a11
...@@ -854,8 +854,8 @@ static void mce_remove_device(unsigned int cpu) ...@@ -854,8 +854,8 @@ static void mce_remove_device(unsigned int cpu)
} }
/* Get notified when a cpu comes on/off. Be hotplug friendly. */ /* Get notified when a cpu comes on/off. Be hotplug friendly. */
static int static int __cpuinit mce_cpu_callback(struct notifier_block *nfb,
mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) unsigned long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
...@@ -872,7 +872,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) ...@@ -872,7 +872,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block mce_cpu_notifier = { static struct notifier_block mce_cpu_notifier __cpuinitdata = {
.notifier_call = mce_cpu_callback, .notifier_call = mce_cpu_callback,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册