diff options
Diffstat (limited to 'drivers/cxl/pci.c')
| -rw-r--r-- | drivers/cxl/pci.c | 53 | 
1 files changed, 4 insertions, 49 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 60b23624d167..f7a5b8e9c102 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -8,7 +8,6 @@  #include <linux/mutex.h>  #include <linux/list.h>  #include <linux/pci.h> -#include <linux/pci-doe.h>  #include <linux/aer.h>  #include <linux/io.h>  #include "cxlmem.h" @@ -357,52 +356,6 @@ static int cxl_setup_regs(struct pci_dev *pdev, enum cxl_regloc_type type,  	return rc;  } -static void cxl_pci_destroy_doe(void *mbs) -{ -	xa_destroy(mbs); -} - -static void devm_cxl_pci_create_doe(struct cxl_dev_state *cxlds) -{ -	struct device *dev = cxlds->dev; -	struct pci_dev *pdev = to_pci_dev(dev); -	u16 off = 0; - -	xa_init(&cxlds->doe_mbs); -	if (devm_add_action(&pdev->dev, cxl_pci_destroy_doe, &cxlds->doe_mbs)) { -		dev_err(dev, "Failed to create XArray for DOE's\n"); -		return; -	} - -	/* -	 * Mailbox creation is best effort.  Higher layers must determine if -	 * the lack of a mailbox for their protocol is a device failure or not. -	 */ -	pci_doe_for_each_off(pdev, off) { -		struct pci_doe_mb *doe_mb; - -		doe_mb = pcim_doe_create_mb(pdev, off); -		if (IS_ERR(doe_mb)) { -			dev_err(dev, "Failed to create MB object for MB @ %x\n", -				off); -			continue; -		} - -		if (!pci_request_config_region_exclusive(pdev, off, -							 PCI_DOE_CAP_SIZEOF, -							 dev_name(dev))) -			pci_err(pdev, "Failed to exclude DOE registers\n"); - -		if (xa_insert(&cxlds->doe_mbs, off, doe_mb, GFP_KERNEL)) { -			dev_err(dev, "xa_insert failed to insert MB @ %x\n", -				off); -			continue; -		} - -		dev_dbg(dev, "Created DOE mailbox @%x\n", off); -	} -} -  /*   * Assume that any RCIEP that emits the CXL memory expander class code   * is an RCD @@ -750,8 +703,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)  	cxlds->component_reg_phys = map.resource; -	devm_cxl_pci_create_doe(cxlds); -  	rc = cxl_map_component_regs(&pdev->dev, &cxlds->regs.component,  				    &map, BIT(CXL_CM_CAP_CAP_ID_RAS));  	if (rc) @@ -769,6 +720,10 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)  	if (rc)  		return rc; +	rc = cxl_poison_state_init(cxlds); +	if (rc) +		return rc; +  	rc = cxl_dev_state_identify(cxlds);  	if (rc)  		return rc;  |