diff options
Diffstat (limited to 'drivers/cxl/core/memdev.c')
| -rw-r--r-- | drivers/cxl/core/memdev.c | 44 | 
1 files changed, 0 insertions, 44 deletions
diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index d4e259f3a7e9..0277726afd04 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -251,50 +251,6 @@ int cxl_trigger_poison_list(struct cxl_memdev *cxlmd)  }  EXPORT_SYMBOL_NS_GPL(cxl_trigger_poison_list, CXL); -struct cxl_dpa_to_region_context { -	struct cxl_region *cxlr; -	u64 dpa; -}; - -static int __cxl_dpa_to_region(struct device *dev, void *arg) -{ -	struct cxl_dpa_to_region_context *ctx = arg; -	struct cxl_endpoint_decoder *cxled; -	u64 dpa = ctx->dpa; - -	if (!is_endpoint_decoder(dev)) -		return 0; - -	cxled = to_cxl_endpoint_decoder(dev); -	if (!cxled->dpa_res || !resource_size(cxled->dpa_res)) -		return 0; - -	if (dpa > cxled->dpa_res->end || dpa < cxled->dpa_res->start) -		return 0; - -	dev_dbg(dev, "dpa:0x%llx mapped in region:%s\n", dpa, -		dev_name(&cxled->cxld.region->dev)); - -	ctx->cxlr = cxled->cxld.region; - -	return 1; -} - -static struct cxl_region *cxl_dpa_to_region(struct cxl_memdev *cxlmd, u64 dpa) -{ -	struct cxl_dpa_to_region_context ctx; -	struct cxl_port *port; - -	ctx = (struct cxl_dpa_to_region_context) { -		.dpa = dpa, -	}; -	port = cxlmd->endpoint; -	if (port && is_cxl_endpoint(port) && cxl_num_decoders_committed(port)) -		device_for_each_child(&port->dev, &ctx, __cxl_dpa_to_region); - -	return ctx.cxlr; -} -  static int cxl_validate_poison_dpa(struct cxl_memdev *cxlmd, u64 dpa)  {  	struct cxl_dev_state *cxlds = cxlmd->cxlds;  |