Bowman, Terry wrote: > > > > On 1/14/2025 5:45 PM, Ira Weiny wrote: > > Bowman, Terry wrote: > >> > >> > >> On 1/14/2025 5:26 PM, Ira Weiny wrote: > >>> Terry Bowman wrote: > >>>> The AER service driver enables PCIe Uncorrectable Internal Errors (UIE) and > >>>> Correctable Internal errors (CIE) for CXL Root Ports. The UIE and CIE are > >>>> used in reporting CXL Protocol Errors. The same UIE/CIE enablement is > >>>> needed for CXL Upstream Switch Ports and CXL Downstream Switch Ports > >>>> inorder to notify the associated Root Port and OS.[1] > >>>> > >>>> Export the AER service driver's pci_aer_unmask_internal_errors() function > >>>> to CXL namespace. > >>>> > >>>> Remove the function's dependency on the CONFIG_PCIEAER_CXL kernel config > >>>> because it is now an exported function. > >>> This seems wrong to me. As of this patch CXL_PCI requires PCIEAER_CXL for > >>> the AER code to handle the errors which were just enabled. > >>> > >>> To keep PCIEAER_CXL optional pci_aer_unmask_internal_errors() should be > >>> stubbed out in aer.h if !CONFIG_PCIEAER_CXL. > >>> > >>> Ira > >> Bjorn (I believe in v1 or v2) directed me to remove > >> pci_aer_unmask_internal_errors() dependency on PCIEAER_CXL because it is > >> now exported. He wants the behavior for other users (and subsystems) to > >> be consistent with/without the PCIEAER_CXL setting. > >> > > I see... If PCIEAER_CXL is not enabled why even set the cxl error > > handlers and enable these? > > > > I guess this is just adding some code which eventually calls > > handles_cxl_errors() which returns false in the !PCIEAER_CXL case? > > > > Ira > > Re-sending because I somehow sent from Outlook earlier. > > cxl_dport_init_ras_reporting() and cxl_uport_init_ras_reporting() assign the error > handlers and are within #ifdef PCIEAER_CXL. The stubs are in cxl.h. > > Correct. handles_cxl_errors() returns false in the !PCIEAER_CXL case. > That is a bit convoluted... But I'm not sure how to get the cross Kconfig dependencies set to eliminate the set up. :-/ So I guess it is fine. Ira