Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc3ca220 authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

x86, mce: remove incorrect __cpuinit for mce_cpu_features()



Impact: Bug fix on UP

Checkin 6ec68bff:
    x86, mce: reinitialize per cpu features on resume

introduced a call to mce_cpu_features() in the resume path, in order
for the MCE machinery to get properly reinitialized after a resume.
However, this function (and its successors) was flagged __cpuinit,
which becomes __init on UP configurations (on SMP suspend/resume
requires CPU hotplug and so this would not be seen.)

Remove the offending __cpuinit annotations for mce_cpu_features() and
its successor functions.

Cc: Andi Kleen <ak@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 8cbb5bc3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -490,7 +490,7 @@ static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c)


}
}


static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
static void mce_cpu_features(struct cpuinfo_x86 *c)
{
{
	switch (c->x86_vendor) {
	switch (c->x86_vendor) {
	case X86_VENDOR_INTEL:
	case X86_VENDOR_INTEL:
+1 −1
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ static long threshold_restart_bank(void *_tr)
}
}


/* cpu init entry point, called from mce.c with preempt off */
/* cpu init entry point, called from mce.c with preempt off */
void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c)
void mce_amd_feature_init(struct cpuinfo_x86 *c)
{
{
	unsigned int bank, block;
	unsigned int bank, block;
	unsigned int cpu = smp_processor_id();
	unsigned int cpu = smp_processor_id();
+2 −2
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@ asmlinkage void smp_thermal_interrupt(void)
	irq_exit();
	irq_exit();
}
}


static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c)
static void intel_init_thermal(struct cpuinfo_x86 *c)
{
{
	u32 l, h;
	u32 l, h;
	int tm2 = 0;
	int tm2 = 0;
@@ -84,7 +84,7 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c)
	return;
	return;
}
}


void __cpuinit mce_intel_feature_init(struct cpuinfo_x86 *c)
void mce_intel_feature_init(struct cpuinfo_x86 *c)
{
{
	intel_init_thermal(c);
	intel_init_thermal(c);
}
}