From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796392690; b=ri2SCkTcoQ2vXiTJ730ItjQi8kUnVhGRO4R1kNR+AIqcnfFQSiCYstfWE19DL40nShz6 fQxHGJ/dmNyroErMOEPEqM8QL8VMRvB2BCO/rHJUOo0ZjyKNXae7do+4BHTkTXYETu/bs shH8sq0iLBykHHJzSUSBiY4xpSTqCFIqWz/+d6rT7gXYhJSVfndBPckda33mtGuZnQMJC xjCYeS36uph1CulfpuOMcXDl4yHMZP1p/aKxIPH7Q/mJQd2XwdlP1hxW8jeJnPSiMIt8J kOcRDfq4R4zT9z3wRPF0cbMS/V3kNDk06JyEyyKEkpEASn8gA85YCX/8rgAweBWlvcQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796392690; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=VSvQYAHLTgoetrg91IjgzKG2tgiT22PASwoCtixETf8=; b=jjRRpQFZZ2AnWbnBl1lguh4gcVDpOiyVhnRKxWiBaGbO3bXiDgrA76CGI2niM1jNtHc0 Eq8TlDgsl2B+zq8lx7VLf0I0blEMlZwdTV1GfWgIIPxj0mtqJ7Lbuihvm+PItRWWFegrZ A78EO6rJVf2xzjyCh4152dFsFy0qU9IOQKorX8PyCe4v2UQ/i/WBOL8/YD0z8NwbZ0Q5R ksZjVtipJ4ZW/Kou0Zu3EsSvf4FtdH5Ym+zEDEhFnrTLZuP0hL+wTWDYk7wBsq2F6TiP5 tpkFnmXU0QW3/fx/y32Tpw94tiiibWq4lc1Eg41ReO75EILqSE3TxZbdXEFuZpCC8zg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=R7MaJHs1; arc=none smtp.remote-ip=209.85.216.46 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89D26606A33A for ; Fri, 4 Dec 2026 13:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 89D26606A33A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=R7MaJHs1 Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-3b405d8f1cfso543233a91.3 for ; Fri, 04 Dec 2026 05:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796392689; x=1796997489; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VSvQYAHLTgoetrg91IjgzKG2tgiT22PASwoCtixETf8=; b=R7MaJHs1ooJa0+OSyGMvJyyD5SafnmIH484owaBDtWCaelKnqu4Jy3IDZEBMrhv2qT fDGzo0whAXpGhT1ZArqhU2RaJO3iCoVbatwOEqu48Y3AxZR+6E7PKEMT52ReRy5nwuRZ f1AyWL0cYvyq/1u+Pi5sG6oDEKMX6iXIOvGe4cG2op+bi/f15HfBJNunjmyHvkFJv4d1 cjyLhna7rW68c2H7IjNEr/Rlq7JqdVeuCpR/8JjOddrosS/YYlueDkVPdZpcH9RZpm0d G3CQ2JKuVSrvxvAEFsGm4tBVAy/aqdkprCzGwEOZ+TOMMK9OjMG4qEW8P/nw/4nHMLeZ 8UAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796392689; x=1796997489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=VSvQYAHLTgoetrg91IjgzKG2tgiT22PASwoCtixETf8=; b=yM/eDW+Fpc+CDzy8SL48AyHZ4+7aSsXlqH57H7R9P33ErRmMCq+X92v8NR1DwAzFZP Qeb/gaCJpx0YwBto01lndJXdfdUPKNRr//am1/3i3GvprwqUP0nQjkRld/KhcMCswCiG cJyJXBzyLHm9vOOn54NpCrErf/J9UzVkBTs/cCETmRZeJbL48K2NZL7E5Pb0T+zmQoaX G8JiMI0wFzSv/1XUQENRPtJ7sA9czc8fESdJhYhxie5bM+4Woy1EjoZ7uhBeZaG7x/Q5 p7a+KNObKFKQlopchfoBe5cQ6p2hn9Mqhxs3n1xifTzERjnTdjli3wjZQWvWt1qJf2Fa cAdw== X-Gm-Message-State: AB4q+uGYGS/WLbyXE7Y8sJ57nGKNjMf2iXIaQBQcqzdmRkpzdMwoLAyP YrLSCrh5G8Dtt807kmpHY7KwGBqWAj2WpRp7gqQCs4ihUUEpFAmpO6Ud X-Gm-Gg: AZFdTZff9ASvegnWHxAbzcqHx9zrns0VgSqO148jOs1fGvkXVMVEDfmu2RVzNs9S+BK aqCL/76SZGoNxFvto9XfKn20PjeGEj4PBY57cpPO/umBcMt9geUkoELTV5HQf/ZmjN0LYYM0Qx9 GQ5e8RnavFycgBXoe5KtesGsMiz30vq6wzOS6KkzQeNNfCw1VpbjPwvxtakEtqM8eEglRaaFdZd fxT9YKfcAGsVLybpN7d7ZwlQbPlO0POB820wz4FcW/BYiL5WJx366qIH0OBtH8UTDfjVxTbU3FE GQfczMoniFMSwyaJVcLchT/j30iybIlG0edzyNlmff4TIs79TdNHpAhqPut+2l7R7vS25mW3KOv v3XMpu6Pn6Z+0iToLEtvujabFEdxjAU7dt0ZFM6HDJutpg6AIViuM9akrBcuw0aN38blWqjNTTd UWzlBlyrSJBdTRnLmF8zDauJFbY/lw639j2pEwn29hVbDhqhAq+GsHWtwzTugT5q47zBTz57Yl2 rt6nl+MKqLmZckAwJG2hWI1Ssh3i05RF9/f+1BoTiRx1JO7yZ1SUaTWLbfyjUS16fY+rI9YuqMT Z0h028EZgIC2BV778YafN65/fFvXRIyw0lblzDoZqBs= X-Received: by 2002:a17:90a:ec83:b0:3b3:b595:2473 with SMTP id 98e67ed59e1d1-3b5e06a0c4fmr1782189a91.24.1796392688761; Fri, 04 Dec 2026 05:58:08 -0800 (PST) Received: from localhost.localdomain ([121.134.184.225]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8de1388210asm1532296b3a.53.2026.12.04.05.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 05:58:08 -0800 (PST) From: Unsung Lee To: linux-cxl@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Dan Williams , Ira Weiny , Li Ming , Richard Cheng , Ben Cheatham , Unsung Lee 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 Message-Id: <20261204135754.639574-3-unsung0317@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261204135754.639574-1-unsung0317@gmail.com> References: <20261204135754.639574-1-unsung0317@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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