Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/20221212070627.1372402-2-ira.weiny@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

authored by

Ira Weiny and committed by
Dan Williams
589c3357 4a20bc3e

+5
+3
drivers/acpi/pci_root.c
··· 1047 1047 if (!(root->osc_control_set & OSC_PCI_EXPRESS_DPC_CONTROL)) 1048 1048 host_bridge->native_dpc = 0; 1049 1049 1050 + if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) 1051 + host_bridge->native_cxl_error = 0; 1052 + 1050 1053 /* 1051 1054 * Evaluate the "PCI Boot Configuration" _DSM Function. If it 1052 1055 * exists and returns 0, we must preserve any PCI resource
+1
drivers/pci/probe.c
··· 596 596 bridge->native_ltr = 1; 597 597 bridge->native_dpc = 1; 598 598 bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET; 599 + bridge->native_cxl_error = 1; 599 600 600 601 device_initialize(&bridge->dev); 601 602 }
+1
include/linux/pci.h
··· 578 578 unsigned int native_pme:1; /* OS may use PCIe PME */ 579 579 unsigned int native_ltr:1; /* OS may use PCIe LTR */ 580 580 unsigned int native_dpc:1; /* OS may use PCIe DPC */ 581 + unsigned int native_cxl_error:1; /* OS may use CXL RAS/Events */ 581 582 unsigned int preserve_config:1; /* Preserve FW resource setup */ 582 583 unsigned int size_windows:1; /* Enable root bus sizing */ 583 584 unsigned int msi_domain:1; /* Bridge wants MSI domain */