Skip to content

Commit

Permalink
x86: mce: Don't touch THERMAL_APIC_VECTOR if no active APIC present
Browse files Browse the repository at this point in the history
If APIC was disabled (for some reason) and as result
it's not even mapped we should not try to enable thermal
interrupts at all.

Reported-by: Simon Holm Thøgersen <odie@cs.aau.dk>
Tested-by: Simon Holm Thøgersen <odie@cs.aau.dk>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <20090615182633.GA7606@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Jun 17, 2009
1 parent 203abd6 commit 5ce4243
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arch/x86/kernel/cpu/mcheck/mce_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
int tm2 = 0;
u32 l, h;

/* Thermal monitoring depends on ACPI and clock modulation*/
if (!cpu_has(c, X86_FEATURE_ACPI) || !cpu_has(c, X86_FEATURE_ACC))
/*
* Thermal monitoring depends on ACPI, clock modulation
* and APIC as well
*/
if (!cpu_has(c, X86_FEATURE_ACPI) || !cpu_has(c, X86_FEATURE_ACC) ||
!cpu_has(c, X86_FEATURE_APIC)) {
pr_debug("Thermal monitoring disabled\n");
return;
}

/*
* First check if its enabled already, in which case there might
Expand Down

0 comments on commit 5ce4243

Please sign in to comment.