All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 5/5] cxl/hdm: Add more HDM decoder debug messages at startup
Date: Mon, 15 May 2023 11:52:47 +0100	[thread overview]
Message-ID: <20230515115247.00002e45@Huawei.com> (raw)
In-Reply-To: <168149845668.792294.11814353796371419167.stgit@dwillia2-xfh.jf.intel.com>

On Fri, 14 Apr 2023 11:54:16 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> A recent debug session yielded a couple debug messages that were useful
> for determining the reason why the driver was or was not falling back
> to CXL range register emulation, and for identifying decoder setting
> enumeration problems.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
FWIW makes sense.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/cxl/core/hdm.c |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
> index abe3877cfa63..7889ff203a34 100644
> --- a/drivers/cxl/core/hdm.c
> +++ b/drivers/cxl/core/hdm.c
> @@ -130,6 +130,14 @@ static bool should_emulate_decoders(struct cxl_endpoint_dvsec_info *info)
>  	 */
>  	for (i = 0; i < cxlhdm->decoder_count; i++) {
>  		ctrl = readl(hdm + CXL_HDM_DECODER0_CTRL_OFFSET(i));
> +		dev_dbg(&info->port->dev,
> +			"decoder%d.%d: committed: %ld base: %#x_%.8x size: %#x_%.8x\n",
> +			info->port->id, i,
> +			FIELD_GET(CXL_HDM_DECODER0_CTRL_COMMITTED, ctrl),
> +			readl(hdm + CXL_HDM_DECODER0_BASE_HIGH_OFFSET(i)),
> +			readl(hdm + CXL_HDM_DECODER0_BASE_LOW_OFFSET(i)),
> +			readl(hdm + CXL_HDM_DECODER0_SIZE_HIGH_OFFSET(i)),
> +			readl(hdm + CXL_HDM_DECODER0_SIZE_LOW_OFFSET(i)));
>  		if (FIELD_GET(CXL_HDM_DECODER0_CTRL_COMMITTED, ctrl))
>  			return false;
>  	}
> @@ -868,6 +876,10 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
>  	if (rc)
>  		return rc;
>  
> +	dev_dbg(&port->dev, "decoder%d.%d: range: %#llx-%#llx iw: %d ig: %d\n",
> +		port->id, cxld->id, cxld->hpa_range.start, cxld->hpa_range.end,
> +		cxld->interleave_ways, cxld->interleave_granularity);
> +
>  	if (!info) {
>  		lo = readl(hdm + CXL_HDM_DECODER0_TL_LOW(which));
>  		hi = readl(hdm + CXL_HDM_DECODER0_TL_HIGH(which));
> 


      parent reply	other threads:[~2023-05-15 10:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 18:53 [PATCH 0/5] cxl/hdm: Decoder enumeration fixes Dan Williams
2023-04-14 18:53 ` [PATCH 1/5] cxl/hdm: Fail upon detecting 0-sized decoders Dan Williams
2023-04-14 20:11   ` Alison Schofield
2023-04-14 21:19   ` Dave Jiang
2023-05-15 10:38   ` Jonathan Cameron
2023-04-14 18:54 ` [PATCH 2/5] cxl/hdm: Use 4-byte reads to retrieve HDM decoder base+limit Dan Williams
2023-04-14 20:32   ` Alison Schofield
2023-04-14 20:44     ` Dan Williams
2023-04-14 21:22   ` Dave Jiang
2023-05-15 10:46   ` Jonathan Cameron
2023-04-14 18:54 ` [PATCH 3/5] cxl/core: Drop unused io-64-nonatomic-lo-hi.h Dan Williams
2023-04-14 20:33   ` Alison Schofield
2023-04-14 21:22   ` Dave Jiang
2023-05-15 10:48   ` Jonathan Cameron
2023-04-14 18:54 ` [PATCH 4/5] cxl/port: Scan single-target ports for decoders Dan Williams
2023-04-14 20:55   ` Alison Schofield
2023-04-14 21:24   ` Dave Jiang
2023-04-17 16:48   ` Jonathan Cameron
2023-04-14 18:54 ` [PATCH 5/5] cxl/hdm: Add more HDM decoder debug messages at startup Dan Williams
2023-04-14 21:06   ` Alison Schofield
2023-04-14 21:25   ` Dave Jiang
2023-05-15 10:52   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230515115247.00002e45@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.