Skip to content

Commit 589c335

Browse files
weiny2djbw
authored andcommitted
PCI/CXL: Export native CXL error reporting control
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 <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Ira Weiny <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dan Williams <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent 4a20bc3 commit 589c335

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

drivers/acpi/pci_root.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
10471047
if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL))
10481048
host_bridge->native_dpc = 0;
10491049

1050+
if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL))
1051+
host_bridge->native_cxl_error = 0;
1052+
10501053
/*
10511054
* Evaluate the "PCI Boot Configuration" _DSM Function. If it
10521055
* exists and returns 0, we must preserve any PCI resource

drivers/pci/probe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge)
596596
bridge->native_ltr = 1;
597597
bridge->native_dpc = 1;
598598
bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET;
599+
bridge->native_cxl_error = 1;
599600

600601
device_initialize(&bridge->dev);
601602
}

include/linux/pci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ struct pci_host_bridge {
578578
unsigned int native_pme:1; /* OS may use PCIe PME */
579579
unsigned int native_ltr:1; /* OS may use PCIe LTR */
580580
unsigned int native_dpc:1; /* OS may use PCIe DPC */
581+
unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */
581582
unsigned int preserve_config:1; /* Preserve FW resource setup */
582583
unsigned int size_windows:1; /* Enable root bus sizing */
583584
unsigned int msi_domain:1; /* Bridge wants MSI domain */

0 commit comments

Comments
 (0)