Re: [PATCH v1 08/29] cxl/region: Split region registration into an initialization and adding part
From: Robert Richter
Date: Thu Jan 30 2025 - 11:53:43 EST
On Tue, Jan 07, 2025 at 01:29:03PM -0500, Gregory Price wrote:
> On Tue, Jan 07, 2025 at 03:09:54PM +0100, Robert Richter wrote:
> ... snip ...
> > + rc = cxl_endpoint_register(cxled);
> > if (rc)
> > - dev_dbg(dev, "failed to add to region: %#llx-%#llx\n",
> > - cxled->cxld.hpa_range.start, cxled->cxld.hpa_range.end);
> > + dev_warn(cxled->cxld.dev.parent,
> > + "failed to register %s: %d\n",
> > + dev_name(&cxled->cxld.dev), rc);
>
> Is it worth differentiating obvious failures here for a better warning?
> I'm fine either way.
If an endpoint cannot be registered, this will likly cause a region
probe failure too. I raised the log level to make this visible for
non-dbg logging. I have also removed access to cxled->cxld.hpa_range
as this is implemenation specific to cxl_endpoint_register(). There
are other debug messages to determine the details of the failure here.
-Robert