Skip to contentSkip to conversation

x86, mce: add __cpuinit to hotplug callback functions

PATCH In review Hidetoshi Seto 1 participant 2 messages Nov 26, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, mce: add __cpuinit to hotplug callback functions

The mce_disable_cpu() and mce_reenable_cpu() are called only from mce_cpu_callback() which is marked as __cpuinit.
So these functions can be __cpuinit too.

---
 arch/x86/kernel/cpu/mcheck/mce.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mcheck/mce.c +3 -2
index 8627976..ea8ca56 100644
@@ -1953,13 +1953,14 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
 }
 
 /* Make sure there are no machine checks on offlined CPUs. */
-static void mce_disable_cpu(void *h)
+static void __cpuinit mce_disable_cpu(void *h)
 {
 	unsigned long action = *(unsigned long *)h;
 	int i;
 
 	if (!mce_available(&current_cpu_data))
 		return;
+
 	if (!(action & CPU_TASKS_FROZEN))
 		cmci_clear();
 	for (i = 0; i < banks; i++) {
@@ -1970,7 +1971,7 @@ static void mce_disable_cpu(void *h)
 	}
 }
 
-static void mce_reenable_cpu(void *h)
+static void __cpuinit mce_reenable_cpu(void *h)
 {
 	unsigned long action = *(unsigned long *)h;
 	int i;
Signature · 1 line
1.6.5.3
#1 lore raw

[tip:perf/mce] x86, mce: Add __cpuinit to hotplug callback functions

Commit-ID:  767df1bdd8cbff2c8c40c9ac8295bbdaa5fb24c4
Gitweb:     http://git.kernel.org/tip/767df1bdd8cbff2c8c40c9ac8295bbdaa5fb24c4
Author:     Hidetoshi Seto <[email protected]>
AuthorDate: Thu, 26 Nov 2009 17:29:02 +0900
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 26 Nov 2009 10:29:41 +0100

x86, mce: Add __cpuinit to hotplug callback functions

The mce_disable_cpu() and mce_reenable_cpu() are called only from mce_cpu_callback() which is marked as __cpuinit. So these functions can be __cpuinit too.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpu/mcheck/mce.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mcheck/mce.c +3 -2
index 5f277ca..0bcaa38 100644
@@ -1953,13 +1953,14 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
 }
 
 /* Make sure there are no machine checks on offlined CPUs. */
-static void mce_disable_cpu(void *h)
+static void __cpuinit mce_disable_cpu(void *h)
 {
 	unsigned long action = *(unsigned long *)h;
 	int i;
 
 	if (!mce_available(&current_cpu_data))
 		return;
+
 	if (!(action & CPU_TASKS_FROZEN))
 		cmci_clear();
 	for (i = 0; i < banks; i++) {
@@ -1970,7 +1971,7 @@ static void mce_disable_cpu(void *h)
 	}
 }
 
-static void mce_reenable_cpu(void *h)
+static void __cpuinit mce_reenable_cpu(void *h)
 {
 	unsigned long action = *(unsigned long *)h;
 	int i;