[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z321ovYSCK9pJjxD@gourry-fedora-PF4VCD3F>
Date: Tue, 7 Jan 2025 18:15:46 -0500
From: Gregory Price <gourry@...rry.net>
To: 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>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>
Subject: Re: [PATCH v1 29/29] cxl: Show message when a decoder was added to a
port
On Tue, Jan 07, 2025 at 03:10:15PM +0100, Robert Richter wrote:
> Improve debugging by adding and unifying messages whenever a decoder
> was added to a port. It is especially useful to get the decoder
> mapping of the involved CXL host bridge or PCI device. This avoids a
> complex lookup of the decoder/port/device mappings in sysfs.
It would be nice if we could create some of these links in the absense
of the full configuration, but I understand why that's difficult.
>
> Signed-off-by: Robert Richter <rrichter@....com>
Reviewed-by: Gregory Price <gourry@...rry.net>
> ---
> drivers/cxl/acpi.c | 10 +++++++++-
> drivers/cxl/core/hdm.c | 3 ++-
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index b42cffd6751f..ac74b6f6dad7 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -421,7 +421,15 @@ static int __cxl_parse_cfmws(struct acpi_cedt_cfmws *cfmws,
> rc = cxl_decoder_add(cxld, target_map);
> if (rc)
> return rc;
> - return cxl_root_decoder_autoremove(dev, no_free_ptr(cxlrd));
> +
> + rc = cxl_root_decoder_autoremove(dev, no_free_ptr(cxlrd));
> + if (rc)
> + return rc;
> +
> + dev_dbg(root_port->dev.parent, "%s added to %s\n",
> + dev_name(&cxld->dev), dev_name(&root_port->dev));
> +
> + return 0;
> }
>
> static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg,
> diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
> index 28edd5822486..7d6778f908c8 100644
> --- a/drivers/cxl/core/hdm.c
> +++ b/drivers/cxl/core/hdm.c
> @@ -34,7 +34,8 @@ static int add_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
> if (rc)
> return rc;
>
> - dev_dbg(&cxld->dev, "Added to port %s\n", dev_name(&port->dev));
> + dev_dbg(port->uport_dev, "%s added to %s\n",
> + dev_name(&cxld->dev), dev_name(&port->dev));
>
> return 0;
> }
> --
> 2.39.5
>
Powered by blists - more mailing lists