diff options
author | Dan Williams <dan.j.williams@intel.com> | 2023-10-31 10:59:44 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-10-31 10:59:44 -0700 |
commit | de5512b2a293863261c6b04c0c73ec0ec09ed550 (patch) | |
tree | e5cfd738515e0d64adf7a4e9548c7f6f5ec738b2 /drivers/cxl | |
parent | 624eda92abd47f35386028e4a54d423037a75d12 (diff) | |
parent | fae6389f912eb0b6aea1366814b5501077b5dbac (diff) | |
download | lwn-de5512b2a293863261c6b04c0c73ec0ec09ed550.tar.gz lwn-de5512b2a293863261c6b04c0c73ec0ec09ed550.zip |
Merge branch 'for-6.7/cxl' into cxl/next
Pickup some misc. CXL updates for v6.7.
Diffstat (limited to 'drivers/cxl')
-rw-r--r-- | drivers/cxl/core/mbox.c | 3 | ||||
-rw-r--r-- | drivers/cxl/core/port.c | 6 | ||||
-rw-r--r-- | drivers/cxl/core/region.c | 2 | ||||
-rw-r--r-- | drivers/cxl/pci.c | 5 |
4 files changed, 11 insertions, 5 deletions
diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index 72ee522e747d..9e90780bdc2b 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -1249,8 +1249,7 @@ int cxl_mem_create_range_info(struct cxl_memdev_state *mds) return 0; } - cxlds->dpa_res = - (struct resource)DEFINE_RES_MEM(0, mds->total_bytes); + cxlds->dpa_res = DEFINE_RES_MEM(0, mds->total_bytes); if (mds->partition_align_bytes == 0) { rc = add_dpa_res(dev, &cxlds->dpa_res, &cxlds->ram_res, 0, diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index ecdaf88311a1..6167ae245093 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -1522,7 +1522,11 @@ retry: struct cxl_dport *dport; struct cxl_port *port; - if (!dport_dev) + /* + * The terminal "grandparent" in PCI is NULL and @platform_bus + * for platform devices + */ + if (!dport_dev || dport_dev == &platform_bus) return 0; uport_dev = dport_dev->parent; diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index a1eac592c66a..8d3580a0db53 100644 --- a/drivers/cxl/core/region.c +++ b/drivers/cxl/core/region.c @@ -123,7 +123,7 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr) { if (!cpu_cache_has_invalidate_memregion()) { if (IS_ENABLED(CONFIG_CXL_REGION_INVALIDATION_TEST)) { - dev_warn_once( + dev_info_once( &cxlr->dev, "Bypassing cpu_cache_invalidate_memregion() for testing!\n"); return 0; diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 4067afca6389..0155fb66b580 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -85,6 +85,10 @@ static int cxl_pci_mbox_wait_for_doorbell(struct cxl_dev_state *cxlds) status & CXLMDEV_DEV_FATAL ? " fatal" : "", \ status & CXLMDEV_FW_HALT ? " firmware-halt" : "") +/* + * Threaded irq dev_id's must be globally unique. cxl_dev_id provides a unique + * wrapper object for each irq within the same cxlds. + */ struct cxl_dev_id { struct cxl_dev_state *cxlds; }; @@ -95,7 +99,6 @@ static int cxl_request_irq(struct cxl_dev_state *cxlds, int irq, struct device *dev = cxlds->dev; struct cxl_dev_id *dev_id; - /* dev_id must be globally unique and must contain the cxlds */ dev_id = devm_kzalloc(dev, sizeof(*dev_id), GFP_KERNEL); if (!dev_id) return -ENOMEM; |