public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: <ira.weiny@intel.com>
Cc: Dan Williams <dan.j.williams@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>,
	Dave Jiang <dave.jiang@intel.com>, <linux-kernel@vger.kernel.org>,
	<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH V4 1/9] PCI/CXL: Export native CXL error reporting control
Date: Fri, 16 Dec 2022 14:09:47 +0000	[thread overview]
Message-ID: <20221216140947.00002f22@Huawei.com> (raw)
In-Reply-To: <20221212070627.1372402-2-ira.weiny@intel.com>

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 */


  parent reply	other threads:[~2022-12-16 14:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12  7:06 [PATCH V4 0/9] CXL: Process event logs ira.weiny
2022-12-12  7:06 ` [PATCH V4 1/9] PCI/CXL: Export native CXL error reporting control ira.weiny
2022-12-13 19:12   ` Dan Williams
2022-12-16 14:09   ` Jonathan Cameron [this message]
2023-01-05  3:16   ` Ira Weiny
2023-01-05 16:56   ` Bjorn Helgaas
2022-12-12  7:06 ` [PATCH V4 2/9] cxl/mem: Read, trace, and clear events on driver load ira.weiny
2022-12-13  6:49   ` johnny
2022-12-13 18:56     ` Ira Weiny
2022-12-16 15:39   ` Jonathan Cameron
2022-12-16 21:54     ` Ira Weiny
2022-12-17 16:38       ` Jonathan Cameron
2022-12-18  0:21         ` Ira Weiny
2022-12-18 15:52           ` Jonathan Cameron
2022-12-18  0:25       ` johnny
2022-12-18 15:55         ` Jonathan Cameron
2023-01-04 23:53           ` Ira Weiny
2022-12-12  7:06 ` [PATCH V4 3/9] cxl/mem: Wire up event interrupts ira.weiny
2022-12-13 20:15   ` Dan Williams
2022-12-16 14:24   ` Jonathan Cameron
2022-12-16 18:42     ` Jonathan Cameron
2022-12-16 21:28       ` Ira Weiny
2022-12-17 16:40         ` Jonathan Cameron
2022-12-16 18:21   ` Jonathan Cameron
2022-12-16 21:33     ` Ira Weiny
2022-12-17 16:43       ` Jonathan Cameron
2022-12-12  7:06 ` [PATCH V4 4/9] cxl/mem: Trace General Media Event Record ira.weiny
2022-12-12  7:06 ` [PATCH V4 5/9] cxl/mem: Trace DRAM " ira.weiny
2022-12-12  7:06 ` [PATCH V4 6/9] cxl/mem: Trace Memory Module " ira.weiny
2022-12-12  7:06 ` [PATCH V4 7/9] cxl/test: Add generic mock events ira.weiny
2022-12-12  7:06 ` [PATCH V4 8/9] cxl/test: Add specific events ira.weiny
2022-12-12  7:06 ` [PATCH V4 9/9] cxl/test: Simulate event log overflow ira.weiny
2022-12-16 12:25 ` [PATCH V4 0/9] CXL: Process event logs Jonathan Cameron
2022-12-16 17:01   ` Dan Williams
2022-12-16 18:15     ` Ira Weiny
2022-12-16 18:39     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221216140947.00002f22@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox