From patchwork Thu Aug 10 12:35:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 133992 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp413531vqi; Thu, 10 Aug 2023 06:16:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqoeB3gOO1DP/FSgL6P/LAF36FktW2YLOtc+YfY5wil2ChcdCF1NJ2sIDUH9m2az+eLsou X-Received: by 2002:a05:6a20:5488:b0:137:74f8:62ee with SMTP id i8-20020a056a20548800b0013774f862eemr3409853pzk.18.1691673396096; Thu, 10 Aug 2023 06:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691673396; cv=none; d=google.com; s=arc-20160816; b=ODSgKTHfj//+LdZEbcqSd7Snth2lIJ/5hO/c0D0witjRGJp3J/o1LLZ8oynMH/2mBK +VM9EiAWo7nkY+dbPhaFL1OGlI9CkJUIxdPCN3lw96s9ljItydGp/o8UCHEAZiDwMWLh 5J8Hyj4L5kC4ro7cwiOwEfG2rTrkUrZMPGubmKfbffx1Fhv5jJG6v4zTVgYpTPG407cj xaXfE7tQo1bQoO6XHicf5KDDBRc4nd/3sZw/XwBj9Lpg3JTlye3v8dNGukGsK3qgiBVN Pmv9HUOq9aSFxNvwaf1wyw+ysRWQAai8mefuoVS1oEzf9dg9oJT5+xJG+ahed+ZKN6Qa 8kkg== 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 header.s=2020e; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t37-20020a056a0013a500b0066d45f035a5si1525428pfg.320.2023.08.10.06.16.12; Thu, 10 Aug 2023 06:16:36 -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 header.s=2020e; 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 S235465AbjHJMfL (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773736018294634447 X-GMAIL-MSGID: 1773848123045745361 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) }, {} };