Skip to content

Commit

Permalink
x86, mce: Add __cpuinit to hotplug callback functions
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <4B0E3C4E.4090809@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Hidetoshi Seto authored and Ingo Molnar committed Nov 26, 2009
1 parent 0444c9b commit 767df1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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;
Expand Down

0 comments on commit 767df1b

Please sign in to comment.