Linux CXL
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, "Li Ming" <ming.li@zohomail.com>,
	Robert Richter <rrichter@amd.com>, <linux-cxl@vger.kernel.org>,
	Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Subject: Re: [PATCH v5 2/7] cxl/region: Warn on user region position mismatch
Date: Thu, 24 Sep 2026 17:30:56 -0700	[thread overview]
Message-ID: <arXAwONM33mmNA3o@aschofie-mobl2.lan> (raw)
In-Reply-To: <1d662e3ea78ec8b05fceb500f04e69ee9f6d4a72.1788475206.git.alison.schofield@intel.com>

On Thu, Sep 03, 2026 at 04:23:44PM -0700, Alison Schofield wrote:
> User region creation includes a self-test that checks the assigned endpoint
> positions against the position calculation used by auto region creation.
> The result, matching or not, is reported with dev_dbg().
> 
> Promote that to a dev_warn() that fires only on a mismatch, so bugs in the
> auto region position calculation are easier to catch as that calculation is
> extended to support more region configurations.
> 
> The matching case no longer prints, so dynamic debug on region.c no longer
> confirms that the self-test ran.
> 
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>

DaveJ,

RobertR also tagged this one.

I'm requesting you merge this ahead of the rest of the series.

It is independent of the rest of this work, and landing it sooner
helps me with a unit test that wants that message to always be present.

Thanks for taking a look!

-- Alison


> ---
>  drivers/cxl/core/region.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index 27e63e6dab7c..6a698f36aa6d 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -2215,10 +2215,11 @@ static int cxl_region_attach(struct cxl_region *cxlr,
>  		int test_pos;
>  
>  		test_pos = cxl_calc_interleave_pos(target, &cxlr->hpa_range);
> -		dev_dbg(&target->cxld.dev,
> -			"Test cxl_calc_interleave_pos(): %s test_pos:%d target->pos:%d\n",
> -			(test_pos == target->pos) ? "success" : "fail",
> -			test_pos, target->pos);
> +		if (test_pos != target->pos)
> +			dev_warn(&cxlr->dev,
> +				 "%s: position mismatch: calculated:%d assigned:%d\n",
> +				 dev_name(&target->cxld.dev), test_pos,
> +				 target->pos);
>  	}
>  
>  	return 0;
> -- 
> 2.37.3
> 

  parent reply	other threads:[~2026-09-25  0:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 23:23 [PATCH v5 0/7] cxl: Support mixed-granularity region interleaves Alison Schofield
2026-09-03 23:23 ` [PATCH v5 1/7] Documentation/cxl: Describe mixed-granularity regions Alison Schofield
2026-09-07 23:23   ` Jonathan Cameron
2026-09-16 11:51   ` Robert Richter
2026-09-18 20:48     ` Alison Schofield
2026-09-03 23:23 ` [PATCH v5 2/7] cxl/region: Warn on user region position mismatch Alison Schofield
2026-09-16 12:05   ` Robert Richter
2026-09-18 21:18     ` Alison Schofield
2026-09-25  0:30   ` Alison Schofield [this message]
2026-09-03 23:23 ` [PATCH v5 3/7] cxl/region: Generalize endpoint position mapping Alison Schofield
2026-09-07 23:42   ` Jonathan Cameron
2026-09-18 23:01     ` Alison Schofield
2026-09-16 14:15   ` Robert Richter
2026-09-18 23:20     ` Alison Schofield
2026-09-03 23:23 ` [PATCH v5 4/7] cxl/region: Name the interleave locals in cxl_port_setup_targets() Alison Schofield
2026-09-07 23:50   ` [PATCH v5 4/7] cxo_ol/region: " Jonathan Cameron
2026-09-19  0:42     ` Alison Schofield
2026-09-16 14:34   ` [PATCH v5 4/7] cxl/region: " Robert Richter
2026-09-16 17:45     ` Robert Richter
2026-09-19  0:58       ` Alison Schofield
2026-09-19  0:55     ` Alison Schofield
2026-09-03 23:23 ` [PATCH v5 5/7] cxl/region: Support mixed-granularity auto regions Alison Schofield
2026-09-08  0:02   ` Jonathan Cameron
2026-09-16 18:03   ` Robert Richter
2026-09-03 23:23 ` [PATCH v5 6/7] cxl/region: Support mixed-granularity user created regions Alison Schofield
2026-09-08  0:03   ` Jonathan Cameron
2026-09-16 18:13   ` Robert Richter
2026-09-03 23:23 ` [PATCH v5 7/7] cxl/test: Add a topology to test mixed-granularity regions Alison Schofield
2026-09-08  0:10   ` Jonathan Cameron
2026-09-16 18:19 ` [PATCH v5 0/7] cxl: Support mixed-granularity region interleaves Robert Richter
2026-09-18 19:49   ` Alison Schofield
2026-09-29 22:48 ` Dave Jiang

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=arXAwONM33mmNA3o@aschofie-mobl2.lan \
    --to=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=rrichter@amd.com \
    --cc=vishal.l.verma@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox