From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796332160; b=P5/YrfZekPysXB6gohhRDg62gDAA39ZexF8cP2YHVzkyMTj70JfDxmdcuFBnH3SUdZdX 78Uo6ZcfGrzuDEMiPRSdQLrAoo8tgp6PagifewrRnryD8WdvmnWs3MT4cRT2SxgHEgqpj RsMnjWuUB+BzlSO1/XrJ8gbgimT8Ebqj4mTFWN3fU3lgo/4uV0SLxrmnOZjv8bjWtvxUl 5br/uF0+tMSuFyfGNBorhy8gX8AkjggQQMKEu5D9ImJ2aomSpOlMPSlq4sjDerP6WGq9v GrjDCwhimeLQ/YAcBcdj2SM189H+TXylax8L70YJwNfA0/MJp08SKnGN8mOSvEY1chw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796332160; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:X-Google-Original-From:Date:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=TgEr6/4h3lDD24YF4NU72ydjMb9HRle3AKNWsxm7YYE=; b=qDppuhEqNZbzaLw9RiabP0cRfQ/c56D0J102/AXcM8yppPB8BLY9x80Bx2RnUtgkupwc Xrekq6N+s/eLol5YugsEuZ2/IablT1Bg0yMgaVBZioxGlned09HZWZYmgzNFTUO5bZXon vBS0DQcDs0IlwHc7n47amq18O0n4B8UPnOzpOsNETR2BZX+ixTm/vVigJqgij2F1wbTqJ S1tE4s+DZUA1p0osG+pab1U/6onoclwPKTTzudDrcKYOpfxJI1mSZnzK6SLBAavHNJzb0 eC9V3grrhckUJMdn7CLwYqTvGkJqKEI3YJ2nBBW4xbzgT5duDc+OY9q9FulbCZhgrKw== 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=LMrSnSOz; arc=none smtp.remote-ip=209.85.215.172 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (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 26740606A322 for ; Thu, 3 Dec 2026 21:09:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 26740606A322 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=LMrSnSOz Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-cd6028ff33fso218981a12.0 for ; Thu, 03 Dec 2026 13:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796332159; x=1796936959; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:date:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=TgEr6/4h3lDD24YF4NU72ydjMb9HRle3AKNWsxm7YYE=; b=LMrSnSOz/LL2gE9pEN3OWRX8YLdtPxu4M0p8xQsM3SS++ikCH+TINecHQ8AwSKzsUp BueydHaqEOeBZpKUsqmZi5p0r2VdiP56X5BBJ3SGVic4NA8nBbc9LvluCr2FF9nuGD++ SjFObQk/Mv1CmOPRmhjzGmQwcizRT0V8v/kiuEBU72EnPoRksrlRAcpGZr09vffHGqZS QmiyME4dEy3lf+8YNSNBdMFP2sQ/eJAzZfdZFSc64yP2ALmsN5PYQaCjZwEoiwRf/EeD NY8d1VETWStuRhFN+yiqNwB4NbZRv+ljQmCAMZBkUfLlWn57l95wBZ+OnY/c7o7r8+40 ChAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796332159; x=1796936959; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=TgEr6/4h3lDD24YF4NU72ydjMb9HRle3AKNWsxm7YYE=; b=XIM+3w/JLrZdLge8Md8AXzCAko7nrm3Dhch0bLHnerVYX/YqJuUdIO3YDGxzHQw6gq o3iXGpOwS+I9L0OuxVMaQGXRyu1IXVen6rKnj9oKVJbnnMacYQ0Cyuh/PyrUVCXkFkUI KQKYv42mwNQIaGoTqKRYPax6klJRMD/CnXPyKM/uKg4Svs/kOJDxt5hiALQbtKryBwun PB4vICK+W0o/4jRdw0Xl003SWGQrnyLkvnPpeICiUf3Ptfzv7nLirAWvCggIb5dRbj1g SI0iA/59d0tQy78v+1tGALjKd1wbvgtY1p6ZtQdHFrFScp378ie16aDrk0I0KMveqdUh 9Nig== X-Forwarded-Encrypted: i=1; AL+hErGmlebb4shwrZdX5ryNa6GJ3tE4FzYLgdWvmb7IzSnGz8ZT/AYWSAfkcJscS5r3zncBN+8azCkxRdw=@vger.kernel.org X-Gm-Message-State: APuU4Z/OVGyRkxo1MVe4VgmxuTOWiLwSCvKPj4wS9p7g3BZEAAktzxIu UBZQKSY/akwNEiaqmXTeBXuzMd3Zsjasq8XYlNFJwQ7zvslZBBqBZsLC X-Gm-Gg: AZFdTZcs4ZOIN8YQiioxRBm6wPrW4DXGGdxg5cGM6HVZi+o9jV7z8XIEFEyZZQKbPkT 6Hqi1Qy272AzeCBZBOBiyvcZB51g8a2TNzBoO7TID+Jm2Lw1yTd8wDPxTtLemWmW789DieyUUMF PfeTXmqbUfaOfh58ZpT8MKfgi3Em5j3GkQMj1XZayt4TsbgrFOKufBJAMNOG2XmN6pMYIJR6q1Q P6SE5I5a4y+XYYpZfIoHFwoNx2CwAdA0PR2ibgPAZtzNL9xHbGwsXStmZTr/AOQiB63iitDHwRM n+4S0xM2dw4TaJvnloV9hDlIogn/KXQIPgXhOPKkMmRCLSPF/ZRO4O5rLJnmpNMs1Ffj40JrMyn ACUpkgY1QYraV+a4uF6NFGIx6sGNa6I6jGQj2n1xRud5SPXamjY95yy3p2sZUbMVEvmqfQvPQlM ZOM37Tf/bdXsg/lmJcWiIHb2n9YYjTMMlgYbnCqPM4ljtmlnTHnm50uL22WebdQhIh3sD4m42qE 6uOtnG/1XNwTJb87t+xzzv6mEZYOE8X46YGs89Zq1Kr2sNg/hGnuhxWL5j7eAz+pMVO9WYi5dng qcTWoD3ksaeLR7me7b5UBUF/Aw== X-Received: by 2002:a17:90b:5346:b0:3b0:9976:c1c6 with SMTP id 98e67ed59e1d1-3b41c9bbe00mr42387506a91.66.1796332159286; Thu, 03 Dec 2026 13:09:19 -0800 (PST) Received: from cxlqual ([220.120.90.131]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5de04dbbasm340977a91.6.2026.12.03.13.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 13:09:18 -0800 (PST) From: Anisa Su X-Google-Original-From: Anisa Su Date: Fri, 4 Dec 2026 06:11:11 +0900 To: Alison Schofield Cc: Anisa Su , linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, Dave Jiang , Jonathan Cameron , Davidlohr Bueso , Ira Weiny , Vishal Verma , Fan Ni , Li Ming , Benjamin Cheatham , Gregory Price , Richard Cheng Subject: Re: [PATCH v1 02/14] cxl/port: Add dynamic capacity options to endpoint decoder mode Message-ID: References: <20261104230445.66625-1-anisa.su@samsung.com> <20261104230445.66625-3-anisa.su@samsung.com> X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Nov 24, 2026 at 10:36:18AM -0800, Alison Schofield wrote: > On Thu, Nov 05, 2026 at 08:02:26AM +0900, Anisa Su wrote: > > Endpoints can now carry a dynamic ram partition following the > > persistent memory partition. A DC partition is further described by > > two properties reported in its CDAT DSMAS entry: shareable and > > read-only. > > > > Expand the decoder mode to accept 'dynamic_ram', 'dynamic_ram_shared', > > 'dynamic_ram_ro' and 'dynamic_ram_shared_ro'. cxl_dpa_set_part() > > selects the first dynamic ram partition whose properties match exactly. > > > > DCD may be disabled during validation after the DC partition(s) were > > added to the DPA layout, so a decoder may only be assigned to a DC > > partition while DCD is enabled for its memdev. Add a helper, > > cxled_dcd_enabled(), to check cxl_dcd_supported(). > > > > Signed-off-by: Anisa Su > > Tested-by: Wonjae Lee > > Tested-by: Junhee Park > > Tested-by: Heesoo Kim > > --- > > Documentation/ABI/testing/sysfs-bus-cxl | 25 +++++++---- > > drivers/cxl/core/core.h | 23 ++++++++++- > > drivers/cxl/core/hdm.c | 21 ++++++++-- > > drivers/cxl/core/port.c | 55 ++++++++++++++++++++++--- > > 4 files changed, 105 insertions(+), 19 deletions(-) > > > > snip > > > diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h > > index 8a81be004d00..24fbb5718abc 100644 > > --- a/drivers/cxl/core/core.h > > +++ b/drivers/cxl/core/core.h > > @@ -6,6 +6,7 @@ > > > > #include > > #include > > +#include > > > > extern const struct device_type cxl_nvdimm_bridge_type; > > extern const struct device_type cxl_nvdimm_type; > > @@ -18,6 +19,25 @@ enum cxl_detach_mode { > > DETACH_INVALIDATE, > > }; > > > > +static inline struct cxl_memdev_state * > > +cxled_to_mds(struct cxl_endpoint_decoder *cxled) > > +{ > > + struct cxl_memdev *cxlmd = cxled_to_memdev(cxled); > > + > > + return to_cxl_memdev_state(cxlmd->cxlds); > > +} > > + > > +/* Type-2 devices have no memdev state; nothing else leaves @cxlds NULL here */ > > +static inline bool cxled_dcd_enabled(struct cxl_endpoint_decoder *cxled) > > +{ > > + struct cxl_memdev_state *mds = cxled_to_mds(cxled); > > + > > + return mds && cxl_dcd_supported(mds); > > Same as Jonathan here. It is mds, not cxlds, that is NULL for a Type-2 > device, so maybe: > > /* Type-2 devices have no memdev state, so @mds is NULL for them */ > Yep, reworded. Thanks! > > > +} > > + > > +const char *cxl_dc_mode_name(bool shareable, bool read_only); > > +int cxl_dc_mode_parse(const char *buf, bool *shareable, bool *read_only); > > cxl_dc_mode_parse() is only called from mode_store() in port.c, here and > for the rest of the series. Can it be static in port.c, with no > core.h declaration? > Yes, changed to static and dropped from core.h. Thanks, Anisa > snip to end > > -- Alison >