From patchwork Mon Jun 5 14:14:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 103300 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2725347vqr; Mon, 5 Jun 2023 07:28:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76UMldyrXCHVcxC+lJh9IKT7AmM6A8sU5nKSqAzeR2kjN9+1riCNRE9J+y9XK9B1+VBx1e X-Received: by 2002:a17:90a:19d6:b0:259:6a29:ef1c with SMTP id 22-20020a17090a19d600b002596a29ef1cmr898104pjj.5.1685975305256; Mon, 05 Jun 2023 07:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685975305; cv=none; d=google.com; s=arc-20160816; b=GMIMOkuYKSxH4E+701vimh+YTBsl6dn6pci9RMIMG14yWBZCOV2v6niV848tVYZWDz 1bMoAMKe4w3uPE6N537qGHqfSKtEEck1KULrLBYtI/WKNmMWcNMOjbffK9ZtS2eC/t+p TBjO8PPpsXZYgfVaxqkEgmkjsIg+9BsdO805IuXRZZnZA4bTgrDMiuSMCLdjuopFu/K/ MpexSQpQ4eZf5yWTWsBSc6rMgnsXXrWpHnAo28pp+GttiuaLafPiaWgHOs6XZebgX9G4 5GZAq8wEoRkQfATwQxFRtth4gMSCchwhBvdJ/aur0FCfCdYKLFeKOuYH4KGwTfSN/8Wr Zzpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=KQZ6SRS5x8bgPaqEeeWHjdO1EFJS0M297BAy1c6J36E=; b=JTx7PqpFxJTtyX/si8FU/hmX3DhimZknndOxGQOeBaZp8oWKEQYUG4iPeCD7/8SoVL RgUoqft49euVi8smRm2atKKuHQze3Ob6R5eQ6m7Yg8y4vEZfxlT67osovaAG/Aq43ABe Mgo6714l8KVvMyBLdji9eWayeimHoRrPqrqPhmPRFj2crSXZRs3hT60gstuK+IqAenEG GsEFKnNnec7woNtKfooQFYOexBGZAvD8kBwm2o12vhVbsJibeGly9TKFlPTynjulZXP6 uhTJ2Js/ygTYaKuq41Ll7Pus0sRNw/VMxk4oqbk5YQtAvVzPmrC5wb/F6LvdzbKCdsVQ NYtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TAJfWksW; dkim=neutral (no key) header.i=@linutronix.de header.b=FdHWD5HR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a17090a850600b002509203c8b2si5590262pjn.47.2023.06.05.07.28.13; Mon, 05 Jun 2023 07:28:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TAJfWksW; dkim=neutral (no key) header.i=@linutronix.de header.b=FdHWD5HR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233984AbjFEOPw (ORCPT + 99 others); Mon, 5 Jun 2023 10:15:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234927AbjFEOPK (ORCPT ); Mon, 5 Jun 2023 10:15:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB1A110FE; Mon, 5 Jun 2023 07:14:46 -0700 (PDT) Date: Mon, 05 Jun 2023 14:14:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685974483; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KQZ6SRS5x8bgPaqEeeWHjdO1EFJS0M297BAy1c6J36E=; b=TAJfWksWDLN7gyAyT5zplUa7zgQily/Y8S82bIkUX34c50wFl5OhdNhKXM48BL1Gbpzo1p Bght8o+8YVRzwYLB3VsnS79Veqg39OAqUThszaSGH5KhAjjMmzZL686yyMyG1bAALhikm6 UFFaaWahFqH+Aml07pzk+EoGeVg6Rh184081pzmxxLdST4pR4ykvpTnrd2XdAy+bFKiKmR IrbMb3VsJgyOd0K1lkLDp3Y7sNlYLaHdyZoQ2QGy5GeKEKKpARO0naWYcILNPqz1pFOGJK 2oNHmQX0eG1eoF3nK6pxb2GXgwzB7hkoap9+gRyf/IIqq19bQyj5Uox5YihSWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685974483; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KQZ6SRS5x8bgPaqEeeWHjdO1EFJS0M297BAy1c6J36E=; b=FdHWD5HRyBRAm46cQ3jQ1Host2ppinrYdXIivLzUnmt9pgXCJWRjntVhRh0OZEVANhCVp3 OGk5ZMT5T3c9N4Dg== From: "tip-bot2 for Yazen Ghannam" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: ras/core] x86/amd_nb: Add MI200 PCI IDs Cc: Yazen Ghannam , Muralidhara M K , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230515113537.1052146-2-muralimk@amd.com> References: <20230515113537.1052146-2-muralimk@amd.com> MIME-Version: 1.0 Message-ID: <168597448285.404.12187039044997383031.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765960926008873245?= X-GMAIL-MSGID: =?utf-8?q?1767873241946698941?= The following commit has been merged into the ras/core branch of tip: Commit-ID: e15885689cf4bc92356e52ea6ef38379a749819a Gitweb: https://git.kernel.org/tip/e15885689cf4bc92356e52ea6ef38379a749819a Author: Yazen Ghannam AuthorDate: Mon, 15 May 2023 11:35:33 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 05 Jun 2023 12:26:37 +02:00 x86/amd_nb: Add MI200 PCI IDs The AMD MI200 series accelerators are data center GPUs. They include unified memory controllers and a data fabric similar to those used in AMD x86 CPU products. The memory controllers report errors using MCA, though these errors are generally handled through GPU drivers that directly manage the accelerator device. In some configurations, memory errors from these devices will be reported through MCA and managed by x86 CPUs. The OS is expected to handle these errors in similar fashion to MCA errors originating from memory controllers on the CPUs. In Linux, this flow includes passing MCA errors to a notifier chain with handlers in the EDAC subsystem. The AMD64 EDAC module requires information from the memory controllers and data fabric in order to provide detailed decoding of memory errors. The information is read from hardware registers accessed through interfaces in the data fabric. The accelerator data fabrics are visible to the host x86 CPUs as PCI devices just like x86 CPU data fabrics are already. However, the accelerator fabrics have new and unique PCI IDs. Add PCI IDs for the MI200 series of accelerator devices in order to enable EDAC support. The data fabrics of the accelerator devices will be enumerated as any other fabric already supported. System-specific implementation details will be handled within the AMD64 EDAC module. [ bp: Scrub off marketing speak. ] Signed-off-by: Yazen Ghannam Co-developed-by: Muralidhara M K Signed-off-by: Muralidhara M K Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230515113537.1052146-2-muralimk@amd.com --- arch/x86/kernel/amd_nb.c | 5 +++++ include/linux/pci_ids.h | 1 + 2 files changed, 6 insertions(+) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 7e331e8..8fd9554 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -23,6 +23,7 @@ #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT 0x14a4 #define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 +#define PCI_DEVICE_ID_AMD_MI200_ROOT 0x14bb #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 @@ -37,6 +38,7 @@ #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc +#define PCI_DEVICE_ID_AMD_MI200_DF_F4 0x14d4 /* Protect the PCI config register pairs used for SMN. */ static DEFINE_MUTEX(smn_mutex); @@ -53,6 +55,7 @@ static const struct pci_device_id amd_root_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_ROOT) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_ROOT) }, {} }; @@ -81,6 +84,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F3) }, {} }; @@ -101,6 +105,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { 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) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F4) }, {} }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 95f33da..a99b1fc 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -568,6 +568,7 @@ #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3 #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb +#define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3 #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001