From patchwork Fri Nov 2 18:11:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10665977 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB6BC17DF for ; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 971A42C586 for ; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 953932C59E; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 398332C586 for ; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728230AbeKCDTL (ORCPT ); Fri, 2 Nov 2018 23:19:11 -0400 Received: from mail-eopbgr700066.outbound.protection.outlook.com ([40.107.70.66]:51469 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726700AbeKCDTL (ORCPT ); Fri, 2 Nov 2018 23:19:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xplz2xb40fRxhyTMIJzBed1Axyo8cX5rku9Q0s3T45k=; b=FUYqyKCTZRqPSDe/A+njdTo4M694Tid5L5WJfGiLEzuaGlIrXUPsxJlTaghJqYGRH66mA8LJR/TMe2Jt68sxKp7Qcj09QkiYRWUmikrblpv/C14hMAhHezSb8VufaIXYtTwHN+IivELB2OBkInUqtRaM376Oz7atwFUk+dCk4T4= Received: from CY4PR12MB1768.namprd12.prod.outlook.com (10.175.63.10) by CY4PR12MB1206.namprd12.prod.outlook.com (10.168.166.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 2 Nov 2018 18:11:05 +0000 Received: from CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3]) by CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3%7]) with mapi id 15.20.1273.030; Fri, 2 Nov 2018 18:11:05 +0000 From: "Woods, Brian" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , Clemens Ladisch , Jean Delvare , Guenter Roeck , Bjorn Helgaas , "Woods, Brian" , Pu Wen , Jia Zhang , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH 1/4] k10temp: x86/amd_nb: consolidate shared device IDs Thread-Topic: [PATCH 1/4] k10temp: x86/amd_nb: consolidate shared device IDs Thread-Index: AQHUctdrYU+Nz/5370upCwoxAigLkg== Date: Fri, 2 Nov 2018 18:11:04 +0000 Message-ID: <20181102181055.130531-2-brian.woods@amd.com> References: <20181102181055.130531-1-brian.woods@amd.com> In-Reply-To: <20181102181055.130531-1-brian.woods@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0401CA0038.namprd04.prod.outlook.com (2603:10b6:803:2a::24) To CY4PR12MB1768.namprd12.prod.outlook.com (2603:10b6:903:122::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Woods@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR12MB1206;20:cNuJfhfHO23lkE7ng8Cp0d7uulO9S/hMo9nIEIzsftEpuQdXLyLfNymCe1eXwoC6GiNRdFspLvFmA5s8M2p+0f49ZeyCyDXRaKcmCXkLFOJlzkE0hHozbSYEG/m3qXzBHywoZZrIxBclMdHxnnh+6pDH1Afr1gxykpwQpcjfzjzj9ra9QznbhMm1y63+pHcpbKKfQBndQW9PrzpG3e26XNku+/UDPqxBVceoJEW/TnHgjIIgoifeBmfQvuDSX2HS x-ms-office365-filtering-correlation-id: d4b24866-d349-4739-fd77-08d640ee8d99 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:CY4PR12MB1206; x-ms-traffictypediagnostic: CY4PR12MB1206: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823302103)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:CY4PR12MB1206;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1206; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(396003)(346002)(39860400002)(366004)(136003)(189003)(199004)(7736002)(11346002)(2900100001)(478600001)(36756003)(6116002)(1076002)(316002)(3846002)(105586002)(106356001)(2906002)(25786009)(486006)(97736004)(71190400001)(6512007)(71200400001)(14444005)(110136005)(256004)(6486002)(6436002)(99286004)(7416002)(386003)(53936002)(26005)(66066001)(6506007)(186003)(8936002)(5660300001)(86362001)(575784001)(72206003)(81166006)(81156014)(102836004)(305945005)(476003)(446003)(2616005)(68736007)(2501003)(14454004)(2201001)(8676002)(52116002)(76176011)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1206;H:CY4PR12MB1768.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: VTQDVgOopunR8sEc1sZJ3dshHeeE2pV7iC3Arh1qEOoPPPC6gW1pa6Ab355k+ubPe4Too3x4RUobDtrCLEf3m9gMBVn0aKkB9cFq1HIg6tbAbQIxN0eRR+2+dQ1T9Ar2AL/xoEgX80UpZ8/RJp5/+cQBBgabXdwjqqQLPYEu4XzJO2zfeDGMhF9oy7bziFgTs0hemnwqR2T1cs99KYvVwjtXs6yRElt/g+xtSpVdO7uQerj7QsOh1ywAacP/zxVImzt0r2B/Hc9VdU7/k6AlhYsYO6H4KBdpZySMwg8MjocA4qIa+c/zzyzPvUKewxVS4XjyVLL1VEkdHSbQK3sexRtrzK4H3OQCLPf82WwZ/Bk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4b24866-d349-4739-fd77-08d640ee8d99 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 18:11:05.1889 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1206 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Consolidate shared PCI_DEVICE_IDs that were scattered through k10temp and amd_nb, and move them into pci_ids. Signed-off-by: Brian Woods Acked-by: Guenter Roeck --- arch/x86/kernel/amd_nb.c | 3 +-- drivers/hwmon/k10temp.c | 9 +-------- include/linux/pci_ids.h | 2 ++ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index a6eca647bc76..19d489ee2b1e 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -11,13 +11,12 @@ #include #include #include +#include #include #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 -#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463 #define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464 -#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec /* Protect the PCI config register pairs used for SMN and DF indirect access. */ diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 2cef0c37ff6f..bc6871c8dd4e 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -41,14 +42,6 @@ static DEFINE_MUTEX(nb_smu_ind_mutex); #define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3 #endif -#ifndef PCI_DEVICE_ID_AMD_17H_DF_F3 -#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463 -#endif - -#ifndef PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 -#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb -#endif - /* CPUID function 0x80000001, ebx */ #define CPUID_PKGTYPE_MASK 0xf0000000 #define CPUID_PKGTYPE_F 0x00000000 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 69f0abe1ba1a..78d5cd29778a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -545,6 +545,8 @@ #define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534 #define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583 #define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584 +#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463 +#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 From patchwork Fri Nov 2 18:11:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10665991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11EAD17D5 for ; Fri, 2 Nov 2018 18:11:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFC572C5C2 for ; Fri, 2 Nov 2018 18:11:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E40112C3DE; Fri, 2 Nov 2018 18:11:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 774FC2C5BB for ; Fri, 2 Nov 2018 18:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbeKCDTx (ORCPT ); Fri, 2 Nov 2018 23:19:53 -0400 Received: from mail-eopbgr700058.outbound.protection.outlook.com ([40.107.70.58]:45306 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726700AbeKCDTx (ORCPT ); Fri, 2 Nov 2018 23:19:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f8KSgUj3RZEGAo3s4qpZEgCQxc2isj3LSqvTvBxnIJ4=; b=c0F10zVIAq0CKaCA7o3w1LX3q3kZNy2Y6ICnATEI6yfgRbY8x8bc2RdeciHCB6yoWwG3zltveDw9KSddvlTm4itNa6Z8y+ReaZam9A8HRiZE+nhJsUfrK43LGxfwHogxls4wV9uUEkRM6tWrM0yWMEPv6UdIlsAv5QwYYB0C3Xs= Received: from CY4PR12MB1768.namprd12.prod.outlook.com (10.175.63.10) by CY4PR12MB1206.namprd12.prod.outlook.com (10.168.166.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 2 Nov 2018 18:11:08 +0000 Received: from CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3]) by CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3%7]) with mapi id 15.20.1273.030; Fri, 2 Nov 2018 18:11:08 +0000 From: "Woods, Brian" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , Clemens Ladisch , Jean Delvare , Guenter Roeck , Bjorn Helgaas , "Woods, Brian" , Pu Wen , Jia Zhang , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH 2/4] x86/amd_nb: add support for newer PCI topologies Thread-Topic: [PATCH 2/4] x86/amd_nb: add support for newer PCI topologies Thread-Index: AQHUctdtTs18UoG4rUKlKIFT94W0kg== Date: Fri, 2 Nov 2018 18:11:07 +0000 Message-ID: <20181102181055.130531-3-brian.woods@amd.com> References: <20181102181055.130531-1-brian.woods@amd.com> In-Reply-To: <20181102181055.130531-1-brian.woods@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0401CA0038.namprd04.prod.outlook.com (2603:10b6:803:2a::24) To CY4PR12MB1768.namprd12.prod.outlook.com (2603:10b6:903:122::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Woods@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR12MB1206;20:th85HpMH72oODDGkTeNSz6RWR3Ndn43S22dWNHausqAMP0NCpblX2nqsf7fg+uheHM8nHwg4j+lUAZJKSXNLLe+U2dx7R/BOJ1c04llKC3vqrbgcxAQnS42OssBVOsq0krdvxwnRANwnEcz+mdXgxN8HbQIEB/gv+Ef/9utKu68aPfj+UbW4UH2y3CcFza74RZdh+bpd8GHe3oXzZbmAfQx1fkRNaUUQHFhbEpgzULVYuBXkG9aTJg/Ie+XCsh1S x-ms-office365-filtering-correlation-id: c335a382-1385-42d8-21c3-08d640ee8fa4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:CY4PR12MB1206; x-ms-traffictypediagnostic: CY4PR12MB1206: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823302103)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:CY4PR12MB1206;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1206; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(396003)(346002)(39860400002)(366004)(136003)(189003)(199004)(7736002)(11346002)(2900100001)(478600001)(36756003)(6116002)(1076002)(316002)(3846002)(105586002)(106356001)(2906002)(25786009)(486006)(97736004)(71190400001)(6512007)(71200400001)(110136005)(256004)(6486002)(6436002)(99286004)(7416002)(386003)(53936002)(26005)(66066001)(6506007)(186003)(8936002)(5660300001)(86362001)(575784001)(72206003)(81166006)(81156014)(102836004)(305945005)(476003)(446003)(2616005)(68736007)(2501003)(14454004)(2201001)(8676002)(52116002)(76176011)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1206;H:CY4PR12MB1768.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: yI8yxhHEO9O1mXF99OMMDn8d66EEjQ4cTAhBtamMhwtKJj5iq28QzPqs3cNPvAqJHQoUH9YwnsvIR5QmvEYvNDgePfXdR7BCFYP+pZEe1yAPiuoCHwTwl5s/FPvrnRJUx17fRHdFT1bWrYJshdlKjs+XXN78wCi33VTuhVZ/cBRLzLtsLaUzicFmLshGvgYL4bRhdzlRx+polthOwc3jg/hAblEDbZyIqpHViz5PiZUa07rrqiaowpt0aELrEgACBzwC1lDqDSprQ8MdEQaEelHBb6Gqk3momhLrqXmRP/T7Vr3pVmOLwE/qy74KkXwrbcrAmDsVPIyo5IJcGfuFaM+4wxjhti7ntQMeB0uFBPY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c335a382-1385-42d8-21c3-08d640ee8fa4 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 18:11:07.9858 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1206 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for new processors which have multiple PCI root complexes per data fabric/SMN interface. The interfaces per root complex are redundant and should be skipped. This makes sure the DF/SMN interfaces get accessed via the correct root complex. Ex: DF/SMN 0 -> 60 40 20 00 DF/SMN 1 -> e0 c0 a0 80 Signed-off-by: Brian Woods --- arch/x86/kernel/amd_nb.c | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 19d489ee2b1e..c0bf26aeb7c3 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -213,7 +213,10 @@ int amd_cache_northbridges(void) const struct pci_device_id *root_ids = amd_root_ids; struct pci_dev *root, *misc, *link; struct amd_northbridge *nb; - u16 i = 0; + u16 roots_per_misc = 0; + u16 misc_count = 0; + u16 root_count = 0; + u16 i, j; if (amd_northbridges.num) return 0; @@ -226,26 +229,52 @@ int amd_cache_northbridges(void) misc = NULL; while ((misc = next_northbridge(misc, misc_ids)) != NULL) - i++; + misc_count++; - if (!i) + root = NULL; + while ((root = next_northbridge(root, root_ids)) != NULL) + root_count++; + + if (!misc_count) return -ENODEV; - nb = kcalloc(i, sizeof(struct amd_northbridge), GFP_KERNEL); + if (root_count) { + roots_per_misc = root_count / misc_count; + + /* + * There should be _exactly_ N roots for each DF/SMN + * interface. + */ + if (!roots_per_misc || (root_count % roots_per_misc)) { + pr_info("Unsupported AMD DF/PCI configuration found\n"); + return -ENODEV; + } + } + + nb = kcalloc(misc_count, sizeof(struct amd_northbridge), GFP_KERNEL); if (!nb) return -ENOMEM; amd_northbridges.nb = nb; - amd_northbridges.num = i; + amd_northbridges.num = misc_count; link = misc = root = NULL; - for (i = 0; i != amd_northbridges.num; i++) { + for (i = 0; i < amd_northbridges.num; i++) { node_to_amd_nb(i)->root = root = next_northbridge(root, root_ids); node_to_amd_nb(i)->misc = misc = next_northbridge(misc, misc_ids); node_to_amd_nb(i)->link = link = next_northbridge(link, link_ids); + + /* + * If there are more root devices than data fabric/SMN, + * interfaces, then the root devices per DF/SMN + * interface are redundant and N-1 should be skipped so + * they aren't mapped incorrectly. + */ + for (j = 1; j < roots_per_misc; j++) + root = next_northbridge(root, root_ids); } if (amd_gart_present()) From patchwork Fri Nov 2 18:11:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10665981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DBAE01751 for ; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5D2D2C591 for ; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9ABF2C59F; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9C72C58A for ; Fri, 2 Nov 2018 18:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728252AbeKCDTR (ORCPT ); Fri, 2 Nov 2018 23:19:17 -0400 Received: from mail-co1nam03on0084.outbound.protection.outlook.com ([104.47.40.84]:8240 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728147AbeKCDTQ (ORCPT ); Fri, 2 Nov 2018 23:19:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GyRxT5+Ut1HFiT5hDzzpXKkNu9f9fdINR0dKlOEWchU=; b=EHiz9VTP4ye3Ji4P7/KfNqymObQ5NAdbBxXCVqsaZHQGoiuABywfphh9QDfxMEjV2ys7mDcaIGvgdp3hJyKMJSjgrKem4xm4dIhK9MLSTpjXxdGPH8pG44RiuVYheGF7hRax4Q1/yesnDJKy6lV4r8b0fBUwEujWWYipwx8vpQo= Received: from CY4PR12MB1768.namprd12.prod.outlook.com (10.175.63.10) by CY4PR12MB1894.namprd12.prod.outlook.com (10.175.82.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Fri, 2 Nov 2018 18:11:10 +0000 Received: from CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3]) by CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3%7]) with mapi id 15.20.1273.030; Fri, 2 Nov 2018 18:11:10 +0000 From: "Woods, Brian" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , Clemens Ladisch , Jean Delvare , Guenter Roeck , Bjorn Helgaas , "Woods, Brian" , Pu Wen , Jia Zhang , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH 3/4] x86/amd_nb: add PCI device IDs for F17h M30h Thread-Topic: [PATCH 3/4] x86/amd_nb: add PCI device IDs for F17h M30h Thread-Index: AQHUctduPkJIQryqhkuDE4Q3WPgFfg== Date: Fri, 2 Nov 2018 18:11:10 +0000 Message-ID: <20181102181055.130531-4-brian.woods@amd.com> References: <20181102181055.130531-1-brian.woods@amd.com> In-Reply-To: <20181102181055.130531-1-brian.woods@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0401CA0038.namprd04.prod.outlook.com (2603:10b6:803:2a::24) To CY4PR12MB1768.namprd12.prod.outlook.com (2603:10b6:903:122::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Woods@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR12MB1894;20:wJhcN7BLUhp9TjegHG0zx8lWu2EzdCMPXSNbcr7DUbIP3hrlSy8hkQtZ3k9FYhtzR60Um6zzuy/NURfL8/Cemkz4OpaqLMxqbufWVw/cNW1NpMCHEs101wCUyRUEX7nN+6gDrH2cJ5yCV8AKb1JZZZSnIVn7a5BYzHfHdVtfQsWCuo0paKFUoMfwQ2gS0H25T1IGxYWAb9asyc/CzfvqPIyTpmBVMAZxQf+l73PtkbP9Y1LuNL6wUATJycs1TZnM x-ms-office365-filtering-correlation-id: 34b7e6f7-a87a-43a3-8834-08d640ee910e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:CY4PR12MB1894; x-ms-traffictypediagnostic: CY4PR12MB1894: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823302103)(3231382)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:CY4PR12MB1894;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1894; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(136003)(39860400002)(396003)(376002)(189003)(199004)(6486002)(72206003)(6512007)(6436002)(7416002)(14444005)(2906002)(25786009)(478600001)(105586002)(99286004)(52116002)(106356001)(14454004)(2900100001)(66066001)(7736002)(305945005)(97736004)(36756003)(53936002)(8936002)(81166006)(8676002)(486006)(186003)(2501003)(476003)(110136005)(2201001)(81156014)(316002)(3846002)(86362001)(11346002)(2616005)(102836004)(1076002)(71190400001)(76176011)(71200400001)(256004)(5660300001)(386003)(26005)(68736007)(6116002)(575784001)(446003)(6506007)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1894;H:CY4PR12MB1768.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ksNOVsMlZcSZb5mhLWD8RWUwF2A2jtU1C1qBL9+MvcOXWwV9DN3dQGe7Tgw+hS0kkJAN+oh617ScJNVSEQgO+cOYCRmunvrmORMjGIBFKgh/uiZOr65PFF/fI2BwYITq39bQFdnsBCUkX2OsIHRc+yAIt289UMH0AwhXgFPkUK/RThSLllRcChrSV31l3r5eh9FL01AvVG5zz+phPT2WB3OUd5T0uBwW9AxWYxMaB7asSeTgF6H+gNFbmt3gcs+o6OujXv7Dcmv6ptFSzhs+yMWHmhO8etu7RFOBBsu12wHtQ4BJ7M0t6LGc4RLUcawZiwAgcr6A8IIJc2nyHPFEIeazm4eQBzMwM0b9LH8IqRQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34b7e6f7-a87a-43a3-8834-08d640ee910e X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 18:11:10.4234 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1894 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the PCI device IDs for family 17h model 30h, since they are needed for accessing various registers via the data fabric/SMN interface. Signed-off-by: Brian Woods --- arch/x86/kernel/amd_nb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index c0bf26aeb7c3..fd69067f6eb1 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -16,8 +16,11 @@ #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 +#define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 +#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493 #define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec +#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494 /* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX(smn_mutex); @@ -27,9 +30,11 @@ static u32 *flush_words; static const struct pci_device_id amd_root_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_ROOT) }, { 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) }, {} }; + #define PCI_DEVICE_ID_AMD_CNB17H_F4 0x1704 const struct pci_device_id amd_nb_misc_ids[] = { @@ -43,6 +48,7 @@ const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, {} }; @@ -56,6 +62,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) }, {} }; From patchwork Fri Nov 2 18:11:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Woods, Brian" X-Patchwork-Id: 10665987 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1354C17DF for ; Fri, 2 Nov 2018 18:11:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1D2D2C59B for ; Fri, 2 Nov 2018 18:11:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFB942C5AE; Fri, 2 Nov 2018 18:11:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93EF92C59D for ; Fri, 2 Nov 2018 18:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728287AbeKCDTU (ORCPT ); Fri, 2 Nov 2018 23:19:20 -0400 Received: from mail-co1nam03on0048.outbound.protection.outlook.com ([104.47.40.48]:30688 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728253AbeKCDTT (ORCPT ); Fri, 2 Nov 2018 23:19:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ohxu2yfwSMB+os+T+W3jYLSPB5+qao+L+b5lC5dUpio=; b=jaKERVh7Csb037b3/7uVZ3GUjxwO4el1xkYtX18LrlxDXXQBYEYZiktW69LBdCQfuSCt1VF6Au4Er1PF/zsYbmEXKb0pP5HTE1w2gGu5Kf9G3m1wJ7VrYmGAHKHe1uCqCDI3ulJdTI/cxU2EES/uvHUF1hjnQiAetnWzdoxDf+I= Received: from CY4PR12MB1768.namprd12.prod.outlook.com (10.175.63.10) by CY4PR12MB1894.namprd12.prod.outlook.com (10.175.82.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Fri, 2 Nov 2018 18:11:12 +0000 Received: from CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3]) by CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::82f:4b8a:fd43:aab3%7]) with mapi id 15.20.1273.030; Fri, 2 Nov 2018 18:11:12 +0000 From: "Woods, Brian" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , Clemens Ladisch , Jean Delvare , Guenter Roeck , Bjorn Helgaas , "Woods, Brian" , Pu Wen , Jia Zhang , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH 4/4] hwmon: k10temp: add support for AMD F17h M30h CPUs Thread-Topic: [PATCH 4/4] hwmon: k10temp: add support for AMD F17h M30h CPUs Thread-Index: AQHUctdwXDpFliQJEEaw32IEma1Zcw== Date: Fri, 2 Nov 2018 18:11:12 +0000 Message-ID: <20181102181055.130531-5-brian.woods@amd.com> References: <20181102181055.130531-1-brian.woods@amd.com> In-Reply-To: <20181102181055.130531-1-brian.woods@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0401CA0038.namprd04.prod.outlook.com (2603:10b6:803:2a::24) To CY4PR12MB1768.namprd12.prod.outlook.com (2603:10b6:903:122::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Brian.Woods@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR12MB1894;20:nJcTEaLyMmCrvxie/6viLqMx/CaEkbwfxJxSE0Qvyy6KlZ3YfT6qZX+5lPVEaAJDc2x38AGlbNp0C3kCEHIQkQJ40IOYM09XR051NgPCQrGG26QNA0v/hSr3lKht7OdE1uPJbm8JN6NgJJn6zhu87HlYwc4xuFOqh35eTolOMJKcs6TKKvxk9B4a6RWlUpbrevyvCaFEm5OKzBXJWOYoUDCmFW5Edh/RrLkl+93qfZjo2hyqQPP96sEXZCfFAdeg x-ms-office365-filtering-correlation-id: b24bdf98-62cd-499e-c75e-08d640ee9271 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:CY4PR12MB1894; x-ms-traffictypediagnostic: CY4PR12MB1894: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823302103)(3231382)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:CY4PR12MB1894;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1894; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(136003)(39860400002)(396003)(376002)(189003)(199004)(6486002)(72206003)(6512007)(6436002)(7416002)(14444005)(2906002)(25786009)(478600001)(105586002)(99286004)(52116002)(106356001)(14454004)(2900100001)(66066001)(7736002)(305945005)(97736004)(36756003)(53936002)(8936002)(81166006)(8676002)(486006)(186003)(2501003)(476003)(110136005)(2201001)(81156014)(316002)(3846002)(86362001)(11346002)(2616005)(102836004)(1076002)(71190400001)(76176011)(71200400001)(256004)(5660300001)(386003)(26005)(68736007)(6116002)(575784001)(446003)(6506007)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1894;H:CY4PR12MB1768.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: KIxEYM4YzjPEC7jU66Doaza0jm4eKDyns7IvsBsHwRK2fPtG2EftE6dFrnJYSXKmSOiAXGOp1eq5uECvYAhJcs3aBLXKbLEMPaie5V/b8C2Y0aMC4OOIDBm/fJWvWyFGoFlPNUEzjycCNZC87CVd0Agr/tqVugS9BIzBNs3JnrvlsaY1t2RrKWAUmz8SqjBChGeuEGU4+G+ZiOuo3BxQaYE3euup0WlHtds+gJvqbFGxaHBIJW31zoowwRt0RpRlXMixfXvXadPkCDN/NWjXQU6pjkBPAQpicGyIrwhSYq/HGiOi/CdOAI4A/vGyWBB/QdTH8ha13dAYnXS/+uNxFC2FZBuCjlMcTG4uz+odrT0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b24bdf98-62cd-499e-c75e-08d640ee9271 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 18:11:12.8140 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1894 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for AMD family 17h model 30h processors for k10temp. Model 30h is functionally the same as model 01h processors (as far as k10temp is concerned), just the PCI device IDs need to be updated. Signed-off-by: Brian Woods Acked-by: Guenter Roeck --- arch/x86/kernel/amd_nb.c | 1 - drivers/hwmon/k10temp.c | 1 + include/linux/pci_ids.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index fd69067f6eb1..e491aa4a1970 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -17,7 +17,6 @@ #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 -#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493 #define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494 diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index bc6871c8dd4e..9790f1f5eb98 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -360,6 +360,7 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) }, {} }; MODULE_DEVICE_TABLE(pci, k10temp_id_table); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 78d5cd29778a..349276fbd269 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -547,6 +547,7 @@ #define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584 #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb +#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493 #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001