Message ID | 20221212070627.1372402-2-ira.weiny@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2088728wrr; Sun, 11 Dec 2022 23:07:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf5LwALuAr/wMcpulxhjckEqfDTWgFC9xjJTw89lzIqvR5G5uPw52LFY1ZlVwGIcOVfOOg2W X-Received: by 2002:a05:6a21:9187:b0:a7:8919:3312 with SMTP id tp7-20020a056a21918700b000a789193312mr17799336pzb.29.1670828850834; Sun, 11 Dec 2022 23:07:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670828850; cv=none; d=google.com; s=arc-20160816; b=AfFoq5zWpG8FXSgJvq1T8y5qmWCB8YAI2Rbh+qN6+3y8lUHLQXCwvR0zBnt2fJkzj3 m3Gh6hvy1ZTT0upJ51gPdJmsKp6FWIOnOq4/m5aD/0itcRJ78TOj/Y5tDV5XYYjWEp5d 9yrsop06hIzrd1K2z6GMJmtlLNEd1gYVuc8yGAkNqch4yYIRgJFU529ZoXYIxy32vsW6 rmKD0+8LnyBEltklxepsnu/b0TzQy+hEVV18S/ggpU8OlXYAB8vc/aaOmhOWr1s4IYSK bjG/RuNWuMsB/mQEwLQ9KID2qj7Qp/LKhz4htkwKaU5opc99h+aKYBMIg+0jpcTQGu6C J1dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VYRBM5oZNjJEIW1tgs4lWqh4rHqHPEBat66SU+6gObc=; b=BJmOm4VG06iY69iP6CUT81EGqgggqI4wx8QvTa7NahIJbiyKL050D7LTgJ7mR2ocS4 WKyBUdZKoCcgY2CGr9WOHpVVln20+5p7eb935NTOAjysyj0W1lz+VAftqs6JPKuSeqtH U8L9UxTwypusHjN2XbHZYwXZyoVJrvqmzbUwHJhc8PhcIvqgiOtreYJSrnihZhJ/8cMn JB0B8fYe924r3Tm/i1rZHqL3CKFO40bM9MQl95ADdORgaaPkE7ypklCfbUgROiFxuKFQ o+2yW9ECDXsD0Gv3t4m4KLFUFVTLcdftYBczXMco6Bln5eohsaYpLbzSpmAU+CjcLtxJ csdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UDidpiUs; 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=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h189-20020a6383c6000000b0047785402653si8102235pge.776.2022.12.11.23.07.17; Sun, 11 Dec 2022 23:07:30 -0800 (PST) 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=@intel.com header.s=Intel header.b=UDidpiUs; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbiLLHGn (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Mon, 12 Dec 2022 02:06:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231289AbiLLHGf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 12 Dec 2022 02:06:35 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0322DD1; Sun, 11 Dec 2022 23:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670828793; x=1702364793; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6LqKiGqF8xQfUNOA0F82eClaUz0ge/qFTczNzGwS3pA=; b=UDidpiUsE/aUlPJeCOEca3WEpes9DLWpdab2oBoj9RKS5O8B8SKXeZif QUC/lZqdcejxmWM+ocwNYdySc5mXCrZ0xsIVklQS7UTHTMDTJnSAmhuVo ZjtfiB8iaDwA9obMf/B74GkfrSYcaXXk2zoWn5bQeZOlcXqBp3AjzKrV2 9v94GS4PEnt/qFV4ylqgWz4sxpg2fO3/hMTMMvd/e+ddq+duWpqi2Z5D1 kXUXDrIQuf+vrBYaBZxPjx7/tWV85rvHcFecs+69GrdzRgzLiFeeSq9ol hXfPSgqDiDPm42bHSuCTrY7gmEJS4/YQGC56YRx/d8ofJqMlCSQw8+NSa A==; X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="317811822" X-IronPort-AV: E=Sophos;i="5.96,237,1665471600"; d="scan'208";a="317811822" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 23:06:31 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="641643046" X-IronPort-AV: E=Sophos;i="5.96,237,1665471600"; d="scan'208";a="641643046" Received: from iweiny-mobl.amr.corp.intel.com (HELO localhost) ([10.209.168.6]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 23:06:30 -0800 From: ira.weiny@intel.com To: Dan Williams <dan.j.williams@intel.com> Cc: Ira Weiny <ira.weiny@intel.com>, Bjorn Helgaas <bhelgaas@google.com>, Lukas Wunner <lukas@wunner.de>, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, Alison Schofield <alison.schofield@intel.com>, Vishal Verma <vishal.l.verma@intel.com>, Davidlohr Bueso <dave@stgolabs.net>, Jonathan Cameron <Jonathan.Cameron@huawei.com>, Dave Jiang <dave.jiang@intel.com>, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org Subject: [PATCH V4 1/9] PCI/CXL: Export native CXL error reporting control Date: Sun, 11 Dec 2022 23:06:19 -0800 Message-Id: <20221212070627.1372402-2-ira.weiny@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221212070627.1372402-1-ira.weiny@intel.com> References: <20221212070627.1372402-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751991032963263194?= X-GMAIL-MSGID: =?utf-8?q?1751991032963263194?= |
Series |
CXL: Process event logs
|
|
Commit Message
Ira Weiny
Dec. 12, 2022, 7:06 a.m. UTC
From: Ira Weiny <ira.weiny@intel.com> CXL _OSC Error Reporting Control is used by the OS to determine if Firmware has control of various CXL error reporting capabilities including the event logs. Expose the result of negotiating CXL Error Reporting Control in struct pci_host_bridge for consumption by the CXL drivers. Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Lukas Wunner <lukas@wunner.de> Cc: linux-pci@vger.kernel.org Cc: linux-acpi@vger.kernel.org Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- Changes from V3: New patch split out --- drivers/acpi/pci_root.c | 3 +++ drivers/pci/probe.c | 1 + include/linux/pci.h | 1 + 3 files changed, 5 insertions(+)
Comments
ira.weiny@ wrote: > From: Ira Weiny <ira.weiny@intel.com> > > CXL _OSC Error Reporting Control is used by the OS to determine if > Firmware has control of various CXL error reporting capabilities > including the event logs. > > Expose the result of negotiating CXL Error Reporting Control in struct > pci_host_bridge for consumption by the CXL drivers. > > Cc: Bjorn Helgaas <bhelgaas@google.com> > Cc: Lukas Wunner <lukas@wunner.de> > Cc: linux-pci@vger.kernel.org > Cc: linux-acpi@vger.kernel.org > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Looks good to me, Reviewed-by: Dan Williams <dan.j.williams@intel.com> > > --- > Changes from V3: > New patch split out > --- > drivers/acpi/pci_root.c | 3 +++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c > index b3c202d2a433..84030804a763 100644 > --- a/drivers/acpi/pci_root.c > +++ b/drivers/acpi/pci_root.c > @@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, > if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) > host_bridge->native_dpc = 0; > > + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) > + host_bridge->native_cxl_error = 0; > + > /* > * Evaluate the "PCI Boot Configuration" _DSM Function. If it > * exists and returns 0, we must preserve any PCI resource > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 2f4e88a44e8b..34c9fd6840c4 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) > bridge->native_ltr = 1; > bridge->native_dpc = 1; > bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; > + bridge->native_cxl_error = 1; > > device_initialize(&bridge->dev); > } > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 1f81807492ef..08c3ccd2617b 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -577,6 +577,7 @@ struct pci_host_bridge { > unsigned int native_pme:1; /* OS may use PCIe PME */ > unsigned int native_ltr:1; /* OS may use PCIe LTR */ > unsigned int native_dpc:1; /* OS may use PCIe DPC */ > + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ > unsigned int preserve_config:1; /* Preserve FW resource setup */ > unsigned int size_windows:1; /* Enable root bus sizing */ > unsigned int msi_domain:1; /* Bridge wants MSI domain */ > -- > 2.37.2 >
On Sun, 11 Dec 2022 23:06:19 -0800 ira.weiny@intel.com wrote: > From: Ira Weiny <ira.weiny@intel.com> > > CXL _OSC Error Reporting Control is used by the OS to determine if > Firmware has control of various CXL error reporting capabilities > including the event logs. > > Expose the result of negotiating CXL Error Reporting Control in struct > pci_host_bridge for consumption by the CXL drivers. > > Cc: Bjorn Helgaas <bhelgaas@google.com> > Cc: Lukas Wunner <lukas@wunner.de> > Cc: linux-pci@vger.kernel.org > Cc: linux-acpi@vger.kernel.org > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > Changes from V3: > New patch split out > --- > drivers/acpi/pci_root.c | 3 +++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c > index b3c202d2a433..84030804a763 100644 > --- a/drivers/acpi/pci_root.c > +++ b/drivers/acpi/pci_root.c > @@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, > if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) > host_bridge->native_dpc = 0; > > + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) > + host_bridge->native_cxl_error = 0; > + > /* > * Evaluate the "PCI Boot Configuration" _DSM Function. If it > * exists and returns 0, we must preserve any PCI resource > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 2f4e88a44e8b..34c9fd6840c4 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) > bridge->native_ltr = 1; > bridge->native_dpc = 1; > bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; > + bridge->native_cxl_error = 1; > > device_initialize(&bridge->dev); > } > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 1f81807492ef..08c3ccd2617b 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -577,6 +577,7 @@ struct pci_host_bridge { > unsigned int native_pme:1; /* OS may use PCIe PME */ > unsigned int native_ltr:1; /* OS may use PCIe LTR */ > unsigned int native_dpc:1; /* OS may use PCIe DPC */ > + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ > unsigned int preserve_config:1; /* Preserve FW resource setup */ > unsigned int size_windows:1; /* Enable root bus sizing */ > unsigned int msi_domain:1; /* Bridge wants MSI domain */
On Sun, Dec 11, 2022 at 11:06:19PM -0800, Ira wrote: > From: Ira Weiny <ira.weiny@intel.com> > > CXL _OSC Error Reporting Control is used by the OS to determine if > Firmware has control of various CXL error reporting capabilities > including the event logs. > > Expose the result of negotiating CXL Error Reporting Control in struct > pci_host_bridge for consumption by the CXL drivers. > Rafael, I should have CC'ed you on this patch. Could I get an ack on it so Dan can take it through the CXL tree? Thanks, Ira > Cc: Bjorn Helgaas <bhelgaas@google.com> > Cc: Lukas Wunner <lukas@wunner.de> > Cc: linux-pci@vger.kernel.org > Cc: linux-acpi@vger.kernel.org > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > > --- > Changes from V3: > New patch split out > --- > drivers/acpi/pci_root.c | 3 +++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c > index b3c202d2a433..84030804a763 100644 > --- a/drivers/acpi/pci_root.c > +++ b/drivers/acpi/pci_root.c > @@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, > if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) > host_bridge->native_dpc = 0; > > + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) > + host_bridge->native_cxl_error = 0; > + > /* > * Evaluate the "PCI Boot Configuration" _DSM Function. If it > * exists and returns 0, we must preserve any PCI resource > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 2f4e88a44e8b..34c9fd6840c4 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) > bridge->native_ltr = 1; > bridge->native_dpc = 1; > bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; > + bridge->native_cxl_error = 1; > > device_initialize(&bridge->dev); > } > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 1f81807492ef..08c3ccd2617b 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -577,6 +577,7 @@ struct pci_host_bridge { > unsigned int native_pme:1; /* OS may use PCIe PME */ > unsigned int native_ltr:1; /* OS may use PCIe LTR */ > unsigned int native_dpc:1; /* OS may use PCIe DPC */ > + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ > unsigned int preserve_config:1; /* Preserve FW resource setup */ > unsigned int size_windows:1; /* Enable root bus sizing */ > unsigned int msi_domain:1; /* Bridge wants MSI domain */ > -- > 2.37.2 >
On Sun, Dec 11, 2022 at 11:06:19PM -0800, ira.weiny@intel.com wrote: > From: Ira Weiny <ira.weiny@intel.com> > > CXL _OSC Error Reporting Control is used by the OS to determine if > Firmware has control of various CXL error reporting capabilities > including the event logs. > > Expose the result of negotiating CXL Error Reporting Control in struct > pci_host_bridge for consumption by the CXL drivers. > > Cc: Bjorn Helgaas <bhelgaas@google.com> > Cc: Lukas Wunner <lukas@wunner.de> > Cc: linux-pci@vger.kernel.org > Cc: linux-acpi@vger.kernel.org > Signed-off-by: Ira Weiny <ira.weiny@intel.com> FWIW, for probe.c and pci.h: Acked-by: Bjorn Helgaas <bhelgaas@google.com> > --- > Changes from V3: > New patch split out > --- > drivers/acpi/pci_root.c | 3 +++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c > index b3c202d2a433..84030804a763 100644 > --- a/drivers/acpi/pci_root.c > +++ b/drivers/acpi/pci_root.c > @@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, > if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) > host_bridge->native_dpc = 0; > > + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) > + host_bridge->native_cxl_error = 0; > + > /* > * Evaluate the "PCI Boot Configuration" _DSM Function. If it > * exists and returns 0, we must preserve any PCI resource > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 2f4e88a44e8b..34c9fd6840c4 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) > bridge->native_ltr = 1; > bridge->native_dpc = 1; > bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; > + bridge->native_cxl_error = 1; > > device_initialize(&bridge->dev); > } > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 1f81807492ef..08c3ccd2617b 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -577,6 +577,7 @@ struct pci_host_bridge { > unsigned int native_pme:1; /* OS may use PCIe PME */ > unsigned int native_ltr:1; /* OS may use PCIe LTR */ > unsigned int native_dpc:1; /* OS may use PCIe DPC */ > + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ > unsigned int preserve_config:1; /* Preserve FW resource setup */ > unsigned int size_windows:1; /* Enable root bus sizing */ > unsigned int msi_domain:1; /* Bridge wants MSI domain */ > -- > 2.37.2 >
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index b3c202d2a433..84030804a763 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) host_bridge->native_dpc = 0; + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) + host_bridge->native_cxl_error = 0; + /* * Evaluate the "PCI Boot Configuration" _DSM Function. If it * exists and returns 0, we must preserve any PCI resource diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2f4e88a44e8b..34c9fd6840c4 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge) bridge->native_ltr = 1; bridge->native_dpc = 1; bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; + bridge->native_cxl_error = 1; device_initialize(&bridge->dev); } diff --git a/include/linux/pci.h b/include/linux/pci.h index 1f81807492ef..08c3ccd2617b 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -577,6 +577,7 @@ struct pci_host_bridge { unsigned int native_pme:1; /* OS may use PCIe PME */ unsigned int native_ltr:1; /* OS may use PCIe LTR */ unsigned int native_dpc:1; /* OS may use PCIe DPC */ + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ unsigned int preserve_config:1; /* Preserve FW resource setup */ unsigned int size_windows:1; /* Enable root bus sizing */ unsigned int msi_domain:1; /* Bridge wants MSI domain */