Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4301642pxu; Mon, 21 Dec 2020 09:02:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJz22d+yJxVIw7CgG5bN6Tk46nfGEJkjp23DrhofBWwWOW7v2qg++Vv3nn+gq0k9eqwWxekF X-Received: by 2002:a17:906:168f:: with SMTP id s15mr15843760ejd.180.1608570122616; Mon, 21 Dec 2020 09:02:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608570122; cv=none; d=google.com; s=arc-20160816; b=bGLYNOMzf2uPc9z6aA+DqOf3ScKL8jTqL6iF83AYtqWATXwJonbqjcG1pRkC7u3ldY ZXUv2wYhX1Awtu5T+/lQsXBtbAkNWofB9geGmhuEQ3JTWIbYrdVz6y5DKI/8ktage9BE Tr//JKUGMYx5iE6/FdQGthqwQ77XXu+UoZrAaQYRZbIw1QLFwTbiE4V2GMAodCy0bA5o pLJAANyITg5i6a2sWDgEd+rkorqbmsklxxhpHTe+HIYF2PzGNsFsEmTtQnusOZkkREuU 9iOUwOdB7EwjPROQWux/b9bsSUyiESg2CyoIuwBsE+HZ+TEofKeeUr31dxL25213OKsR ZhEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=OElebWca9N7m4BDgE9t7uOWNnRgRMvhpGJ+P30rjQ5c=; b=xHPSUtIaqYdShEhmY/KtJXPLwwwPdhjU7W76aGh/Q2J5nM305xwezPFKzAvsjHbKL6 3mqpSu70MJ4IjHzxMjhQ+MBqQ4+O24MnecwcuQvCPz3mtssYVOjUe5L2D2Sywhg0U5fF xzW87XuNwjW/k8j1cLcMV7ZNthw9LhWqgqixNZusNgfa4Sanqg+erzoxrF04l5VE+TBF YRhcrYkI5MEg8fyDSOPfoWMherRnGLMJUQZDxVaT5j/JI2w32yBTyNh6kzGHvNHkwvvz dxJj/5kjNVRGuWRWDKL7hLGyjxilUhparOfzdJww4cviAHBxeV/csu7zgZMl54kV0Q6n 7J5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si10669682edp.251.2020.12.21.09.01.39; Mon, 21 Dec 2020 09:02:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbgLUQ75 (ORCPT + 99 others); Mon, 21 Dec 2020 11:59:57 -0500 Received: from mga02.intel.com ([134.134.136.20]:23397 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726605AbgLUQ74 (ORCPT ); Mon, 21 Dec 2020 11:59:56 -0500 IronPort-SDR: Y49g7h4xJ/w4cB6ObWDOO2D4rULBuj/B/ytOLPeLw23bzV9lfl2WSz0CRUETjNjGxny7Bp04y8 aXeBIUGWjp6g== X-IronPort-AV: E=McAfee;i="6000,8403,9842"; a="162806858" X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="162806858" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 08:58:01 -0800 IronPort-SDR: TgzFwth1ugwhydGxdNVTmwehM+7Wj70wucCG+sssDT/DHxQfj7OIrKygbqf5rHepbHZmR0TRp4 v372rRbU1ikw== X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="355748092" Received: from haberchr-mobl.amr.corp.intel.com ([10.212.196.73]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 08:57:55 -0800 Message-ID: Subject: Re: [PATCH 1/2] thermal: int340x: Add critical callback to override default shutdown behavior From: Srinivas Pandruvada To: Daniel Lezcano , Kai-Heng Feng Cc: "Zhang, Rui" , amitk@kernel.org, Andrzej Pietrasiewicz , Matthew Garrett , Bartlomiej Zolnierkiewicz , Peter Kaestle , Gayatri Kammela , Akinobu Mita , Andy Shevchenko , Andrew Morton , "open list:THERMAL" , open list Date: Mon, 21 Dec 2020 08:57:51 -0800 In-Reply-To: <9e4dc22e-e912-8410-945c-f802f3959028@linaro.org> References: <20201221135206.17671-1-kai.heng.feng@canonical.com> <20e74dc1-1f1d-6dee-19a7-e9a975b66606@linaro.org> <9e4dc22e-e912-8410-945c-f802f3959028@linaro.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2 (3.38.2-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-12-21 at 17:03 +0100, Daniel Lezcano wrote: > On 21/12/2020 16:00, Kai-Heng Feng wrote: > > On Mon, Dec 21, 2020 at 9:59 PM Daniel Lezcano > > wrote: > > > > > > On 21/12/2020 14:52, Kai-Heng Feng wrote: > > > > We are seeing thermal shutdown on Intel based mobile > > > > workstations, the > > > > shutdown happens during the first trip handle in > > > > thermal_zone_device_register(): > > > > kernel: thermal thermal_zone15: critical temperature reached > > > > (101 C), shutting down > > > > > > > > However, we shouldn't do a thermal shutdown here, since > > > > 1) We may want to use a dedicated daemon, Intel's thermald in > > > > this case, > > > > to handle thermal shutdown. > > > > > > > > 2) For ACPI based system, _CRT doesn't mean shutdown unless > > > > it's inside > > > > ThermalZone namespace. ACPI Spec, 11.4.4 _CRT (Critical > > > > Temperature): > > > > "... If this object it present under a device, the device’s > > > > driver > > > > evaluates this object to determine the device’s critical > > > > cooling > > > > temperature trip point. This value may then be used by the > > > > device’s > > > > driver to program an internal device temperature sensor trip > > > > point." > > > > > > > > So a "critical trip" here merely means we should take a more > > > > aggressive > > > > cooling method. > > > > > > > > As int340x device isn't present under ACPI ThermalZone, > > > > override the > > > > default .critical callback to prevent surprising thermal > > > > shutdown. > > > > > > > > Signed-off-by: Kai-Heng Feng > > > > > > I'll submit those changes for v5.11-rc1 and change the subject > > > by: > > > > > > thermal: int340x: Fix unexpected shutdown at critical temperature > > > thermal: pch: Fix unexpected shutdown at critical temperature > > > > > > Sounds good ? > > > > Sounds good to me. Thanks! > > > > Kai-Heng > > Rui, Srinivas? Are you ok with the changes ? I have minor comment in one of the patch. But that is harmless. So changes are fine. Thanks, Srinivas > >