Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1100118rwl; Thu, 10 Aug 2023 06:32:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGx5XwRbuA7ZBgRPxT2QDDJP8f9o5H1S3bWd+JZOSXsKeWYPupGPinaJ3lSV0DT4J9h5xSI X-Received: by 2002:a17:906:c1:b0:99c:10e8:52d7 with SMTP id 1-20020a17090600c100b0099c10e852d7mr2232702eji.31.1691674335211; Thu, 10 Aug 2023 06:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691674335; cv=none; d=google.com; s=arc-20160816; b=BZbn6OOWsR57AfjjnSlQqYVvD9qp5rebpmx02pu6nL/RbVQms8rOqmLqMqi09aw09b asAlVzDm0wET0UOS+IuGb0L63iEGNo9DoIFHbJMMpoZJnjumYdUmMUh96bhLcVXEBajp K+vuy757BwJGcL77eskafm/2jQCwkA6IzPPVHS2E3YoOVEEYZJLvPEbGpnvgNxa8o9V/ ekZPe8EfPIRttdGWworREFH0XKuCCuMBWTxDYO588eXCj7Aaua4896R7Hmee4zaJWhlT SZIe2f13fAzxLQ2MsEWH8NUhKLFFzzBncvRCWl0NyMGK27vU3JGRHVQbH66hAYd1Ub8/ r9Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=sAJkSh2BwW3GTXYSnuBKrLWQttQ8wrAhI5yb2xW0nWU=; fh=wZu3Xk3WBMTxfLKVAN3qmT6zBeTdANOzD2sPn3vOtWU=; b=T19FuXBlAXPbLEETx8KNrdTGR8PWE57SgXYCBHNTpgNe9ScJCs2R7ltyLyERibLFqp 2HNzc3iJyXbpcCaWkqVYZsiudr0L8xHCNxX7QS18lHCfjx2ksn4NTH5IXKltWS+wPu1E FPyfM9cEn+Gj5f2BfLqxPIqGf/Q7iYBlfeosRyYO8pfZmVoQd4XP0Yi05kIeeWvwwCAH eDhN8QXrcJd2FJJgMqCcW4YPGiL6+3yEVDgl/8GW9LPcvldbZXebmQAWeCoRacrXBCWM A2YfSoU/TFd4Ilcn5c713R7j8OTTunUotF2ivOByh9+KMN4OQiI3WeQKAOmt2MFgVLOM +mqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oOAkaRQY; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m23-20020a170906849700b00992f2becb47si1598126ejx.7.2023.08.10.06.31.48; Thu, 10 Aug 2023 06:32:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oOAkaRQY; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234876AbjHJMfL (ORCPT + 99 others); Thu, 10 Aug 2023 08:35:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbjHJMfJ (ORCPT ); Thu, 10 Aug 2023 08:35:09 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D9542130; Thu, 10 Aug 2023 05:35:08 -0700 (PDT) Date: Thu, 10 Aug 2023 12:35:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691670906; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sAJkSh2BwW3GTXYSnuBKrLWQttQ8wrAhI5yb2xW0nWU=; b=oOAkaRQYAUpVSlY0kS2jBHM2Ded+OXAucprj30Jxvk0QxVPpGH+2Qapjcs+y2Xfv1vk01d IY8SrtajhJEj1/ft2t7nLXCunNxwz3srydUrndt/M+ctySPaVEgVQms2GqNzUCktRg4n3d 0JaAw/i7jAmfmuf3CI+e6KV4yKyp6gNT4p0dPn0/Qb/nmQVQgHBUTWz9Nt8rjl4Nq5T7ST fXZRT2Q5ZaGRezwdGufR/ka05cCgZ0GS3KUeoWzEoQihuh5kjF3DHSYRLUVNU02Kkwac6E L6j+a4jOKDhiZnnMsNUqrF3nmcoJP3EggCkvRuW/JQMwbBh01fl86xyaxC9Fwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691670906; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sAJkSh2BwW3GTXYSnuBKrLWQttQ8wrAhI5yb2xW0nWU=; b=zvrkAH5nvwuE7jFevdKKpAgDyexE2/LRxMG8mTGnuO0usFSffh7oq4k3jSf/0iiFMZtAsx /uLZqtHTCWQ4QFDA== From: "tip-bot2 for Avadhut Naik" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/misc] hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based models Cc: Mario Limonciello , Avadhut Naik , "Borislav Petkov (AMD)" , Guenter Roeck , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230809035244.2722455-3-avadhut.naik@amd.com> References: <20230809035244.2722455-3-avadhut.naik@amd.com> MIME-Version: 1.0 Message-ID: <169167090605.27769.12406039487431326529.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/misc branch of tip: Commit-ID: 3cd9da416d5b625d52053c816ee91daf4e97007c Gitweb: https://git.kernel.org/tip/3cd9da416d5b625d52053c816ee91daf4e97007c Author: Avadhut Naik AuthorDate: Tue, 08 Aug 2023 22:52:43 -05:00 Committer: Borislav Petkov (AMD) CommitterDate: Thu, 10 Aug 2023 14:23:57 +02:00 hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based models Add thermal info support for AMD Family 1Ah-based models. Support is provided on a per-socket granularity. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Avadhut Naik Signed-off-by: Borislav Petkov (AMD) Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20230809035244.2722455-3-avadhut.naik@amd.com --- drivers/hwmon/k10temp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index a267b11..bae0bec 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -65,7 +65,7 @@ static DEFINE_MUTEX(nb_smu_ind_mutex); #define F15H_M60H_HARDWARE_TEMP_CTRL_OFFSET 0xd8200c64 #define F15H_M60H_REPORTED_TEMP_CTRL_OFFSET 0xd8200ca4 -/* Common for Zen CPU families (Family 17h and 18h and 19h) */ +/* Common for Zen CPU families (Family 17h and 18h and 19h and 1Ah) */ #define ZEN_REPORTED_TEMP_CTRL_BASE 0x00059800 #define ZEN_CCD_TEMP(offset, x) (ZEN_REPORTED_TEMP_CTRL_BASE + \ @@ -475,6 +475,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) k10temp_get_ccd_support(pdev, data, 12); break; } + } else if (boot_cpu_data.x86 == 0x1a) { + data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK; + data->read_tempreg = read_tempreg_nb_zen; + data->is_zen = true; } else { data->read_htcreg = read_htcreg_pci; data->read_tempreg = read_tempreg_pci; @@ -521,6 +525,8 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, {} };