[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e232358-cb42-4b17-9b00-f04eb517a79f@intel.com>
Date: Thu, 20 Feb 2025 10:35:58 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Robert Richter <rrichter@....com>
Cc: Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>, Davidlohr Bueso
<dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, Gregory Price <gourry@...rry.net>,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>
Subject: Re: [PATCH v3 15/18] cxl/region: Add a dev_warn() on registration
failure
On 2/14/25 9:35 AM, Jonathan Cameron wrote:
> On Tue, 11 Feb 2025 10:53:45 +0100
> Robert Richter <rrichter@....com> wrote:
>
>> Esp. in complex system configurations with multiple endpoints and
>> interleaving setups it is hard to detect region setup failures as its
>> registration may silently fail. Add messages to show registration
>> failures.
>>
>> Example log message:
>>
>> cxl region5: region sort successful
>> cxl region5: mem0:endpoint5 decoder5.0 add: mem0:decoder5.0 @ 0 next: none nr_eps: 1 nr_targets: 1
>> cxl_port endpoint5: decoder5.0: range: 0x22350000000-0x2634fffffff iw: 1 ig: 256
>> cxl region5: pci0000:e0:port1 decoder1.2 add: mem0:decoder5.0 @ 0 next: mem0 nr_eps: 1 nr_targets: 1
>> cxl region5: pci0000:e0:port1 iw: 1 ig: 256
>> cxl region5: pci0000:e0:port1: decoder1.2 expected 0000:e0:01.2 at 0
>> cxl endpoint5: failed to attach decoder5.0 to region5: -6
>> cxl_port endpoint5: probe: 0
>>
>> Signed-off-by: Robert Richter <rrichter@....com>
>> Reviewed-by: Gregory Price <gourry@...rry.net>
>> Tested-by: Gregory Price <gourry@...rry.net>
> I'm in general fine with this, but we have previously been reluctant in
> some cases to go above dev_dbg. Hence would like input from more
> people on this one.
If this error message has been helpful in determining the cause of issues when debugging a platform, I'm all for it.
Reviewed-by: Dave Jiang <dave.jiang@...el.com>
>
> From me though
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
>
>> ---
>> drivers/cxl/core/region.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
>> index ebcfbfe9eafc..3031d4773274 100644
>> --- a/drivers/cxl/core/region.c
>> +++ b/drivers/cxl/core/region.c
>> @@ -2147,6 +2147,12 @@ static int attach_target(struct cxl_region *cxlr,
>> rc = cxl_region_attach(cxlr, cxled, pos);
>> up_read(&cxl_dpa_rwsem);
>> up_write(&cxl_region_rwsem);
>> +
>> + if (rc)
>> + dev_warn(cxled->cxld.dev.parent,
>> + "failed to attach %s to %s: %d\n",
>> + dev_name(&cxled->cxld.dev), dev_name(&cxlr->dev), rc);
>> +
>> return rc;
>> }
>>
>
Powered by blists - more mailing lists