From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932422AbbJUKHK (ORCPT ); Wed, 21 Oct 2015 06:07:10 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42204 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932370AbbJUKHG (ORCPT ); Wed, 21 Oct 2015 06:07:06 -0400 Date: Wed, 21 Oct 2015 03:06:28 -0700 From: tip-bot for Andi Kleen Message-ID: Cc: linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, peterz@infradead.org, bp@suse.de, ak@linux.intel.com, torvalds@linux-foundation.org, mingo@kernel.org, tglx@linutronix.de, tony.luck@intel.com, hpa@zytor.com Reply-To: linux-edac@vger.kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, tony.luck@intel.com, tglx@linutronix.de, hpa@zytor.com, bp@suse.de, ak@linux.intel.com, torvalds@linux-foundation.org, mingo@kernel.org In-Reply-To: <1445246268-26285-9-git-send-email-bp@alien8.de> References: <1445246268-26285-9-git-send-email-bp@alien8.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:ras/core] x86/mce: Fix thermal throttling reporting after kexec Git-Commit-ID: 81ffdcdd97d94110627caa81c23d5d780083731d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 81ffdcdd97d94110627caa81c23d5d780083731d Gitweb: http://git.kernel.org/tip/81ffdcdd97d94110627caa81c23d5d780083731d Author: Andi Kleen AuthorDate: Mon, 19 Oct 2015 11:17:48 +0200 Committer: Ingo Molnar CommitDate: Wed, 21 Oct 2015 11:10:57 +0200 x86/mce: Fix thermal throttling reporting after kexec The per CPU thermal vector init code checks if the thermal vector is already installed and complains and bails out if it is. This happens after kexec, as kernel shut down does not clear the thermal vector APIC register. This causes two problems: 1. So we always do not fully initialize thermal reports after kexec. The CPU is still likely initialized, as the previous kernel should have done it. But we don't set up the software pointer to the thermal vector, so reporting may end up with a unknown thermal interrupt message. 2. Also it complains for every logical CPU, even though the value is actually derived from BP only. The problem is that we end up with one message per CPU, so on larger systems it becomes very noisy and messes up the otherwise nicely formatted CPU bootup numbers in the kernel log. Just remove the check. I checked the code and there's no valid code paths where the thermal init code for a CPU could be called multiple times. Why the kernel does not clean up this value on shutdown: The thermal monitoring is controlled per logical CPU thread. Normal shutdown code is just running on one CPU. To disable it we would need a broadcast NMI to all CPUs on shut down. That's overkill for this. So we just ignore it after kexec. Signed-off-by: Andi Kleen Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/1445246268-26285-9-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mcheck/therm_throt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 1af51b1..2c5aaf8 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -503,14 +503,6 @@ void intel_init_thermal(struct cpuinfo_x86 *c) return; } - /* Check whether a vector already exists */ - if (h & APIC_VECTOR_MASK) { - printk(KERN_DEBUG - "CPU%d: Thermal LVT vector (%#x) already installed\n", - cpu, (h & APIC_VECTOR_MASK)); - return; - } - /* early Pentium M models use different method for enabling TM2 */ if (cpu_has(c, X86_FEATURE_TM2)) { if (c->x86 == 6 && (c->x86_model == 9 || c->x86_model == 13)) {