From patchwork Thu Aug 26 18:40:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12460471 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 013A0C432BE for ; Thu, 26 Aug 2021 18:41:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB68061027 for ; Thu, 26 Aug 2021 18:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243336AbhHZSmR (ORCPT ); Thu, 26 Aug 2021 14:42:17 -0400 Received: from mail-dm6nam10on2086.outbound.protection.outlook.com ([40.107.93.86]:29519 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231453AbhHZSmM (ORCPT ); Thu, 26 Aug 2021 14:42:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LT5OSbej/jQpgl8PthoozRSwF/YtioK3s/kNacFcKJcC3Pae5RUWkBK2EpbeBlMBZOWVNq/QYWfpv9Gtx+Wx6aeRWIFl9JfhYhtKmwLZGDLMqekSCXOfwH7wolWVaOqEmkptY9N9DlHRfF2Iw8QKVdNbqWbzlMIPrz2kvTCJOMnw3f1J0XfeDU4wQM3Na4LTecvaiblAW92NU0SFJHuLFOCP2qTElhtkydYz3dv8h6JaMzB5yLvrKNtttrT+R2vSG6jgrMRjjylHujGioKR86qHMTV5W7C5f2nwvK7Yove5xLgFeYZmMhsdNKKC1SWxlq5P7gpbcl968Gph9KVh9eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CTPWWZ41UPixzlQwqGvxatmFnBabYRfR4NatipdzhrA=; b=mKxNh3FTlEVsL/p+JAzN929c0DG+CsNWSrTjDGlVEAkRtOj1ZAl7yh99qt/AvZP2UDULKR10f/M03MPj0s1xOhLqxkobR7yA+GasWTgj2L9ddQxp9vBgh3GCCycxUx+HkhVgiv53Aqp/s+c1A2lQFhIs0dihJ7f6sYHXcjj61dY5y3HPBIq3/7yAbt7APRrxT/lZx9crFf+40V/dJaULLFx6ADJacRtVr06HDKm8luufTIH/Wd0dsGLRXzoip/m06wY4+8PKdSAHNS0oT5LK619f8boudtbe9C5ROyIrzUDiCVF8VqYecGCMc862WtHQWAUA8aFq7spVpvRqjYc3UA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CTPWWZ41UPixzlQwqGvxatmFnBabYRfR4NatipdzhrA=; b=XJm0x66720mINT3fHaE29yAO3TPlLQu99Dz8XDbkhxFSZHiJ+S2KNLpdT6fL3fcQzPFCFmlZgVvYvcuhh2yfq0ztH2DKvJZuQrkdXY38KIU13bu8KsDoUM0XEBh4zYa6LpEOP/8ExgZmtd2l/YJHWOnzqcUhaLVvO3YXQXEa5AY= Authentication-Results: ladisch.de; dkim=none (message not signed) header.d=none;ladisch.de; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) by SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug 2021 18:41:24 +0000 Received: from SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1]) by SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1%4]) with mapi id 15.20.4457.019; Thu, 26 Aug 2021 18:41:24 +0000 From: Mario Limonciello To: Clemens Ladisch Cc: linux-hwmon@vger.kernel.org, Gabriel Craciunescu , Guenter Roeck , Wei Huang , Mario Limonciello Subject: [PATCH 1/6] hwmon: (k10temp): Add additional missing Zen2 and Zen3 APUs Date: Thu, 26 Aug 2021 13:40:52 -0500 Message-Id: <20210826184057.26428-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826184057.26428-1-mario.limonciello@amd.com> References: <20210826184057.26428-1-mario.limonciello@amd.com> X-ClientProxiedBy: SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) To SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from AUS-LX-MLIMONCI.amd.com (165.204.77.11) by SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20 via Frontend Transport; Thu, 26 Aug 2021 18:41:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f092c027-4496-4660-347c-08d968c11af5 X-MS-TrafficTypeDiagnostic: SA0PR12MB4510: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: REEEXh5kf60PfUY4/SFh0CpBxoRvFD+GZR8bcI82D0Ju4KmQk7Slkp01C9gBn8HpVkiZc29hme+2CiaJvteO0IPcrDiSicHQlYcOzHsj203ZIYRJR0ThF/uE0Gqk7oGrMQfeYZVF+vYBUaUEHHeeNhQ68dXyTc00mqtaW52Dq72ha14NC62Vxl/67JDViaPmOseS45iY0sPehmhuPhBOe8TDe51YXyNN/u+/0ul5aC+Nro94h9HZiPTS+zrr82jaq5I1SXxpzyrFYwrMzJGBKEY0jf8aD96XIiTR1uGgvRg5koalFtZ56HouNcAlJJIEnNkB0ODmbxOHACd5bxf1bh1OMbcP4WQ+C+Wmz0Q2MbhhQwF7Yg0aSbRoIa/BrCa/d0aJB2fdRMzYdlLoFIrB/H9imDq+YddkAAfVsQ9NDz+ZEyt2jj2We5TKEJWVJDytgfklMLO1YLKi3w00yjVRzrft3FeBtaYEaiGDbEzWPhe+x2zoAS/svsCG6UIMpsDQ+6/bWDo7XbjUogAXrHwdwbLY7TfW9kZaRLsS4CbZPbBDaFysrDEKRLVY2F5lDyIt13vBRX9fZ8GnGtFX0rKhou9UyK4PtZmU6DMvG6L7Dl+YX8LI/75q5iHIuL4arQyJ1jWlGEtXgHrK5gr68/IkBvu/oQj34OngbEmKPyzO19+yvrmmyXqoYCBCxfRudvZ9XJs44sEVU+3QR+i7/liGcg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4510.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38350700002)(4326008)(38100700002)(1076003)(2906002)(44832011)(508600001)(956004)(5660300002)(66556008)(66476007)(6486002)(54906003)(66946007)(26005)(8676002)(186003)(36756003)(6666004)(2616005)(52116002)(7696005)(6916009)(86362001)(8936002)(316002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XNUNin34sp/S7KCAgA2yIpVphowE/bQxqHSQXsMp+39tsN2tipnYpbafGQ78GvCuzBzUOxUVWgASt35HmZVT57mZ2eunUyS9VQeal/BNmostsI8Xk6qdxSTKvxhrgKKRlpfkbTkNnYr35HsC2a5R4GWZc9LgO/pPbGfJCnvmkCf6dq8DVdmeKKDnsYZKOHErBsWcdJ47dmR5ZqRdwNHuUd98L47s3lWUO6OABBhypFQdAOFcn5QadxWaz9LFOnv952vDmhw6R5Au5rowuI5bVTQRkxlKBf5thd2jbiouROWeAqRvjHtLmx7AiREGYr5ymACRnFzVbMhdt2/fp6JD6QPBN4OQvU1gAiYutXqkir+3SdWx3FMxfmEApZG1sK7L/qUVQur+GQ/Xx3fp5tqxVnVq/jj5mxbJRKNbxHDkawyoiGImTk/E7dRGkWNUeK8SdElEPjVDCMvGPc25Gg9GeXB21ZD/nWPABml4ZYnMtEkC5BIXwmSHvutSDtpde0mewiUwWPcmJe0tYivL4d8f9LtGtc9Vu71ksk4PVsg/qD3kv2HTlBYpvMlWcdx/E7OVE6ChGmZFBtxDpxIeMdF7CzPI70v4xziCQvsZwEeaVVQlOS1bm2xqIrwoySVBTsRH02//6UmlA6h4C4WJFYmJiDkSfKEuXFVQDCPBJ7ytzwYIdPOxgQLHN3TmvKrqE7MLoBkMW2Jafb5W1o/Us2hEEwRZFQ7gaociHx/E83QbgMBXtSburDkgWMX7MjU+cKosFvXORNxFlRx9l+dTCxcyBarJdc4gns7z//8B1Z9nFfXDC8I3VxqkKRD8kWb9f3KIBHYem+QKDxs1mEGN9OuAFzYEOod4+pj3wKOXM3Il/BngFwjs122CSbAHOi+/56ojWLKv712gIzu3pyZ6OGZnCP2zM32mvldB+DnE5kRTcgZryIiOl1PpL7fhLO+C9z0jiiCdY33c21EZUHJQ8IQwW2Oq7IOKbgiexWJ2i3TUy7iUp6ckIPi5imanCVPs1oJl4Hj5JTRDLtzNeT5ZkxiJSSgbIxRA6anaj6h2nBPY4pEQhcDtnym0WyXev9qGOJCpuNBBt/yNeaM505wkfhWNsYqdPJh1/ny1/9+3uYlCYOiJd+iFF9lhTUBhg+2WlvNg4p9E95OGVmZVb7czYgTq0Jr115bAQSYzIFWz7/mTNkXqsdvI3vgk7SgQjIkQQTURqCuulB54gyt3tbVDj5Rutatxvr1Nt6V2wu75V0al9LEl3YhqUnRwXcULi9gsagSBy3KFfDc2LRLwyTsQjS2Huxwc3MoMUk3jyaUKoI8R2OKSZmIX/144nkIU/K8VA+U5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f092c027-4496-4660-347c-08d968c11af5 X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4510.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 18:41:24.1652 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sVw+13LBYS6R1tqZ5MAsKq1dJia/NjeoWlc0Ve9ryevNJHaZ1gVF45DlnG4myauasH708asa5E3g6hw6wY6gQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4510 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org These follow the rest of the existing codepaths for families 17h and 19h. Signed-off-by: Mario Limonciello --- drivers/hwmon/k10temp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index fe3d92152e35..1d3c8d319941 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -437,6 +437,8 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) k10temp_get_ccd_support(pdev, data, 4); break; case 0x31: /* Zen2 Threadripper */ + case 0x60: /* Renoir */ + case 0x68: /* Lucienne */ case 0x71: /* Zen2 */ k10temp_get_ccd_support(pdev, data, 8); break; @@ -450,7 +452,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) switch (boot_cpu_data.x86_model) { case 0x0 ... 0x1: /* Zen3 SP3/TR */ case 0x21: /* Zen3 Ryzen Desktop */ - case 0x50: /* Zen3 Ryzen APU */ + case 0x50 ... 0x5f: /* Green Sardine */ k10temp_get_ccd_support(pdev, data, 8); break; } From patchwork Thu Aug 26 18:40:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12460473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74EFFC4320E for ; Thu, 26 Aug 2021 18:41:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52FFA60F44 for ; Thu, 26 Aug 2021 18:41:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243261AbhHZSmS (ORCPT ); Thu, 26 Aug 2021 14:42:18 -0400 Received: from mail-dm6nam10on2086.outbound.protection.outlook.com ([40.107.93.86]:29519 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243300AbhHZSmR (ORCPT ); Thu, 26 Aug 2021 14:42:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TPU13EihSNNmhI93ZMZYbH6GtIhe7Jp4cLyRQCZrrmmHLXUZE/kiyAPKZfyUw6gcWlQI9igYQnzRgD5jkTqal1thyNVpc7140PB0e+Hq3+E/V7slOw1Ed9EjXMYZgHpaJRBdbiW8cdsFQDMh33RKxHAsSKPmVWK0UsF9Z7myIqHEWryrfdW8s7Nl4VvKY/4mgRlLsAGP0uVj2weJ8acG+GFc3OxkaY4E4Zn8LmFlQ07jHcJVtZxUt49e8GStIWB5j8zZ6B+6kLoGA6ZOchrtup9WBsmMwghBYYMan/Xt0wb2CS3KKuqm7wDU1oYvAmrm4y/s/Ioq37SAX/HGKDBPOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rI28x6EreQPEA5kkz3vEaDIIcMtRPdxMvAdfS8uO5+8=; b=D+D+pfgS6jS9p9s4+NbdniL8KoRycMVspbTdr/7cVxnfVa2Sg6WtQnJuX3Yqg950RVgSKVZVzFC6JmMfUyYA2qJHhD4Ao1SUdxZbnzfEzzVlq2fi2o5QtP7BCnM0Iakw7beRpsP0LXPx3JWY/XeYog7PCXuLCKKwlTeOCFe2cDXiLyb2e6sOLl2W+Y7VbmCCd7cApq2HmYXHLG/JYpgSEP0ONurJbrNNNf1RUOHfkX7tCfpYSWk+5PTw38Y29OH3kvzG8Si4Znp4t2yUZAiIk5db7Z2jseYshz96+D+Ue2o+L+EByWdTdBivJufigwI8lJFQfXZN3ghctqhGJucT4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rI28x6EreQPEA5kkz3vEaDIIcMtRPdxMvAdfS8uO5+8=; b=xu1zxpls+vvxd5qdpF5csTiYWSmN6eJlY5y7/4BzV9DC5OX/l7xHvdr8B0+mwq60hAAHFXIIxJYeWJyrfX1sR7C3RLVETqJfD+ltdpw5pTF9cge5a/xd6JoUciDX1oQ8LgpSIM1wnmP1JrjD5aQYSxkfmfyKJT+xaRNFTbIUXmc= Authentication-Results: ladisch.de; dkim=none (message not signed) header.d=none;ladisch.de; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) by SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug 2021 18:41:25 +0000 Received: from SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1]) by SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1%4]) with mapi id 15.20.4457.019; Thu, 26 Aug 2021 18:41:25 +0000 From: Mario Limonciello To: Clemens Ladisch Cc: linux-hwmon@vger.kernel.org, Gabriel Craciunescu , Guenter Roeck , Wei Huang , Mario Limonciello Subject: [PATCH 2/6] x86/amd_nb: Rename PCI_DEVICE_ID_AMD_19H_DF_F3 to match specific model Date: Thu, 26 Aug 2021 13:40:53 -0500 Message-Id: <20210826184057.26428-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826184057.26428-1-mario.limonciello@amd.com> References: <20210826184057.26428-1-mario.limonciello@amd.com> X-ClientProxiedBy: SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) To SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from AUS-LX-MLIMONCI.amd.com (165.204.77.11) by SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20 via Frontend Transport; Thu, 26 Aug 2021 18:41:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93224c6a-d1d6-4f94-5b7e-08d968c11b9f X-MS-TrafficTypeDiagnostic: SA0PR12MB4510: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +2wxQWMsnPfumeQXmNpUWaZr8Qj/5LcbermgwEucPxJnxqWMMkTGpZMlsPplQj05Ewdgif9D3k0Tx+lRYYR2JarQwLKtuQq/14U0e27++DxO7pOB+4OyI4XfSJA9ShOyiQbQnTS1+jkfJoFRrva1+PZG1jXzTF2d1UdN4IBm2qzGc0JWrT4Gjg8vE8PBSnip22UZCfK3TExaUtYmIsCBlaaX3ADRq9qJcg+BU0HSbLlVTx6232X3TtVvlnvNbe1XhiSohvekmOsVE0v9Pro7c0YymbfeD2Pi3iGaFmrkSmZnTTqHCktLiQgz0HFNHTBuE8ZlgE1YrNI9WNas+Y306KD5vrtuysuN6QA34kSoGF6Urh3mU0RHc+ZDUiJ12HHyp85nt91kYuExYnP2H1qljG4LSWFViWc1acgLxCc3kRB7BPq2xXFCi67jIQEAM/8EEPuZIDYLVlSGchlW1qZaONQs614Apdi1fLwGG/udRC8ZMyRvHMyXY5sum6fqzJcwooyyofkjy9MrcCfqIjXIkN4dPb4FLcQpKhGdeubpZ710Ui+hWRGGdzPfVrdemzZv0riOQLgXd4meW7ZT2QXYTeQHKo/sJbelVzMgln7l/5TeVK5KFIhca/W+a5zKWE6gV7Cij+29sio2uv/nCJspMl4fVr+p26kGitC4CLOTOXPzhia68RR7lWAXlXOSBI3I77ydEyiRgXlzza6YH8/J5Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4510.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38350700002)(4326008)(38100700002)(1076003)(2906002)(44832011)(508600001)(956004)(5660300002)(66556008)(66476007)(6486002)(54906003)(66946007)(26005)(8676002)(186003)(36756003)(6666004)(2616005)(52116002)(7696005)(6916009)(86362001)(8936002)(316002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 88ryfvRbikFZNMQMIWYs0T4wHODAZCEqgoqSmEJX5o+WfRq1BytJkgbSg0I/8abuLFDuIammpGLicRtuP+JK28cIXD1ds+lvFQzvPfMXUjX9sNO9/xmkhMy7b2ph95phbNda8atW/vYj35IX761yg6kL3TpP2qK2tEvjLYFNr6taoXaWm2Bb19DMJGYYBgNVGIlpp3g/m6l5gErWZsmMqTl0p/Y6bxtKIElAnXK+LdLsuX1TN7kzwe42/WGefVn6ez9zqmjuxmmE3liAcge0QaQIbYW30Z2nWhj9Eg83rq4R7AW82qcfVrhjhzo6aVkWKGf21Rhh1I2kSqc0T2u1Y84O8crXtVr5F4ulCJe1TXJfLVShn/SW/9BjIJn/RUfGGAuTyFrPLh/+Y7GoQgK469gbYVAf/FKyKr/3vvD4p8Rqle8MKBPTmxJBjNiwm1TS40yHK9An5ukL621IfpYNYrzHoL5C5uIrJomaleH3LAXGHbCCNSL6P7EL8Gc5OJiSTzNZKoMwypVz3Y77khz/D+HO/krjm8AebBz/WVdfAw1NRxRbsFGMfbkU9StmkKvsxktiItJhpGLSxtmdRixcVqnXR6yKEa3tyZgI32iV7rQMhYmOcKhpZ3xRia0b2wZy2231qZAY3jPuKkSKOQOkrpaAQ1ra1iSh0VymPgfAIz3cibRjXuKoiYC1r1fz2A3aF9z2uyLeguwaXK/RR5sYYYYYpOOd3EAXQJc4fVawPUnRMR6kWbSudYTOZxRK4r5XDaWPBfHHqeqJRJf60ebWSxtqekSdaMym3gWH67NamWwLtzODOFa1gEw6KgwRuiH0N/gOep4n2eyTcQXJCI4A7qGxPDjeL/tmlBZ1nExpaQ+cTCW4ED+9IRNnCab/CpDgAHau0muRtbZcMRHtlkIgBU6Z/PSDp/5lpZtiSVf+0LWXdF/LS8uspQKtzMVskxzJS+12Xf8IdW7ZC4ZqfTNnsjQwCIjOw/an3E5tZlxrkVHPjmHYnuLy1AUSkrblwcbsOiMSennQqnNv3thDk1FmmRKQhT6ODL1KcFpJpY6n4NkeBx/ieOB1lPaZ35Ccuvyn06E0TuVT0zWttwqdHxj/sSfvj+/H4XdQMVswu6FeOR6KelNgohCaaWC/18IQCGr+CalwQzwr7/ymBLbQk08poYQZvoHGupXJmRr/1Vf97My+VmevXE9cMdwSamvTiZR8EaV7bFqUho5RJh/D0PEEs2WmrESx4kH61/Dia4v04uMiy8Vs09OUjv46zhos67ASDPNaHuZ+3lTv/yelqbbDH21KsgCii080gjfMBBkt5Ppn/xHxwMYHrMm2ha0Cz/Eh X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93224c6a-d1d6-4f94-5b7e-08d968c11b9f X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4510.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 18:41:25.2803 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fKYczn7l3XoHTMEixkwpRNgfy8oA86TPuB95NfsAWblUnUlOhctzDhcZBnd9OL9IqeDSOSqh6Vba3kiJkVlC1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4510 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Upcoming changes will introduce a different model in family 19h, so rename to disambiguate. Signed-off-by: Mario Limonciello --- arch/x86/kernel/amd_nb.c | 2 +- drivers/hwmon/k10temp.c | 2 +- include/linux/pci_ids.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 23dda362dc0f..cf41fd7faad7 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -57,7 +57,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M01H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} }; diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 1d3c8d319941..9e704338230d 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -493,7 +493,7 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, - { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M01H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, {} diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index fb1185155394..b2425a1574c7 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -554,7 +554,7 @@ #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443 -#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M01H_DF_F3 0x1653 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 From patchwork Thu Aug 26 18:40:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12460477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71645C4320A for ; Thu, 26 Aug 2021 18:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DA5160F44 for ; Thu, 26 Aug 2021 18:41:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243319AbhHZSmT (ORCPT ); Thu, 26 Aug 2021 14:42:19 -0400 Received: from mail-dm6nam10on2086.outbound.protection.outlook.com ([40.107.93.86]:29519 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231453AbhHZSmS (ORCPT ); Thu, 26 Aug 2021 14:42:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lTMqXZjklTUMW7lB1aoIHXoqgXe6bnZp1j1WtL8quUBlGUHAStmyiloaHEuz93kUoBX8pW8WlJg1thmOtk04soN/Pca3my4irKmAKEZ1HG3x6Hr7chG6uPDjZr0jerYvSIEokv0FgVYiNyeaNhLwkF/AWCqYSz2inHpr+2B8yzS8T3f2SniizHrPyvmsZbLkOszuSfwAYROM7RIttP8z3ARPAAeFJCRla98wYKsTEHwb6uNMNFkjvB1Hqxl7Tj9Zapf4Q/JRkvpKUTEoPBR7ZuuK+WiILjmx7IKz7/zYqdGTBmvQpoHx4k/jL/R2WlcNTM1e1ZSvtJLX1ggbCi3Tlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nFfYXLL05Vk97KY0DCc14weebU1HHauI/lcgXL+XYdU=; b=Gy/1lj4QybTrV6XiB4D3NEwVfVzXKs76ZJ6v1oc2Ueyj262xj/wRbXoPPvIwcv6UcirfcoQ18plIw/MRApuI9qw3oEOKIFL2uR/gz30vRY4dQqKLQpc6Q3eq89VSl84HOMqEGSPtvylu4pKGGbwggaKvreVPh1J4qLJ6dXjYrHm/ZltQfA9uf29HsPzHLovdcf5hkKf+N1/R7nFALD9iaBzI6sYNlsnwH6j+atovvChsK7LEaUCrjTSdbASoyiflMZ5L/FS+CbPnko+58S4HKXRg8UZBjSxUeS0kOqG2ar+lnYpcbkP/+dLeILxj399HFFchBHeYGYESqXTTPEL3xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nFfYXLL05Vk97KY0DCc14weebU1HHauI/lcgXL+XYdU=; b=5dZfTTEXR0g/vN8N9hmidsKNXTn1NJIMp7uSb/Mte1FY53I9DSFgc/3MbL7++UQ7RJO4y+y5TZQd+uRRu5nwv7nw3920p1K2pag/b0YzqniLZ4PT5M5FkQKYuaPwfbjrNFOADWOwIYXWYUDj6h6TgwYnolSv+mnUN2YlmHu37wc= Authentication-Results: ladisch.de; dkim=none (message not signed) header.d=none;ladisch.de; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) by SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug 2021 18:41:26 +0000 Received: from SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1]) by SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1%4]) with mapi id 15.20.4457.019; Thu, 26 Aug 2021 18:41:26 +0000 From: Mario Limonciello To: Clemens Ladisch Cc: linux-hwmon@vger.kernel.org, Gabriel Craciunescu , Guenter Roeck , Wei Huang , Mario Limonciello Subject: [PATCH 3/6] hwmon: (k10temp): Rework the temperature offset calculation Date: Thu, 26 Aug 2021 13:40:54 -0500 Message-Id: <20210826184057.26428-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826184057.26428-1-mario.limonciello@amd.com> References: <20210826184057.26428-1-mario.limonciello@amd.com> X-ClientProxiedBy: SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) To SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from AUS-LX-MLIMONCI.amd.com (165.204.77.11) by SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20 via Frontend Transport; Thu, 26 Aug 2021 18:41:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d26263eb-b408-4d09-07e5-08d968c11c57 X-MS-TrafficTypeDiagnostic: SA0PR12MB4510: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:324; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oTP/FQXpP9wdOWEDIMWinR/JW2ynjYBBXtLLPUsZ9/0D0/CwfEVoEdUW+YhkBBTWKSHXbwbrxd9JyM0VdQkl/WVszt3rQNjd3YEouCykKIOsH2NUKcbhxbDxrE5WZHhbGcBNYousvnqxOznkcBg5vFSyQ+hf9CEXKbatb2rIdVF4RT+mhaoCBWSAYhcIRRoNLpQJwFyG6YY4JSR/jJm1GyQOheaWaY723IsRhwB5Nmpl/07U4qJlmwLB2yZgiLy+hhwAmEOF/iSb3/GMvo5Lg83NwzB0v6RpMlKPVc/srKCFt5LvsiIMlsbKznrcvJV2wqz4H13POt+VlUHUtXngkcStuI0O5CaUOVmwS6gyZMuWS/PfiY3DFAj8qcVNCBRyruvd7OzPo2Maep4i233cI9ftz38/ZkTadbQxTwByQCAzswBa8JvkAzUWWYCjW5rEqZ03+o5Egh6JDygqQdAQKekUMx+iHuDzXHTYbl1IR+cFhtq5oVaPMsim4qq10HfAbuaebCrdqzr5OiwObMZbj8vYUqZbWTV1RlC4d9MrlEscTouAOF7Z9KNSkqDV4WPAh8Ae3B/s0NX/v8LOrf67qm8kB6zyfq1+GlEMXMHkmZqlYH8cS+Q9xU0pzm0nnlyVd62cskHLa2Ac0q5MkSvwBxw4ybiJQI4LbuKugwaaeT+vKrz68wxyID8v11FNHir6Fq1tNLj559o7RkU6Yh2oUA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4510.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38350700002)(4326008)(38100700002)(1076003)(2906002)(44832011)(508600001)(956004)(5660300002)(66556008)(66476007)(6486002)(54906003)(66946007)(26005)(8676002)(186003)(36756003)(6666004)(2616005)(52116002)(7696005)(6916009)(86362001)(8936002)(316002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6SpNeONdTsBXkIfwDtJKf2n5L8zM5/RL/jTvcf8RveDygRiTKMNjMwA5HU9HtJ0djfgWQFPQuI+RTv3iNE4Axw2thImLITE6L0Tuw5iCJTxWP0F6neWi0XbTKIMbMrULuhilcJpoIvNR6GYfOKgOtgD5io1rZ4BMJr7sHu712mOqTIMkhq0dpy0w3lSHWEuoNlwugoXKdNdSv49Wr4/JOUlCzgrLLGt/SPneRn3/LtaKdgyCv4D1Z8fqcKXuURENwJkBv4Su9zHMQa80IVdb19ukZcnoH5vEgCg+T2S4Geyob1YYoVqkWAi6AVFQOXo5BQ6Nd7s+EuFq6WObkwNpR+YoRFi0l3S2drCvjHk8iDbTPBr4AHk84Phd/BYX+7/9NKR0c5m6w0PRNVEWoonydJBYs2NMTJ3ux8yFMvGsxwCwJcoAZz0/KygrYk2+cMVv3+jAMpeBF6Y7cVvbvdYt/LB1icPJDyPOPxrSvgjy+s82cJN+Ef73qY1XOQt75M9jsmmHW5Dev6uOAddxhPiko18ROH2wFMFzOzKaTIxzORHeTXhQ1wjKqJ9COna/E/dmjOGpjElcrohi4aos30H9UoP+Jd+bQabpr/1X+L+cYLtxu7AysNkZyjEtMUgKf0sAQlQASi89vBW7bicTrWf3cg+qEGSOlXkUgJvlTn1B9uGpZas44AcVjzl1pejJzDBeX0B2r+Gk753otNH76Qq6VY13Rmyp07rrE4tQAMal3xMJQNNOdMy2lvtkpux0ZUkBNaxOkFItXOjGgsVwJc3vscaiqCeeJ6hBinYCrST0zbQCIDKjthVDvcrWHD+/h/Vd98njaEKIl3PSpWo8TXmm0TgfgMWNo+vJ1WJzyXEVYjgM7X8uQdVOdM0dIVDflVvZ6AabNw32sz2hkIKAduOKN3n44+MCKNsnqHNI9rm533j9Spp+4UNbknlufI9SHVGuaZJ46+hW/sGSe5L7pmYqxzWGyp3lV6fIuRKzEOzuGSC7MowwX5H1CkDBBOtVsHiYzXpJVVd8oTFF/eat2HxF738Xw1c3j0vVWW293/pa6SpsjuPIOeJWANnSr41B/Kd9myyPG1y/29/543uyvvLnLiKtFJhHPJNruZewAFy3QgBSqD8S3OgvHrB+IbeXCkohjGjdJwwne99zXkcVEin7ltpy3ghHwbNRZ+1eFTeNBRE2v4djYwplmPij2mfz3b7ZYFJGFnRN4OB9dH8+6XEsUy9L+jJb+V3wc995a+XwfF2jhIrsfflyKpjFx7JanoB73Gx54PenKWdpTHpmbhANAmyJWRLLCDWpZjmh/eLvJfa28rj+wn0Sdi7TX/B1rozg X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d26263eb-b408-4d09-07e5-08d968c11c57 X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4510.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 18:41:26.5776 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +eeii95ZZ+iYBDfTDutFjvwsd9lqW8x6fOtQ8AHtpx1knS3xT8S7FcoNqZ4ax/9/OvCnOj04GkuiZQbvO6bK5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4510 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Some of the existing assumptions made do not scale properly to new silicon in upcoming changes. This commit should cause no functional changes to existing silicon. Signed-off-by: Mario Limonciello --- drivers/hwmon/k10temp.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 9e704338230d..5c1aebf7a56d 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -65,10 +65,11 @@ 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) */ -#define ZEN_REPORTED_TEMP_CTRL_OFFSET 0x00059800 +/* Common for Zen CPU families (Family 17h and 18h and 19h) */ +#define ZEN_REPORTED_TEMP_CTRL_BASE 0x00059800 -#define ZEN_CCD_TEMP(x) (0x00059954 + ((x) * 4)) +#define ZEN_CCD_TEMP(offset, x) (ZEN_REPORTED_TEMP_CTRL_BASE + \ + offset + ((x) * 4)) #define ZEN_CCD_TEMP_VALID BIT(11) #define ZEN_CCD_TEMP_MASK GENMASK(10, 0) @@ -103,6 +104,7 @@ struct k10temp_data { u32 temp_adjust_mask; u32 show_temp; bool is_zen; + u32 ccd_offset; }; #define TCTL_BIT 0 @@ -163,7 +165,7 @@ static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval) static void read_tempreg_nb_zen(struct pci_dev *pdev, u32 *regval) { amd_smn_read(amd_pci_dev_to_node_id(pdev), - ZEN_REPORTED_TEMP_CTRL_OFFSET, regval); + ZEN_REPORTED_TEMP_CTRL_BASE, regval); } static long get_raw_temp(struct k10temp_data *data) @@ -226,7 +228,8 @@ static int k10temp_read_temp(struct device *dev, u32 attr, int channel, break; case 2 ... 9: /* Tccd{1-8} */ amd_smn_read(amd_pci_dev_to_node_id(data->pdev), - ZEN_CCD_TEMP(channel - 2), ®val); + ZEN_CCD_TEMP(data->ccd_offset, channel - 2), + ®val); *val = (regval & ZEN_CCD_TEMP_MASK) * 125 - 49000; break; default: @@ -387,7 +390,7 @@ static void k10temp_get_ccd_support(struct pci_dev *pdev, for (i = 0; i < limit; i++) { amd_smn_read(amd_pci_dev_to_node_id(pdev), - ZEN_CCD_TEMP(i), ®val); + ZEN_CCD_TEMP(data->ccd_offset, i), ®val); if (regval & ZEN_CCD_TEMP_VALID) data->show_temp |= BIT(TCCD_BIT(i)); } @@ -434,12 +437,14 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) case 0x8: /* Zen+ */ case 0x11: /* Zen APU */ case 0x18: /* Zen+ APU */ + data->ccd_offset = 0x154; k10temp_get_ccd_support(pdev, data, 4); break; case 0x31: /* Zen2 Threadripper */ case 0x60: /* Renoir */ case 0x68: /* Lucienne */ case 0x71: /* Zen2 */ + data->ccd_offset = 0x154; k10temp_get_ccd_support(pdev, data, 8); break; } @@ -453,6 +458,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) case 0x0 ... 0x1: /* Zen3 SP3/TR */ case 0x21: /* Zen3 Ryzen Desktop */ case 0x50 ... 0x5f: /* Green Sardine */ + data->ccd_offset = 0x154; k10temp_get_ccd_support(pdev, data, 8); break; } From patchwork Thu Aug 26 18:40:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12460475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E03F8C43216 for ; Thu, 26 Aug 2021 18:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C781461027 for ; Thu, 26 Aug 2021 18:41:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231453AbhHZSmT (ORCPT ); Thu, 26 Aug 2021 14:42:19 -0400 Received: from mail-dm6nam10on2086.outbound.protection.outlook.com ([40.107.93.86]:29519 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243300AbhHZSmS (ORCPT ); Thu, 26 Aug 2021 14:42:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahkXRc+fBC1Oq9Q6Oc8iVIVQ3m2Nlz0rHutix37OiIGCjhwehPbEJ+6g+/gpFKmeBe5J2LHrXAQeuvOA/pIEtT6LCaTr+MEn1vsil7MD+oQQu5QPcDviQuSUnWooKJT8oSa8CKc3s4PTouFwb3/vtzbviStHxc9u1bXojJY9a64eqwunljPlDUaQ3tridf6g6AdrW5LkJQrGTAZ7wS5eXAytTR5j2In8gIIDuS96xql/Srd69CUUjQs38vCm13Kh14VPgkCujU5SFQAbR3nspvQtnVkmvVWOBPw0jRNKvk91uKCYll8EUlUWFtSxQ37260X1tQ4rStXtwBqdgqt0wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0s29EWh1A7DKFEJp42pnzCEfcCIKZEq2ihCqvmnytBg=; b=XkXZfJNiwzofDfpancpZ5zxTkJHPXeWiBXoVJvo1xc5gj8LOVpzow1/STE77jQpwaiA6iLlnIO8kG8hQPi232P1WfkC/bdaotEkKJNJPXAcfZdwVGzhnQ2/MkU63Gwisyrqp4daDnXqRqBNL+c8JDq5Im01eWWwG+8HD1VqFRYB1AULMt8TuO2xmpR8by38BTUWMfkiVfYBqbp92Ns2XlAjriUsSZzdhLSQS4/Zec+1vVpfLRziPNVStPCHnfUhc5NlGI98DYEimXYOTpaPGCGbDxynqChjSCnzmRXuIr36ERCvRnu5MedUutgtoFU75pTuucFXkIlPoNLidB+s0Mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0s29EWh1A7DKFEJp42pnzCEfcCIKZEq2ihCqvmnytBg=; b=opuf5Ednb4ScECEh3ODLEbvGTEU0PgwhXb5Ov52KE1V98ouW0eX/VwRnyRgz8QMuas8pFDnfRTeDIo0Lk9ClSV0LOswuYg56SuJYz2eUu4Ak7kKb7Ie1HWyiWdPHOljk0oAeNy558jz+4U3tBE7YI+sQNI9brXR2lDgTWZQLnJc= Authentication-Results: ladisch.de; dkim=none (message not signed) header.d=none;ladisch.de; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) by SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug 2021 18:41:27 +0000 Received: from SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1]) by SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1%4]) with mapi id 15.20.4457.019; Thu, 26 Aug 2021 18:41:27 +0000 From: Mario Limonciello To: Clemens Ladisch Cc: linux-hwmon@vger.kernel.org, Gabriel Craciunescu , Guenter Roeck , Wei Huang , Mario Limonciello Subject: [PATCH 4/6] hwmon: (k10temp): Show errors failing to read Date: Thu, 26 Aug 2021 13:40:55 -0500 Message-Id: <20210826184057.26428-5-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826184057.26428-1-mario.limonciello@amd.com> References: <20210826184057.26428-1-mario.limonciello@amd.com> X-ClientProxiedBy: SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) To SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from AUS-LX-MLIMONCI.amd.com (165.204.77.11) by SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20 via Frontend Transport; Thu, 26 Aug 2021 18:41:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa91edba-b126-4dc3-9944-08d968c11cf2 X-MS-TrafficTypeDiagnostic: SA0PR12MB4510: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:530; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s0Ig7moQlVY6Kf3G0GK8sECgTqTwvGQTSh1wA6gbpw9k0M08jeGTRTm8EvtxD0KJeFkTQHzZBQXNek8sKEXSDZbDQb6SCp01Rsx01mMt8wJs5C4Be8uxTVI3PsyrQojnmRNtdN3O+sr0FmhwFTUz3/wrS8rnEcPkzFQHm7QZxO84fNYvRDxzEhSEkUPnTKryZ9aP8kCNA4oPLGgMdy+R3DoE2n/yNE88pPCJACar1vIyOWOwKbq9qBaAsCKqcEewBvEIls1/6LfKbNbpA45nK+DiH2UxYaBjmwH1IhRX1BDIkLhPw6WBhEGbY0TP4KzeeUts7i9Z6rsmF0xfp+8dWIEngOTx9MNIcMjMhX90Al+Wd0AX6FWRk91qF7dFBLla6d/kosdo+Y/KN933fLT2KuCeq7hs/sbujYGSstqUi/37Nzlz5kcMj0Sem3IAqa3uoQVSr8WmtbZpIzRQBG/oLns2o4/KVpLPBkOGDpeKEOe1Sym1WkKV65xZp0cWX8bbBBecIMrT9g688m9kslTU3Ki8a1qUQOE1Kwg7tA3ngzXndbpURxcPo5L6rd9BXJxo6onxZN18C7EMr1ZqEX5ZTiJIwb2YwV9zA8wQFEm9qUQyNIZelfTFOcuFaiSFV+zItcVFwqo6iFIQSOwU5RKwEWlDl5jJ4kUBRhVZDyNz3mtrOz5dYEKOofGyZjI2hktRUg/ZQnoajOZaT61eY1Riag== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4510.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38350700002)(4326008)(38100700002)(1076003)(2906002)(44832011)(508600001)(956004)(5660300002)(66556008)(66476007)(6486002)(54906003)(66946007)(26005)(8676002)(186003)(36756003)(6666004)(2616005)(52116002)(7696005)(6916009)(86362001)(8936002)(316002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ycy4nIiPj0GU1pbB5HNaswCxkiTPV1LGFS6wFGh1KRE72rox/VbUMXn/ijpuKlgawDExI5OGkjtnz3Xh51sM9DgXmMnZvL5qKImLSrEB/OstNm2lxG5KRk7l6vbILj1YUqLX2TpXcfcVFpBQ6cqegPitRiikI0t1FKTwQ+7/1lO27OV1jJp5oruOFl5OpetQAKbSWVJHLx3BHE8i8zxHb1Ljb9D6cvGlHdVw6FFx6B88jt3NfTsbq4EJu06cnne4PgEm4Txf1pHjsJwGa2T3DZxCGkWwlZegdz0MmaT8OmbGY2q70FPe7oVEhMaHKvA+8Sc6npXvK5i88HhHdtUL9f2msFTNd09u0egOT7TWx4tYDf194Ia8uDcMPjZy81g+7GAODOs2JOz86y8FbUiK8PnsSAlxulh7a1tjISyazYAxoskQDLw6t5UIchl03+MOF8i6t0gvK9K7OSQ0JDFOpuBNTCafCpOLKLDaYXbt4L0Xi47xMRSUt3A9WNruMlCqe8dyLmPygQtK+osKDCmtuTjuSYoFz990JrJ2LBf4qnt7kAc3ie1U0RwIwGCq6awUXu7gWidxYI+1PJDEQiua28ulyQds5mukF6aPsezThO465cheflj+TkfW2A/Xy+d0Rt1x6nw3Gw91ZcMyfVI5FgSpqVpgTP6eFwYZWKKKmiPH31BeE0aUlhdInRXDv7utNt2iXY/atZ2YDnmnhvDD9YiR4Xuww6Y/M5TBLP6pnFDfCAuagWcNKpU2Qr9jSZ0btBiYdFUhiUmb83mOdRiEMLPKsumIs+WY4zVIC8GJ35G+xDggEJPW0Uh+CyPCq9oV+L8/WJfAZmnFc6G7K/dYoE69cn1naiYj1GC8ye390C3dOPYiyEunnMgEuMqpAkjphuWoklVaHeV4jEgNsvpsFKw4m3M2igpycoBe5c3bJs6H+cpGbWrz76tYTs0cTHBYrQ+/B4EZ0CORParWk+8Ak0ydz6/pVQm57UivsJRPxg6OViz/qKYwnhRaZfEkhHinMKALc2wYSVj39/vttBeEBPfZv3wVP8qEMH/1HH4Y4S6VWr/4l35KLkXvLi1ms5NIyUioierwHnptzu+K71zP/DIk+0c7z64fPFQCnu3t1Z+5xo6VFhxx19VlxLPeNPddJpDy/TeMradTUTWXTWa7t+yDocZMjIFhO5/VxUwfAlNoV9qTP6GEcz1oVj+5GJPois2G8TJvDSC7o1dD+AvDsTqD3yQau2nMX3kSSKmI6stqfSbTHauRlYsDupmM0p21IY6ZHj31wiRmQ1KuLonmjoxjHIfItr7BesL5mCBEN5EtHfOZxhYKEilXMeL5Df5s X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa91edba-b126-4dc3-9944-08d968c11cf2 X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4510.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 18:41:27.4896 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /hZTfJqXipqkHmwvDSIWQmcnuvpjwqfOz6d5fiDXFpCfQdc8OiynF3jpGeErT3+a0wNKaRDicLbH61kLmiz8SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4510 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Enabling Yellow Carp in past commit was initially not working "properly" because extra IDs were needed, but this wasn't obvious because fail values from `amd_smn_read` were ignored. If errors are found, show a kernel warning. Signed-off-by: Mario Limonciello --- drivers/hwmon/k10temp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 5c1aebf7a56d..41d9c0c0a1f1 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -164,8 +164,10 @@ static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval) static void read_tempreg_nb_zen(struct pci_dev *pdev, u32 *regval) { - amd_smn_read(amd_pci_dev_to_node_id(pdev), + int ret = amd_smn_read(amd_pci_dev_to_node_id(pdev), ZEN_REPORTED_TEMP_CTRL_BASE, regval); + if (ret) + dev_warn(&pdev->dev, "failed to read core temperature: %d\n", ret); } static long get_raw_temp(struct k10temp_data *data) @@ -212,6 +214,7 @@ static int k10temp_read_temp(struct device *dev, u32 attr, int channel, { struct k10temp_data *data = dev_get_drvdata(dev); u32 regval; + int ret; switch (attr) { case hwmon_temp_input: @@ -227,10 +230,13 @@ static int k10temp_read_temp(struct device *dev, u32 attr, int channel, *val = 0; break; case 2 ... 9: /* Tccd{1-8} */ - amd_smn_read(amd_pci_dev_to_node_id(data->pdev), + ret = amd_smn_read(amd_pci_dev_to_node_id(data->pdev), ZEN_CCD_TEMP(data->ccd_offset, channel - 2), ®val); - *val = (regval & ZEN_CCD_TEMP_MASK) * 125 - 49000; + if (ret) + dev_warn(dev, "failed to read CCD temperature: %d\n", ret); + else + *val = (regval & ZEN_CCD_TEMP_MASK) * 125 - 49000; break; default: return -EOPNOTSUPP; From patchwork Thu Aug 26 18:40:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12460479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C3C9C43214 for ; Thu, 26 Aug 2021 18:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3E0F60F44 for ; Thu, 26 Aug 2021 18:41:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243342AbhHZSmS (ORCPT ); Thu, 26 Aug 2021 14:42:18 -0400 Received: from mail-bn8nam12on2079.outbound.protection.outlook.com ([40.107.237.79]:56913 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243319AbhHZSmS (ORCPT ); Thu, 26 Aug 2021 14:42:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BDUYcTvwHpbhH4N/lHXW3KF56+ggBIn2anspY4DJrkvjTgdPgV1ermo2ysRDCETukl6BVaxRJKC3ITPXsdx+Zu668T/X+xUVKmnohJXjT/dPgjzL9UNRSUM9yeywrcNYAaj3GDT8e/nX4iB79G+jiVYnDVohwe2+RetfCmfYWMdS2GXXm1lT4V0lD3+sLnmN0wCYw2Qn8aDIlB0NHqrdoLrmdN4EULOBRtRKzOCT8jah3lnDbOqs2Se+3AxpaS6ysr38QI9XytYuw+OwuDeeX+yJtIqGDRFD3jcjo4Jgbe3O4RZ+iRv+aHZ+J+Wx6YL5rwJ8crHmJho4uUs8yKLJKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1/WoGUZPK0oxiyC+WPciXQmn6uT2fiv4no/ddIKwzTo=; b=Ia8rDVvYZuVZ3KUGaJG0if3GZDMZd/1KKHBRZh7gxTj/GfccmqD/gamCTwA9L0T3o89CKdpWbh6B2G5JYbBKbD19Z+IG9oZ2sL+oLdGkCr4JPP4E6BosC2KSzT2g4aTYNPnrbhL7T/9rInel3ObgZo9dTLBTzk+4jhrsY7W8BU7ttMj0dhU8OsBTVmvatkCgCDmZwvLtjarrJtMMWDZTO+lYs4K+AoQGW9riipsBc2SYA0zjlqTL8Ekqi6grDwKzPWtGHzkzS0bwT1F3Kqj9KHDYbtCgW17aFWhXApNIgcXNzl0sNPu2cFxOD1oMpoqjY44Xr8dmtn4LefU2xk9aSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1/WoGUZPK0oxiyC+WPciXQmn6uT2fiv4no/ddIKwzTo=; b=PZtp7XKsnl8Djt1q5CoCpTaKHKjxGtSVNqWA2N/ifElMKqNIRmAwU2TSylM8NNFE2bhh5LALI8lbnbhY2v2idnJMjfYLj/Rb/r+h/ME5KJicIBukybsdNy1glZ1zoVyhURxrVFEoUvO5to7DmDufLVoDwQS5gj8LAkp+zuR+D8s= Authentication-Results: ladisch.de; dkim=none (message not signed) header.d=none;ladisch.de; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) by SN6PR12MB2782.namprd12.prod.outlook.com (2603:10b6:805:73::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug 2021 18:41:28 +0000 Received: from SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1]) by SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1%4]) with mapi id 15.20.4457.019; Thu, 26 Aug 2021 18:41:28 +0000 From: Mario Limonciello To: Clemens Ladisch Cc: linux-hwmon@vger.kernel.org, Gabriel Craciunescu , Guenter Roeck , Wei Huang , Mario Limonciello Subject: [PATCH 5/6] hwmon: (k10temp): Don't show Tdie for all Zen/Zen2/Zen3 CPU/APU Date: Thu, 26 Aug 2021 13:40:56 -0500 Message-Id: <20210826184057.26428-6-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826184057.26428-1-mario.limonciello@amd.com> References: <20210826184057.26428-1-mario.limonciello@amd.com> X-ClientProxiedBy: SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) To SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from AUS-LX-MLIMONCI.amd.com (165.204.77.11) by SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20 via Frontend Transport; Thu, 26 Aug 2021 18:41:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4defc85-c833-4f60-6c97-08d968c11daa X-MS-TrafficTypeDiagnostic: SN6PR12MB2782: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3e0uAOh5KyjUrrgYBiEFrhe82QRD+0B+Oy5QBujV15WYmbF8G6j9Y5Ayg38bJ7NVLTQY0Ius7GUcus5HTBjUIz2hty+5KSv2lrBbuhxLRz/5B+g9i21tlBYRnvevSJdzFJBl4F+/AHvL159X7oOxMIOkBTGYVeyM4K0dTCo1xlrv3quuRK36fkc3krqD5kGebPjlHy3oKmNm+n/etmu8pmFfBjYRzHTn9xPDgZHfVgQZL+vs0dV4p6AXS6/rTj1ruT1KgyLpgsnbqTvvG5Q17DWbldYP6F/qbQ733r6DtU5Fa93zLfTnvbtfhbYmWcNWM36lP2LV3RHherjiQWhul2EPkhfWwmtIAWK/cPHsEvZo6kKErY53gT2yXQ3P2joL0SnQjb9+yCre2dEE5mUSLYKHoC+S8agV41zNqWM2Ov2Uzit7hSCfPRvrKrUvJV56YCjMIR7DCyNifXgQCu5EAF1ZNCOYpSAukl/EHPVmigzuO1vwxKNbjun9jg1xc88CvklimUOQAbzSFG8xaFZWV88J0s8AxxjqShHgBRHGO9yiclgMAf79qrIKqa4t1aFLRi0ah5S5QkTGMIr9PpBYWUYwHJxI5j46P8KBC4HQx4d7VFKmHosMfjavZoaPn1ZkW1g1PyL/BwcxUI99iKTKBGUdN6SrWt8+SylPYT/ezURGRobFTnlJL+hHWckowD2jQhudAedYmfaCjLF5TbA3bA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4510.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(346002)(376002)(396003)(136003)(39860400002)(8676002)(26005)(54906003)(4326008)(38350700002)(186003)(8936002)(6486002)(5660300002)(38100700002)(1076003)(83380400001)(2616005)(956004)(36756003)(316002)(478600001)(66556008)(66946007)(2906002)(66476007)(6916009)(86362001)(6666004)(44832011)(7696005)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J1mcBZDQPim1qBpVVK5kLkMDU02Tzn7da2i0tk2BC4zO+mYDesFxZFaMN9roMLBMDm0va0O3kRwwJIa8XrJ6vtb3WXt9UFDlXco1/fIU6HTATPdGnoOKgZ9lvuQ9zgzRnMWJKmyA+zT2yt2unlLecI8yIHd7tTSjiRZFmDTN6fHLYotiUVU6+sxSt7rGY9hTmysayjUeoTBBtrul40GuFB8/F1PVjVoobLcUqczkCaKJSb4eF2a+H4q9zrGEcvApcJIzaZcibOayrfCKeb2P1OIOUCJY7RpZN7p5k3eaj4uQ/s10POmLwTMY5APWn/3pZlV50wJmWMYHf6UCK98uQYhhlHRFkrZCoQI2ax5e+Ixs7vR55rL4TGMgam4gefswV/8L62RYAjOg8lk9cH2VRskJscGXxTrliv2jNt4dgijKMckanIdBdvjRrbBifYWYQGMUhYoDQF73uWtlWTcPC1ARVAEe38guDniGvMyoJ2+MWpka8EWJGYV/EVxgvHtx/9LAj7YPQ54crS0XqtF96WNkDysPq9vZagdFxJ/sFzkmbdOPjG2A4q8y/OcypEFV2DyzFgDJdBpe2DhBlnDrOzlkCX6ywVvIbsVDiSLNqexRb1iV9FapQXWZefGP74LDy4ZlxuSPbdvTMuefl81s9FBQUKvURCE+EVIO58SfBi+8J8tNM+VtYN2hrCXCuVmLCor894nRdNhE4YBqRjOrwR59lbefGPc8kNR+06lpISAnN5dfr09GiYUGTMTSe7x+/ysrMkqiGXZISaq3G2Bh1aCMx/KDDWMVTZgX/g7EkT81cgl/CH1AcX4UmhEQMIr3n025Y0oaLD1gWBhODJgBVS0Mm72ta1LLJ/Ec1up/B6Jf5TbxUY+J+JEFzwKGJTmXCNDqyiO13jB5oCgfUNwa41cbZYPFX/cJ+8if8DO9p1KXGO9dgM55i0ZgG0c2OQvfV4tP9A8Ku5n0J1xBQos2ApVY14wXt6SggxBR+VJSPhD+cRUUaVGAEfNvdA5vCXBSU3VEggL3KvZ5Ur+UWNz1xiZCusX9kU0hJLbueOpiul6l3hSHsYJARBaSAZqa4+Xns2lLvt3nSkovQDkQ9ShreGbHukrYhe4nY3w/7aiT2//AJhuwlYlEqBy/FIoBrpqtY1caUh4hoHTEusCZeNGYZxfAgpTMTJ6Y5LdgKXiryCepZc95obIZHT1LqQ/cqT59frAwD79bKL1cboZrgmYmEk+LBdDlnS2NYanqixTF7wyEbEdlQ6zC7MrP9jglwkFdWfiaYKYSpaGHAwAuvzkptepPdSXVTEqsOVLXJv/nW3ZTqC3F8LCexQ2sl+q84rV8 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4defc85-c833-4f60-6c97-08d968c11daa X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4510.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 18:41:28.6784 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GHYGVa5tH15HPDxUp9RWWI70DwrBAWsTk88bQ4i48pUn1nBl3tJd0cIXiXaWDyTcFMP8Npn+aNgiAKG8x8hUig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2782 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Tdie is an offset calculation that should only be shown when temp_offset is actually put into a table. This is useless to show for all CPU/APU. Show it only when necessary. Signed-off-by: Mario Limonciello --- drivers/hwmon/k10temp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 41d9c0c0a1f1..e8ec0e36fc3b 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -435,7 +435,6 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) } else if (boot_cpu_data.x86 == 0x17 || boot_cpu_data.x86 == 0x18) { data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK; data->read_tempreg = read_tempreg_nb_zen; - data->show_temp |= BIT(TDIE_BIT); /* show Tdie */ data->is_zen = true; switch (boot_cpu_data.x86_model) { @@ -457,7 +456,6 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) } else if (boot_cpu_data.x86 == 0x19) { data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK; data->read_tempreg = read_tempreg_nb_zen; - data->show_temp |= BIT(TDIE_BIT); data->is_zen = true; switch (boot_cpu_data.x86_model) { @@ -478,6 +476,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (boot_cpu_data.x86 == entry->model && strstr(boot_cpu_data.x86_model_id, entry->id)) { + data->show_temp |= BIT(TDIE_BIT); /* show Tdie */ data->temp_offset = entry->offset; break; } From patchwork Thu Aug 26 18:40:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12460481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DE83C00143 for ; Thu, 26 Aug 2021 18:41:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44DB560F44 for ; Thu, 26 Aug 2021 18:41:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243300AbhHZSmU (ORCPT ); Thu, 26 Aug 2021 14:42:20 -0400 Received: from mail-mw2nam08on2061.outbound.protection.outlook.com ([40.107.101.61]:41761 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243337AbhHZSmS (ORCPT ); Thu, 26 Aug 2021 14:42:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iER21YlpHvxBG4jPaIkhhJvqA86KKqz9ysCTm1gI0yyUsdhvc47s7sBwfQofpoM+icxBOrjL45YNH00RQS2xxI8FGE4lVlaICGfRYSWsX9652Y3mjMyjJAUB59xrjlTEEKja1Rw45FVLj4L4+6UZ60Zj2RWH3ChGURj9sObnQZORWX6Tki8EAcUKYd32byPk3Z/EUPYD31Leow0qQj/413m1xKU9SzgeEoOOCJ5QBsxdpPNVWOdlNaP7ZN6Zgbg5QM8XuhMehiQ3GvyJdnRls8OJpvm4sbYQExBZZ6Oj22WoL0j+WYng588viUFOmGT9he3llAQWoAlbdLNN6W+/OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1VY4KglMCpRkjs0EZ/60pt0Jw7v0If1JVhni+Y2qRnY=; b=RyLeRTndYjL76KOusDQ4ZLvwTQVi0Nm4IjYPwUmzpQnadBLFEdpef1XT9/lbTjQmSRqk5mOSCjTXfk+zYVLNAJs940860k2ExKyifMWf3eqOw9WPdC+hu1HIJPewnAXl7bDwLawl3YLHMIoUPSSvFrb5eG47jMKHsC/CjVUg9n/7OJGxN4hvttPMYtBiwzmFzTlSPZXpNrYpo42Ya4OM4bxzqlFxgBVeek+taywJylU3z+ED/KxGNyA/1wCdhCnUHwxXbIRRcvmSeN0LSV7P3W41qYB6d4RELmSM8qUIFE+UP3jgo78eZM8TnzyWGGpZbtL6qcfz+jPymgK0+7khbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1VY4KglMCpRkjs0EZ/60pt0Jw7v0If1JVhni+Y2qRnY=; b=W+X23zdnA6XOI00yA2cUv1BAMbiRAvEjx4VrKTXYR5ku2y4Ww0FL4dyFCbWLyLgApu5v827nKE8woZM+Sf5S604TIgYcQY7L0/4Fd98+1NSgHl1fW139ZslqjKdvgFgJfXbGu/Lvh3Urt7S/3+bkGc6Pbs4njVnbXnse2rDfNso= Authentication-Results: ladisch.de; dkim=none (message not signed) header.d=none;ladisch.de; dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) by SA0PR12MB4573.namprd12.prod.outlook.com (2603:10b6:806:9c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug 2021 18:41:29 +0000 Received: from SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1]) by SA0PR12MB4510.namprd12.prod.outlook.com ([fe80::f909:b733:33ff:e3b1%4]) with mapi id 15.20.4457.019; Thu, 26 Aug 2021 18:41:29 +0000 From: Mario Limonciello To: Clemens Ladisch Cc: linux-hwmon@vger.kernel.org, Gabriel Craciunescu , Guenter Roeck , Wei Huang , Mario Limonciello Subject: [PATCH 6/6] hwmon: (k10temp): Add support for yellow carp Date: Thu, 26 Aug 2021 13:40:57 -0500 Message-Id: <20210826184057.26428-7-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826184057.26428-1-mario.limonciello@amd.com> References: <20210826184057.26428-1-mario.limonciello@amd.com> X-ClientProxiedBy: SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) To SA0PR12MB4510.namprd12.prod.outlook.com (2603:10b6:806:94::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from AUS-LX-MLIMONCI.amd.com (165.204.77.11) by SA9P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:806:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20 via Frontend Transport; Thu, 26 Aug 2021 18:41:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f2c841fe-c73d-4c2a-24e3-08d968c11e46 X-MS-TrafficTypeDiagnostic: SA0PR12MB4573: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IFGDgiauooKOKZxWZoQ6ebghKLaQ7Oh6XglJaCxM4TrHV16J4VFMGCkb3dHx0/ckN1wQOt8yKx/9/LeJDKKQubuJ8sK5s9x5VL/TJVesv16sCMiRpCgw1PiKP9ervZzp4vejB3TAF9IPSOiZ8GtypmZgsYu8paEPJILsooZcPrllWTsy8DvBVKt1k+tKVCqTFaGhWNB6mzdIIml4g6riGQmzcJcgRbdj7oinsY3cT6JK92iFDxnAy7toZtYr2z9atYmgXPdZrIaOf+uqRBUbi7FP1xGtt8ZFz3kg4pSsRZBr6qK9V9Hb1omhvvArNqGt4ua2BUCl/mKNHcpu/Y/5HAEXtmLXkaKPP0pF5smCrV/maeo9fMxR35aeORLth577258nV24uPYRE35UYP+7ObzQFN+I4dCH04ygLRoM+0Q3NEnRPfzyE0GOQH1m22gNGhhy17oNb2DRN4C1EXihhO3wX5IsvxLDhy5Xbb8oitebBmvFnawQ+rK3PBoEm/aPP4ph2BhrY0HIuZJF7mFhw792jmDWgKyPC0NKWkywoW17NGL7CHz5flSXkWTHjUSk7oy28w3zydbJrN8Kqfgb+shFMwQwnSSfeG5bex+rb6pzNo58KLIa6/D7VPVLa2zrRIjay1RZkLFnGHxQRCNE8Cn0kJ9btLlW2Kx2s1/Q3PAopParmGOK8LNUeT2pnNRg4RzoujpYGMHFDwOFH/0sn6w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4510.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(396003)(136003)(366004)(346002)(376002)(36756003)(38350700002)(66556008)(5660300002)(38100700002)(66946007)(6916009)(66476007)(8936002)(478600001)(86362001)(2906002)(4326008)(956004)(26005)(6486002)(186003)(7696005)(54906003)(52116002)(1076003)(316002)(83380400001)(2616005)(6666004)(8676002)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WsbVOgGbe1+y+v0snU+esjTCXnSW7Hjrt4Tm4WFPLunUJwb4pLXORP+brmDBFON0tJ4eHcOW0akQpJ79TwmaMR8k0ynMvZ7XBAlh6Mc3xJdtGjFAjnp468QrecPRU6koe0og7+54Gwi09+e3I1inqVi2BGXca/zei1+j/WRDx+vuQwXIGd4mzOX8iyjnvRe6zcksRg4Qmz9nesAu5lkZ0yViFWZGu5pxJ+TxUPTa3ZJd6LSPjEOb5q1JUzZKAPlvRFpM91gXSbjJjCfFLPg0t4WVbm143BPmTuW1c0NmeUjSs0EjEyH7XUF8cqT1A5cR6b0Vcq5g8PJ1aXbzzsffjScDp6k3ekcKPxlCbXkIsctev8A1wzhOmDgYEzp/HaQ36ATAR3wpnaQb45unsuhBlJtvwK6j0lijvzI4zqX0PrG8oYCw2CEfzb5AdAkgjEau+3dXb2dvgjSlyQpaxz35fRGYUEYHvA9u6aPU0ikb1TR3v+2ctGD+R/vVTEL3IGc3Byor5fcmj3eOxPTephC0h4HmoGD4ml/x7ryTwFDqGLyKyj+8G36HYSZOliP3VuvrHccfqshAOsCvIadS2Y7tvp1htjrrw/IxFh9DS0qvZbW6H1afMvwLIE3KJDrh4W3iXkC0i9R2yX9Ap0sv1Ic/yHJL6ipV7mnyX8KtrjXVGp0bpnm3XzMz6h+2aaD0ExLJvPUYsLV6RHIgoTLqc9JsF9D0mNZmirBghY/T+5LBQa98mdF6fEXsujbvpljUuIiEDt+ktVy51mT72wFBiFBpo1ssYm890wTMgP5T8ZTBGxtW885Xwoo180N+jZa9JbMAVUDQj+p39HUpwtXA8EZ8VIsYi7Y0zXfrJ/Ma9Q3c3wtgiwvrDl8D6miEbiPl6aeKbvrx8tBJNAj0DVjkYPLar3pSaKoXWpKRWtSQGfJNB5PQHQgcnonfQdPn4DUqRpxwJe/oFKRHPAxqHSeZcOn0qWVhnMowCPoVaNQvxQs3ukWamms1LVexj/5Rg8dF4NrxX0lKiaOEISknSv/vW9Fs/KIDSyv52p/EcD0p65Cl/kllGFMzc7Rj/1RE7YV4nY5xiuxbUggcTmK+kJH+P6bgzbZNQPanVPvJi9SKacAhtj0dufpwzzIt8iqxXUdksG8LrB5qTfEhOwijneDtOz89RHCsuuJ+WSr0nCIAVbJeCV9Q2Gsgnty0WuB+WvIsz5dDaT9FDKVlSY6RSc/IuCiEO2YGYAqfgihFsFaF22HTFVf/4pzUGr9LHX6ppIduCDFGiKJNsE/ElLltzE5/BCkS4pPDEH6NNrzGmZOBLx4v7osj8muUn6K+Krox2Ez/DGBk X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2c841fe-c73d-4c2a-24e3-08d968c11e46 X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4510.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 18:41:29.7228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wCZMjsG3bNm2lZO8ANL+j6s4kvowb8e2D5/KpSXGFAmjlDM2NT1M9WkGpD9Zdb7/QLb5gom2l/4B8nkUF/PDfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4573 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Yellow carp matches same behavior as green sardine and other Zen3 products, but have different CCD offsets. Signed-off-by: Mario Limonciello --- arch/x86/kernel/amd_nb.c | 5 +++++ drivers/hwmon/k10temp.c | 5 +++++ include/linux/pci_ids.h | 1 + 3 files changed, 11 insertions(+) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index cf41fd7faad7..ba768fe1d0ae 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -24,7 +24,9 @@ #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444 +#define PCI_DEVICE_ID_AMD_19H_M40H_ROOT 0x14b5 #define PCI_DEVICE_ID_AMD_19H_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e /* Protect the PCI config register pairs used for SMN and DF indirect access. */ @@ -37,6 +39,7 @@ static const struct pci_device_id amd_root_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) }, {} }; @@ -58,6 +61,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M01H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} }; @@ -74,6 +78,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) }, {} diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index e8ec0e36fc3b..cd3d30b6237c 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -465,6 +465,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) data->ccd_offset = 0x154; k10temp_get_ccd_support(pdev, data, 8); break; + case 0x40 ... 0x4f: /* Yellow Carp */ + data->ccd_offset = 0x300; + k10temp_get_ccd_support(pdev, data, 8); + break; } } else { data->read_htcreg = read_htcreg_pci; @@ -505,6 +509,7 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M01H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, {} diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b2425a1574c7..f84ffa154db1 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -555,6 +555,7 @@ #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443 #define PCI_DEVICE_ID_AMD_19H_M01H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000