The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "Simon Holm Thøgersen" <odie@cs.aau.dk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@elte.hu>, "Andi Kleen" <andi@firstfloor.org>
Subject: Re: apic: native_apic_write_dummy warning
Date: Mon, 15 Jun 2009 00:06:20 +0400	[thread overview]
Message-ID: <20090614200620.GB24604@lenovo> (raw)
In-Reply-To: <20090614194017.GA24604@lenovo>

[Cyrill Gorcunov - Sun, Jun 14, 2009 at 11:40:17PM +0400]
... 
| Neither thermal interrupts nor mce will be functional if apic
| is not properly set up (even having kernel compiled that way
| it support both). So you may try to pass "lapic" boot option
| and check if we're lucky in attempt to enable apic via force
| push. Anyway this warn show that the code is to be fixed
| (and native_apic_write_dummy done its work great catching
|  useless apic->write operation). I'll handle it but a bit later.
| 
| Andi CC'ed since he is involved in MCE handling just for the
| record.
| 
| 	-- Cyrill

Simon here is a patch I would appreciate if you test.

	-- Cyrill

---
[PATCH -tip] x86: mce intel -- don't touch THERMAL_APIC_VECTOR if no active APIC

If APIC was disabled for some reason and not even mapped
we should not try to enable thermal interrupts at all.

Reported-by: Simon Holm Thøgersen <odie@cs.aau.dk>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 arch/x86/kernel/cpu/mcheck/mce_intel.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Index: linux-2.6.git/arch/x86/kernel/cpu/mcheck/mce_intel.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ linux-2.6.git/arch/x86/kernel/cpu/mcheck/mce_intel.c
@@ -21,9 +21,15 @@ 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 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

  reply	other threads:[~2009-06-14 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-14 19:05 apic: native_apic_write_dummy warning Simon Holm Thøgersen
2009-06-14 19:22 ` Cyrill Gorcunov
2009-06-14 19:40   ` Cyrill Gorcunov
2009-06-14 20:06     ` Cyrill Gorcunov [this message]
2009-06-14 21:50       ` Simon Holm Thøgersen

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=20090614200620.GB24604@lenovo \
    --to=gorcunov@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=odie@cs.aau.dk \
    /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