From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796332161; b=qPgIDKCExerDvRk/SFhTnBrk/J9+COSo91E2QDZBi3WjWYIEFZ1jrV6k1mSDsEVMqHAb oHEscPNXX8D6hajoXv+8Rsljx1W3r6+gLtUUNxjF52zY5PYUHDCtwFUkOTBjQxHljJbCf UZi+9/lqPpfRgW6HHicCCj+6CVNVFU2560OTo2tfyDBYVkWomphsyWvEF3QcCJlOQIbBO k95ZyZFTh9IwjN6wAO43lNGmssY+C7BL4glXRqlAB4L/9asYlbNnRfIFQYvBqg/Y82axS ggQuOmrQlrS14mxlWCcfQ+k2FpnOpaVlY13tmiQcVTXhp2DnJR9R1M+40EbTiceUhuA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796332161; 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=2qfEaV4FxyZZTXlsnIQ+U/1N81QTYdDIMawtlwz6zZj+ubGpWgIFsqiHyU+kyH0yBCMS giu1acuu1e1jQW05z+8iyw9/oZZrUB1aBH1rdA7um6Hz6SwrMmNcTKCmLj3k2Vq+bgDOO 6ISID3i17RJd6Lh9AvV3qCrhjM9XYSVkmlpzbtkqaLd5GPuT6WhUmfQD/PWJbbbiM2VRF Atl+az2tskAKhchiAk9mtmyvD7rrHpDrBFX0O49xCGoNUGnEJRl+9brXGOY4KWl68VVSU +cy/xg7XOiRUG9wv363SCK35s2A9Nx1mue0bVg2nZYCntPB5qWTwIwQFmBsOf6ifLvg== 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.214.182 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 315BD606A32C for ; Thu, 3 Dec 2026 21:09:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 315BD606A32C 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-pl1-f182.google.com with SMTP id d9443c01a7336-2f05bc71e01so2301485ad.0 for ; Thu, 03 Dec 2026 13:09:19 -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=uTmY+gKfYfDzirTiL4w7IhmvWPZ6v0SFBiVFrmIXkyXaSG/U7d+aBlDHdVy3nvo/ud 2sgn49Y7ui4MwKj7Prxw20+JEaLjIQ7rdR6Smqipt2XKwaTTF/kvWxPijwqTZ11P9t1H 4Nqhf3av9SfQ59TUV4qDymJ+2+KwzUzF9X5pWlT9WKFgTMM27874Wa7R14hKBOWwvRsw cGV7G1spzIWsabcGQXUbBa57VlaanNsgreUYR895SWs+PF8AwSwQNWnK6WZBrqxWp9sH qjMKGPmB5THdP5PADbvDWRFq7ctA9bGrjkvmseVbyqvfZ6g24Fj1kG2tL7in4h2SNh0N MuHA== X-Forwarded-Encrypted: i=1; AL+hErGGVEuU+BRxjpKraiKLpEX4YF5v00iURXnTXWTPx1xuokgUI8vuznoV4YOlieXeIVRrbQg05tttb20/U7s=@vger.kernel.org X-Gm-Message-State: APuU4Z9UB+eUMeaK5GZaDGAfFEQiXetZyyTKfFLVWhn9CUcFb47mjmq3 WBS2TwN6iCtP3EVPOBMlA5tyKstg37acsODOAqYym3+dIKdvYGuWg1// X-Gm-Gg: AZFdTZd3s1USvPYZUwHEM3OFtkulFoOlJ3mSxgSkK3sHBBpJIbyanywEtnHSmDBTs8s vCybOEbArXpCXebDKg3QAS2xfqloM/UBoHEkJEwWrJPZxGDXR5a1gfM4MLv0V9cb57S6wDsIN1v CUL1eokHvC9wjBAxehIc0/eqA+89/I1rH2zmmhMnO9YRDBy+II6+HyadeIRaf6sgMjMrjZi/PlL cErLKMc9OpzGaHaw00u7z0kieBrgGUJgKSpAZRLZb9b8tIkN7ACch2igx1zB9yIoZBBaqJ5UmMQ g+kZjn2xoNSeTIm57y5AYrtTNmi3ZLHjVcuqmyMq9ALie83/9TXqvsNds/CfZERa8vd5FDhv1dS S5ZKEV5BPr1lKdfRJEcsjQjbaa3teWU534Gzdffzm29UOPU9l4UVuCgmqGHa/Dwz9Ueo3jDQntu nzrhFXHcRtub6VF6IhfjmP4HiySVO+9b586lM2PioQF3+zjbM4xu7YLIyjB0jrzWdITm7YqsORf e+PDCqgdBolkUJqm/pSaCpzl8Tax7eOMPfSSuyF4zAHBfnJ8GYCX0z07yJmj6g+JyD7i+xwtrje tqm1iCJotW4cH0pQWHFxFE6yYw== 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-kernel@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 >