mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Unsung Lee <unsung0317@gmail.com>
To: linux-cxl@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Dan Williams <djbw@kernel.org>, Ira Weiny <iweiny@kernel.org>,
	Li Ming <ming.li@zohomail.com>, Richard Cheng <icheng@nvidia.com>,
	Ben Cheatham <benjamin.cheatham@amd.com>,
	Unsung Lee <unsung0317@gmail.com>
Subject: [PATCH v2 2/2] cxl/acpi: Correct the add_cxl_resources() kernel-doc on a trimmed window
Date: Fri,  4 Dec 2026 22:57:54 +0900	[thread overview]
Message-ID: <20261204135754.639574-3-unsung0317@gmail.com> (raw)
In-Reply-To: <20261204135754.639574-1-unsung0317@gmail.com>

The kernel-doc says that when a System RAM range spans two CXL windows,
the tail of the second window is left for dynamic region provisioning.
pair_cxl_resource() only pairs a root decoder with a window that covers
its whole HPA range, so the root decoder of a trimmed window has never
had a resource, and no region can be created in that tail.

Describe what happens instead; region creation under such a decoder
now fails with -ENXIO. No functional change.

Signed-off-by: Unsung Lee <unsung0317@gmail.com>
---
 drivers/cxl/acpi.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 13609e2e98..bd04780a15 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -832,11 +832,14 @@ static void remove_cxl_resources(void *data)
  *	|-- "CXL Window 0" --||----- "CXL Window 1" -----|
  *	|--------------- "System RAM" -------------|
  *
- * ...where platform firmware has established as System RAM resource across 2
- * windows, but has left some portion of window 1 for dynamic CXL region
- * provisioning. In this case "Window 0" will span the entirety of the "System
+ * ...where platform firmware has established a System RAM resource across 2
+ * windows. In this case "CXL Window 0" will span the entirety of the "System
  * RAM" span, and "CXL Window 1" is truncated to the remaining tail past the end
- * of that "System RAM" resource.
+ * of that "System RAM" resource. The truncated window no longer covers the HPA
+ * range of its root decoder, so pair_cxl_resource() leaves that decoder
+ * without a resource and no region can be created under it. The same happens
+ * to the root decoder of a window that is removed because an expanded window
+ * contains it.
  */
 static int add_cxl_resources(struct resource *cxl_res)
 {
-- 
2.34.1


      parent reply	other threads:[~2026-12-04 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 13:57 [PATCH v2 0/2] cxl: Fail region creation for a root decoder without a CXL window Unsung Lee
2026-12-04 13:57 ` [PATCH v2 1/2] cxl/region: " Unsung Lee
2026-12-04 13:57 ` Unsung Lee [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=20261204135754.639574-3-unsung0317@gmail.com \
    --to=unsung0317@gmail.com \
    --cc=alison.schofield@intel.com \
    --cc=benjamin.cheatham@amd.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=djbw@kernel.org \
    --cc=icheng@nvidia.com \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.li@zohomail.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

all inboxes | Powered by JetHome®