Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1073031lqs; Fri, 14 Jun 2024 14:10:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZa5dRh6rvn1DxX5jaRr421uiRMKdymiStNVJY5B3hVh6sdXjJ9pq+MjP+rAlVc2T0g8iLQPEuVjAIIMXMZMNAuMQtk3On9vU6RGxa0Q== X-Google-Smtp-Source: AGHT+IHRIBipp61Z7pdqPkq0f99INmKYOsw/qDlKpoAdP8ygPFVMtORcxg2tSlArILo4NM0lU4fB X-Received: by 2002:a17:906:2308:b0:a6e:f72e:513e with SMTP id a640c23a62f3a-a6f60dc27e3mr220434466b.58.1718399454090; Fri, 14 Jun 2024 14:10:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718399454; cv=pass; d=google.com; s=arc-20160816; b=QJs5oJI/IElo+igqieSpJgsHEMUY8HUDc+gaLBVO1TT3ytYuYIT7JWn1a6TXh/z8vo AkwaNB32FuBUgLWi3IG8T+ZxT0F3LCD9rMSo8Nl7P+3Nb4LBijHrlViMog2tpoSa45Qa 0SI6yPJ+uHtT57K6piOWwKPHYB4US/BxpLeGPL52yxCklD82I3cF6QJW1pwhe3W50ys/ 3fmyN6PZmi1rpev1M5FHjSifu20+bZmuuN8eN2clKzjL2FeU41IZ16kyB6xiFGbVTNsi TXnlTfsuj4WGoU9qp/Jvh7ruUQxRf5vMyJmGyQng9/VK/uzsdkZtnEgZJ6nIK+665mPC bh0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=a2NmPQsblt5XXlKW4Ot+ndkYO3jgleYIk5S0H7g/BuI=; fh=rnxKYiqWxvUFvIgkleqViXPlmrcbHCY/GfGgovU1oFU=; b=ca+Ebfps5/CKQWnYszszurF6QyvnqajSO4tsNYl7rfPylnKiSKYVWkaZFM3Nx7cJE4 ITZy5gzOYxLlqwnPV7U8QqCzPaTpQMA4kAK6WTBXWSTf13hckjGAzdwRraiwaJRGT6IG 1FQbyxfWFwDFGYDr/jQmLKGd5FVwt28Pz32LBd8w+hyPdKnQj8GYZOuUaVlpe34kw5DB Q2E6czIcHamrnqp95Gs+6I7Q+y7TYk1h3olYaNTuULFXvi1xZqXbQQdaofhOdO55EqHF Cau6CmZ3VK+NyC24skUQgh+cyvT4pY1wM3YiGoJ5j/zv8SfOQ7P+F5cZjlHytLiviXhe Hs2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fJtH3vFp; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-215493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215493-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-a6f56dd5f81si201061566b.386.2024.06.14.14.10.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 14:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215493-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=fJtH3vFp; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-215493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215493-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 CB0A71F2474E for ; Fri, 14 Jun 2024 21:10:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E692618629C; Fri, 14 Jun 2024 21:10:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fJtH3vFp" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 9AF501836F7; Fri, 14 Jun 2024 21:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718399428; cv=none; b=o3/tzsV10xcrMEInoOA7C5NDL557+9CFZSjL/xKoiuMlLz4j0qmS9hONd0bXjlh1VI1OyI8eYk+FyeBYlqbpknes36UVibmabuFLDFfTfqfW3GEiCzlhvI+oEhkGqBax/I/2F44z/7OS2EFQkhRrOVr4n2bDjyqpSUjhgr9TDIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718399428; c=relaxed/simple; bh=JRveOb1aR/lPnUmEJO3eKUrxatx2cKtoGqOUJhUROAs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=FF8YBKYEwNxHmq/lK6Hs9RSLNWH2WvZorhwgkhNYgqXw9+h4tqI8WwGXRGME0Qs4ndVe6sTxtyT6niQS7RvWX2rPV0PQ/AID47QTTDc5Nfuqq42FRF0+Kyw7kGE7GG703+wE2GuNcDBWNbXd6iFsue8wSJetEiFmgTzEw/6+hnQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fJtH3vFp; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718399426; x=1749935426; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=JRveOb1aR/lPnUmEJO3eKUrxatx2cKtoGqOUJhUROAs=; b=fJtH3vFpd2ayBrtYOm4X8c0pDCMiyhy6UIdPYOQ5YexijamQgxuJg+Ec TAfrWpLf6/MwfyHMJ415FIkg2yNxqlrAJU6393CCMc5kBH6LPF844Nnjl bn6CN1EeUakIxD1sYAfhZS0UfoaidEAU1Gds5vOkRJSivYi40iFPX7zdl euqVbZ3DpyY0Kh8TXKyMPnNkbzKwp/23lHtMvJFfuFos1PL2s4rEeLy+B As419gaMCTncoayFF1J6kgZesFiZ+G7ccmSlSHczQv0wziIQZ5NszwtAA eAG5T1m1AaDLqhcVXQipfmvFlPaA02VAb+l3DhxO/2TMhF6pwEzSPv+0I g==; X-CSE-ConnectionGUID: hhZZYflJSvm9CJKSt9Jnzw== X-CSE-MsgGUID: vAEbKV1ZTumJC+yOwMYjug== X-IronPort-AV: E=McAfee;i="6700,10204,11103"; a="18230029" X-IronPort-AV: E=Sophos;i="6.08,238,1712646000"; d="scan'208";a="18230029" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2024 14:10:23 -0700 X-CSE-ConnectionGUID: 9jf+LWzLSsi6qzQAnR2bGg== X-CSE-MsgGUID: CdIBmVGtRFWTjyuNk4wbxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,238,1712646000"; d="scan'208";a="44992977" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmviesa003.fm.intel.com with ESMTP; 14 Jun 2024 14:10:23 -0700 From: Ricardo Neri To: "Rafael J. Wysocki" , Zhang Rui Cc: Srinivas Pandruvada , Lukasz Luba , Daniel Lezcano , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH v3 2/2] thermal: intel: intel_tcc_cooling: Use a model-specific bitmask for TCC offset Date: Fri, 14 Jun 2024 14:16:06 -0700 Message-Id: <20240614211606.5896-3-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240614211606.5896-1-ricardo.neri-calderon@linux.intel.com> References: <20240614211606.5896-1-ricardo.neri-calderon@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The TCC offset field in the register MSR_TEMPERATURE_TARGET is not architectural. The TCC library provides a model-specific bitmask. Use it to determine the maximum TCC offset. Suggested-by: Zhang Rui Reviewed-by: Zhang Rui Signed-off-by: Ricardo Neri --- Cc: Daniel Lezcano Cc: Lukasz Luba Cc: Srinivas Pandruvada Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v6.7+ --- Changes since v2: * None Changes since v1: * Used renamed function intel_tcc_get_offset_mask(). --- drivers/thermal/intel/intel_tcc_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/intel/intel_tcc_cooling.c b/drivers/thermal/intel/intel_tcc_cooling.c index 63696e7d7b3c..17110ffa80bb 100644 --- a/drivers/thermal/intel/intel_tcc_cooling.c +++ b/drivers/thermal/intel/intel_tcc_cooling.c @@ -20,7 +20,7 @@ static struct thermal_cooling_device *tcc_cdev; static int tcc_get_max_state(struct thermal_cooling_device *cdev, unsigned long *state) { - *state = 0x3f; + *state = intel_tcc_get_offset_mask(); return 0; } -- 2.34.1