mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dan Williams" <djbw@kernel.org>
To: "Tomasz Wolski" <tomasz.wolski@fujitsu.com>,
	smita.koralahallichannabasappa@amd.com,
	"Alison Schofield" <alison.schofield@intel.com>,
	"Dan J Williams" <dan.j.williams@intel.com>
Cc: icheng@nvidia.com, linux-cxl@vger.kernel.org,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	nvdimm@lists.linux.dev, ardb@kernel.org,
	benjamin.cheatham@amd.com, "Dave Jiang" <dave.jiang@intel.com>,
	"Jonathan Cameron" <jonathan.cameron@huawei.com>
Subject: Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
Date: Tue, 19 May 2026 20:56:11 -0700	[thread overview]
Message-ID: <ec26d3de-d556-4ab9-a333-d69d1e6cdda7@app.fastmail.com> (raw)
In-Reply-To: <20260519101832.31988-1-tomasz.wolski@fujitsu.com>



On Tue, May 19, 2026, at 3:18 AM, Tomasz Wolski wrote:
> The dax_region resource conflict in alloc_dax_region() indicates a
> serious configuration problem — two subsystems (e.g. dax_hmem and
> dax_cxl) are attempting to register overlapping address ranges. This is
> not a transient or debug-level condition; it represents a genuine
> resource conflict that an administrator needs to be aware of.
>
> Switch from request_resource() + dev_dbg() to
> request_resource_conflict() + dev_err() so that the conflict is visible
> by default and the colliding resource is identified in the message.
>
> Suggested-by: Dan Williams <dan.j.williams@intel.com>
> Link: 
> https://lore.kernel.org/linux-cxl/69c1a8d1c0fa9_7ee3100a1@dwillia2-mobl4.notmuch/
> Signed-off-by: Tomasz Wolski <tomasz.wolski@fujitsu.com>
> ---
>  drivers/dax/bus.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index 68437c05e21d..66413c6c2ba0 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -637,7 +637,7 @@ struct dax_region *alloc_dax_region(struct device 
> *parent, int region_id,
>  		unsigned long flags)
>  {
>  	struct dax_region *dax_region;
> -	int rc;
> +	struct resource *conflict;
> 
>  	/*
>  	 * The DAX core assumes that it can store its private data in
> @@ -670,10 +670,11 @@ struct dax_region *alloc_dax_region(struct device 
> *parent, int region_id,
>  		.flags = IORESOURCE_MEM | flags,
>  	};
> 
> -	rc = request_resource(&dax_regions, &dax_region->res);
> -	if (rc) {
> -		dev_dbg(parent, "dax_region resource conflict for %pR\n",
> -			&dax_region->res);
> +	conflict = request_resource_conflict(&dax_regions, &dax_region->res);

Just report the request_resource() failure. This case does not warrant exporting request_resource _conflict(). Historically one driver can not mess with another driver's resource beyond conflict detection.

  parent reply	other threads:[~2026-05-20  3:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 10:18 Tomasz Wolski
2026-05-19 11:31 ` Jonathan Cameron
2026-05-19 23:27   ` Richard Cheng
2026-05-20  0:14 ` kernel test robot
2026-05-20  2:48   ` Alison Schofield
2026-05-20  3:56 ` Dan Williams [this message]
2026-05-27  8:03   ` Tomasz Wolski
2026-05-27 18:44     ` Alison Schofield
2026-05-28  6:40       ` Tomasz Wolski

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=ec26d3de-d556-4ab9-a333-d69d1e6cdda7@app.fastmail.com \
    --to=djbw@kernel.org \
    --cc=alison.schofield@intel.com \
    --cc=ardb@kernel.org \
    --cc=benjamin.cheatham@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=icheng@nvidia.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=smita.koralahallichannabasappa@amd.com \
    --cc=tomasz.wolski@fujitsu.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

all inboxes | Powered by JetHome®