Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1263376lqd; Thu, 25 Apr 2024 10:06:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW38i/UocUw7qcqH7CHDjvbsZDRBLInazTf5U7jXVutfWhy2/TZmcJrcY2OmMMqJXkb4cDl78bsSaYC+yZ4CZHtubnztXjZvAOmne4GaA== X-Google-Smtp-Source: AGHT+IHStAMllpcj5GWQmKNem/hjnUZzGaIj+Vy6oloQ0p2Z8ZWleGTByH6uQUkzXsXV3DvC+YjX X-Received: by 2002:a05:6e02:198a:b0:36b:3a6e:ee83 with SMTP id g10-20020a056e02198a00b0036b3a6eee83mr472743ilf.22.1714064806156; Thu, 25 Apr 2024 10:06:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714064806; cv=pass; d=google.com; s=arc-20160816; b=uS6IoRIx+0yjwDnbNs+7hTKObMhPy0TiUskNKQ6mHCv/AStzK6dXIN9PC+Qqe06jb7 KhV5zTjOOIWFR5nRTFBjYemH2C1tfQwapygqr8104IXqWF1Ov+L9KUMRfcRAp0EBm41D BHeZnOClFICFzOeaBHLfr3Vj2WmEc5NEfUwBcRgyYsQ4w1DycVqUShTkUgIDSFl2IMam UKJgTTxlKHzBLTg8LWPspdawH9iVA8B5JmYEp95diPAcqvZAGIqR4ni+w2xeRIq0ZZCe d+yOJSdY9Ev2tjnaPp3P5zY+BQkmPj3DCszFOKOzseg5EIjjohirmMCBd8OMtO7+qni3 /sog== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=054UnZcxc7yv/8KBmUSAah3JkK63si/LQmznSe13FMA=; fh=eHqJfzqMTwYd5GnGc2yf8j7JPTEUe7TwPPTEQdXh+fk=; b=MKH39SDDS+cMZgSev78nFcVsTcOX8akG9zkoNeMohXsBRx+C2U6SMJqQPaQigXqIvz /z43mgjoRdzjbrPVIUrCZvNxCQoL4gco70cVogwlqFWfYvzKIwAvoyORdFxYp/WcsPUF KqEw0BFz6c1zpjx8nmDjDRSpKDHo/Cb2OaW7Jvl4PeGCzCJWUoHuWGg5Ftw5bHz0j3Qk EborHT2QjHg2qQ6/2P5/jv/QMyrVMf3d18TrfZVrxX4dNLCuRCsoHSc8EqBDjk593V4E tRoJLyDoPP4VaOJFdInmB/R+6AiA3ZfmjnVii3tv5YvFqbdVG2BDTrw3BkbrpShtsHdO sU9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Gd9R/kHd"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-158939-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158939-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k195-20020a636fcc000000b00607944ea8f9si2755965pgc.200.2024.04.25.10.06.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 10:06:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158939-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Gd9R/kHd"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-158939-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158939-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B1D1C286534 for ; Thu, 25 Apr 2024 17:06:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDA4914D718; Thu, 25 Apr 2024 17:06:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Gd9R/kHd" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 641F22B9D9; Thu, 25 Apr 2024 17:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714064797; cv=none; b=oJAoxatFBtSBlMVTsvo+GAljElABvLeqCCEQzaV0RFSwXLQ3t35Ps3Aa2W8PSTdU3+ZNl0aFnPdoTKgDY9rMgNiyOzon3YV3leKHwTG+ASEB5JNyAiH0XYJ1qz+gOy19vlv859W6XM/6foFEPp1YUeHgUmauxNhXPCIY/mpPR1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714064797; c=relaxed/simple; bh=HDbhBCiqnB8FHeOVW16Nyk3NGHSsOYB/sKeG+0xp0KQ=; h=From:To:Cc:Subject:Date:Message-Id; b=DDtn8T8I+pTNlv2TGnbutP2mBlkKRkP8o2gA60ZOm1Ge59NLK/vvyxgni3kQ8x9Gsa4pPWUlPIq8hhBPlpgv7bINMKf3dC2i5HI4YXMd6kLx03ayLJ0kntihsyZwwptLZ0jKq9hyoGl1YRqg75pJMrEAS98nEhF6ARf/8ea90EI= 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=Gd9R/kHd; arc=none smtp.client-ip=198.175.65.10 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=1714064796; x=1745600796; h=from:to:cc:subject:date:message-id; bh=HDbhBCiqnB8FHeOVW16Nyk3NGHSsOYB/sKeG+0xp0KQ=; b=Gd9R/kHdt0uKt0EQ1X8TPoAE6GuGP9LuJ4X20x4yxnTosEVyhgyS6pY/ RA9RZyml1Rlw8qG+imxLuDzfSdZzyRRKfh46KWD77PxOVYWZ5y1vXLxJ/ xRFzw8oSNvkVQDl0SHZg0iPCn+hVlr5vrTzuLl/QP0gkrud04AG0IsjM+ fimtIKtlCYFh/ie5e/MYKpAKNX67CMMl8JMmu1FRckHVBrDUSXD5kFAxF tOmTWKv5a2WKZESljZ14tIorr3UIH7vvJuUDV9nPJ6aGioGiZCn/CeeSt A1Sib/IonjRGNXtqL+qrlFXQTA2blmkNaOTzr4ezzqJHTTW4Up6nteBOg g==; X-CSE-ConnectionGUID: harf3TzjQb2h31cDS6XPBA== X-CSE-MsgGUID: TDSJkncOSJSAxaERa8Fohw== X-IronPort-AV: E=McAfee;i="6600,9927,11055"; a="27225295" X-IronPort-AV: E=Sophos;i="6.07,230,1708416000"; d="scan'208";a="27225295" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2024 10:06:35 -0700 X-CSE-ConnectionGUID: 64+52qVwSeSh60HeTt8IrQ== X-CSE-MsgGUID: DUqBEeidSGaPip9kNYEmag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,230,1708416000"; d="scan'208";a="25548553" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orviesa006.jf.intel.com with ESMTP; 25 Apr 2024 10:06:34 -0700 From: Ricardo Neri To: "Rafael J. Wysocki" , Zhang Rui , Jean Delvare , Guenter Roeck Cc: Srinivas Pandruvada , Lukasz Luba , Daniel Lezcano , linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH v2 0/3] drivers: thermal/hwmon: intel: Use model-specific bitmasks for temperature registers Date: Thu, 25 Apr 2024 10:13:08 -0700 Message-Id: <20240425171311.19519-1-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi, Here is v2 of the patchset to use model-specific bitmasks to read TCC offset and the digital temperature readout of IA32_[PACKAGE]_THERM_STATUS. You can read the cover letter of v1 here [1] for details. Changes since v1: * Dropped dependency on CONFIG_INTEL_TCC for the coretemp driver. Instead, extend the bitmask to 0xff to accommodate recent processors. (Bit 23 of IA32_[PACKAGE]_THERM_STATUS is likely to be zero in less recent processors.) * Renamed TCC_FAM6_MODEL_TEMP_MASKS as TCC_MODEL_TEMP_MASKS. * Renamed get_tcc_offset_mask() as intel_tcc_get_offset_mask(). * Do not export intel_tcc_get_temp_mask() as it is no longer used outside intel_tcc.c * Dropped stub functions for digital temperature readout and TCC offset. They are not needed as users select CONFIG_INTEL_TCC. I have tested these patches on Alder Lake, Meteor Lake, and Grand Ridge systems. These patches apply cleanly on top of the `testing` branches of the linux-pm and hwmon repositories. Thanks and BR, Ricardo [1]. https://lore.kernel.org/linux-pm/20240406010416.4821-1-ricardo.neri-calderon@linux.intel.com/ Ricardo Neri (3): thermal: intel: intel_tcc: Add model checks for temperature registers thermal: intel: intel_tcc_cooling: Use a model-specific bitmask for TCC offset hwmon: (coretemp) Extend the bitmask to read temperature to 0xff drivers/hwmon/coretemp.c | 2 +- drivers/thermal/intel/intel_tcc.c | 177 +++++++++++++++++++++- drivers/thermal/intel/intel_tcc_cooling.c | 2 +- include/linux/intel_tcc.h | 1 + 4 files changed, 175 insertions(+), 7 deletions(-) -- 2.34.1