From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755457AbbJAR1j (ORCPT ); Thu, 1 Oct 2015 13:27:39 -0400 Received: from mga11.intel.com ([192.55.52.93]:31901 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058AbbJAR1i (ORCPT ); Thu, 1 Oct 2015 13:27:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,618,1437462000"; d="scan'208";a="572242426" Date: Thu, 1 Oct 2015 10:27:37 -0700 From: Andi Kleen To: Thomas Gleixner Cc: Andi Kleen , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Fix thermal throttling reporting after kexec Message-ID: <20151001172737.GC26924@tassilo.jf.intel.com> References: <1443125443-24691-1-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 01, 2015 at 02:15:54PM +0200, Thomas Gleixner wrote: > On Thu, 24 Sep 2015, Andi Kleen wrote: > > 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. > > So the obvious question is, why don't we do that. It wouldn't help if the previous kernel is some older kernel. > > > 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. > > I'm not against removing that check as it does not really add value, > but we still should clear the APIC register at shut down, right? The vector register is really harmless by itself and apart from bogus checking it's not really affecting anyone. It may make more sense to disable thermal reporting on shut down though. I can add that, although it would only be useful for the more theoretical case when you boot non Linux after kexec (as normal Linux always reenables it anyways) But the check should still be removed imho. -Andi -- ak@linux.intel.com -- Speaking for myself only