public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: tglx@linutronix.de, mingo@elte.hu, hpa@zytor.com
Cc: macro@linux-mips.org, yinghai@kernel.org,
	linux-kernel@vger.kernel.org,
	Cyrill Gorcunov <gorcunov@openvz.org>
Subject: [patch 1/2] x86,mcheck: Thermal monitoring depends on APIC being enabled
Date: Tue, 08 Dec 2009 18:53:17 +0300	[thread overview]
Message-ID: <20091208155557.148499355@openvz.org> (raw)
In-Reply-To: 20091208155316.561853924@openvz.org

[-- Attachment #1: x86-thermal-mon --]
[-- Type: text/plain, Size: 1466 bytes --]

Add check if APIC is not disabled since thermal
monitoring depends on it. As only apic gets disabled
we should not try to install "thermal monitor" vector,
print out that thermal monitoring is enabled and etc...

Note that "Intel Correct Machine Check Interrupts" already
has such a check as well.

Also I decided to not add cpu_has_apic check into mcheck_intel_therm_init
since even if it'll call apic_read on disabled apic -- it's safe
here and allow us to save a few code bytes.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---

Please review. This should close a number of WARNs triggered
by intel_init_thermal when apic gets disabled state.

 arch/x86/kernel/cpu/mcheck/therm_throt.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.git/arch/x86/kernel/cpu/mcheck/therm_throt.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ linux-2.6.git/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -274,8 +274,9 @@ void intel_init_thermal(struct cpuinfo_x
 	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 APIC, ACPI and clock modulation */
+	if (!cpu_has_apic || !cpu_has(c, X86_FEATURE_ACPI) ||
+		!cpu_has(c, X86_FEATURE_ACC))
 		return;
 
 	/*


  reply	other threads:[~2009-12-08 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 15:53 [patch 0/2] apic snipptes on latest -tip/master Cyrill Gorcunov
2009-12-08 15:53 ` Cyrill Gorcunov [this message]
2009-12-09 14:56   ` [patch 1/2] x86,mcheck: Thermal monitoring depends on APIC being enabled Cyrill Gorcunov
2009-12-08 15:53 ` [patch 2/2] x86,apic: Use logical OR in noop-write operation Cyrill Gorcunov
2009-12-08 20:10   ` H. Peter Anvin
2009-12-08 20:26     ` Cyrill Gorcunov
2009-12-08 20:48   ` Cyrill Gorcunov
2009-12-09 15:50     ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091208155557.148499355@openvz.org \
    --to=gorcunov@openvz.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox