Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1370285lqb; Thu, 30 May 2024 08:17:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmDwZog4vkV3qFtaKU73100qua+isD//0M1Gtoml+e9nR1KDuM8b1SEPAJLIk2CxrCjpe2Bta5NUaCp/5KqRbdG5ZZkYV7I2lX6LUdKw== X-Google-Smtp-Source: AGHT+IHj4c3F0GyJiuSUIMz3Q2oHqGnZOH9YaLAQJTCi9K6NPutTUgUJpfYXnhQQLqbyBkbLNovD X-Received: by 2002:a17:906:3649:b0:a67:403a:4bf7 with SMTP id a640c23a62f3a-a67403a4dc6mr39237566b.26.1717082241391; Thu, 30 May 2024 08:17:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717082241; cv=pass; d=google.com; s=arc-20160816; b=BYz1qBg3qwpNjlb2xpuZvjE2j6qmLDnvoUvWoNiU3r1XiHP8OsoDdFxswByWSyk2C2 ceKQGmTMANn+gG/bu9csgbatbvsgbGyHRIGOjrM2mCr5kjRvRvn0XWMmDcGvn1uBMmuB hkOtkMrAhBnmiX4ktBz+u/qdlZjabq++7zwtPauA5uKWGt7MolrpnWrGnJuifDbKmexS SmdLtsdFc379Lwvh4gAvHIIKooPWEPoTho1ag/wksKF8xZUPpdLLkkwyfLoPT+WCklf1 9DDhbQq2ULvT9JU5/Q4vNoErWNDdIvYo0RgF4SEF+RwGrTWaiP0Yd66I7gyWzikuYiiD SWtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=M4Dv+mzxaoWNtteAKD5n+X0LY2ZxzYffRui9WKGOLBc=; fh=vq5++G484U7ZjsvKWMfE1Vr+PRX+VLRAM6bU+rNhO7w=; b=hPqF1Iko9WB2Dq3jzTzYrlJp0Y68yyT3RXowUn8z1Ec305B+SFP8vk3B1TH0oaa9Jq 05kgTZPF2Xg6dvL9mx3/EKtslC1yEvaHCq2pgCnQnBOfshTM51ORXZy2pomllFWbeUo7 xhdAKSoqXU+gPTlD6ztwrZ8i3EXmaT7ZSAfpnrLKevCoXhj8RNObYzO0cYnU8L7oczRV 12dvFeIdE7JWUwsh591x+arDRGi/q3PIVTPfcjD1hTnesRItGe+jEcmQrFXorayOcgPe M1hCl9GmV3K2LFG9Zn2uac6PcH2GNBjPa+/nWkxAtXHACxVgPGxnxTk8UTjtqTU0AfXr bD1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e6xAZ3UG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a671d48eca7si19238866b.339.2024.05.30.08.17.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 08:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e6xAZ3UG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 212F91F25E0B for ; Thu, 30 May 2024 15:17:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF8C7187571; Thu, 30 May 2024 15:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e6xAZ3UG" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C9921CAB0; Thu, 30 May 2024 15:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717082235; cv=none; b=rGYtSjWGrY/tHMTtQAq0JDBiZR7zohR0nnUAv0So/mYUvUfRUvrnCYTp81UxcRT8BQL3RodDqcN4I5zQUFpcCc8II3meVUEUfnwb1APhPE3x1mRzw7kvawnRy8aa/Ys5R4AczOJ4NYqkLBLQHbVE9fRJFWqwksKpjjjR4gOcJZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717082235; c=relaxed/simple; bh=1nmm7YiAoX/ocuW2WnnDnFAgCxIVQe6oLetLQWQBVw0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UhVrnl+ay/FFVocWLTRXK2kaGYmT2tv31tdEQ0QcrM8iPF3oh5lF+L7JIvZ9NhnCUJt5iLqifrCY2UPAlVPwuT0TrwQWLJmAP/Mc1MT9y5lPoyaqN2Cn/WS02qo7Dx1iXyi3IlyRcomrlRVOAEfeHa/9rdgFnHfU6W3HddEplCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=e6xAZ3UG; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717082234; x=1748618234; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1nmm7YiAoX/ocuW2WnnDnFAgCxIVQe6oLetLQWQBVw0=; b=e6xAZ3UGP0+OFhoDl2GPwGvcw+BAFrjpPCIlp6KwGm1/7GOfRDCosJui C48mQMyuLLIb30EqcORoJHIQzIFccnKLnfLfaC8FaN9sdOMrHvFvMWlU8 X3MWE2NMYEa8n7fAJq9rStIT7IN4lVdBI/f1axqIaH3Jhl60IGahx7i57 HtrzzV5dip1Oq3rdOCfik2CP2XIhjqT3q8/cZfy/uuBEC2RkyWd2WiyI6 iN8pA5IK/a7cSCkofSpbhw/e9Yduzzo3P354KfPEACWyqv7Bz2nyBMdDu l1sDpMLGdoruhOx0FXeT0nbl+GkUAPv9b9bTiMmdmYlxf3MJ44xtuZ2nj Q==; X-CSE-ConnectionGUID: Mdud6dLUT3+HTvrv8Qooag== X-CSE-MsgGUID: FORB/arqQiKnAkLy7YRfDA== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="24696441" X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="24696441" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 08:17:13 -0700 X-CSE-ConnectionGUID: YmSLElaNSsaNISLgVU6JTA== X-CSE-MsgGUID: adjQl1brQ0mllVZN+NW0vQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="36418618" Received: from jianmeit-mobl.ccr.corp.intel.com (HELO rzhang1-mobl7.ccr.corp.intel.com) ([10.249.173.202]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 08:17:11 -0700 From: Zhang Rui To: rafael.j.wysocki@intel.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, pmenzel@molgen.mpg.de, len.brown@intel.com Subject: [PATCH] thermal: intel: intel_pch: Improve cooling log Date: Thu, 30 May 2024 23:17:04 +0800 Message-Id: <20240530151704.282453-1-rui.zhang@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The intel_pch_thermal cooling mechanism currently only provides one of the following final conclusions: 1. intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [48C] 2. intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [49C] after 30700 ms delay 3. intel_pch_thermal 0000:00:12.0: CPU-PCH is hot [60C] after 60000 ms delay. S0ix might fail 4. intel_pch_thermal 0000:00:12.0: Wakeup event detected, abort cooling This does not provide sufficient context about what is happening, especially for case 4. Add one line log to indicate when PCH overheats and the cooling delay has started. Signed-off-by: Zhang Rui --- drivers/thermal/intel/intel_pch_thermal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index f5be2c389351..fc326985796c 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -298,6 +298,11 @@ static int intel_pch_thermal_suspend_noirq(struct device *device) /* Get the PCH current temperature value */ pch_cur_temp = GET_PCH_TEMP(WPT_TEMP_TSR & readw(ptd->hw_base + WPT_TEMP)); + if (pch_cur_temp >= pch_thr_temp) + dev_warn(&ptd->pdev->dev, + "CPU-PCH current temp [%dC] higher than the threshold temp [%dC], S0ix might fail. Start cooling...\n", + pch_cur_temp, pch_thr_temp); + /* * If current PCH temperature is higher than configured PCH threshold * value, run some delay loop with sleep to let the current temperature -- 2.34.1