From: Anisa Su <anisa.su887@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Anisa Su <anisa.su887@gmail.com>,
linux-cxl@vger.kernel.org, alison.schofield@intel.com,
dave.jiang@intel.com, gourry@gourry.net, icheng@nvidia.com,
ming.li@zohomail.com, vishal.l.verma@intel.com,
dave@stgolabs.net, benjamin.cheatham@amd.com,
Ira Weiny <iweiny@kernel.org>, Wonjae Lee <wj28.lee@samsung.com>,
Junhee Park <jh9934.park@samsung.com>,
Heesoo Kim <habil.kim@samsung.com>
Subject: Re: [RESEND PATCH v13 6/8] cxl/mem: Configure dynamic capacity interrupts
Date: Sat, 12 Sep 2026 03:21:01 +0900 [thread overview]
Message-ID: <aqRGjbwEE2C5-zpz@cxlqual> (raw)
In-Reply-To: <20260908231414.427c677d@jic23-huawei>
On Tue, Sep 08, 2026 at 11:14:14PM +0100, Jonathan Cameron wrote:
> On Tue, 8 Sep 2026 03:15:10 -0700
> Anisa Su <anisa.su887@gmail.com> wrote:
>
> > From: Ira Weiny <iweiny@kernel.org>
> >
> > Dynamic Capacity Devices (DCD) support extent change notifications
> > through the event log mechanism. The interrupt mailbox commands were
> > extended in CXL 3.1 to support these notifications. Firmware can't
> > configure DCD events to be FW controlled but can retain control of
> > memory events.
> >
> > Configure DCD event log interrupts on devices supporting dynamic
> > capacity. Disable DCD if interrupts are not supported.
> >
> > The DCD event log is not drained here. cxl_event_drain_mask() reports
> > only the logs the driver can service, and the DCD bit is added by
> > the patch introducing DCD event handling. Until then a DCD interrupt
> > wakes the event thread, which finds no log it owns and returns.
> >
> > Care is taken to preserve the interrupt policy set by the FW if FW first
> > has been selected by the BIOS.
> >
> > Based on an original patch by Navneet Singh.
> >
> > Signed-off-by: Ira Weiny <iweiny@kernel.org>
> > Signed-off-by: Anisa Su <anisa.su@samsung.com>
> > Tested-by: Wonjae Lee <wj28.lee@samsung.com>
> > Tested-by: Junhee Park <jh9934.park@samsung.com>
> > Tested-by: Heesoo Kim <habil.kim@samsung.com>
> >
>
> One minor thing inline. Otherwise LGTM.
>
> Jonathan
>
> > ---
> > drivers/cxl/cxl.h | 4 +-
> > drivers/cxl/cxlmem.h | 2 +
> > drivers/cxl/pci.c | 124 ++++++++++++++++++++++++++++++++++++-------
> > 3 files changed, 109 insertions(+), 21 deletions(-)
> >
> > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> > index cab8ce39f465..d6e02bd0cf50 100644
> > --- a/drivers/cxl/cxl.h
> > +++ b/drivers/cxl/cxl.h
> > @@ -192,11 +192,13 @@ static inline int ways_to_eiw(unsigned int ways, u8 *eiw)
> > #define CXLDEV_EVENT_STATUS_WARN BIT(1)
> > #define CXLDEV_EVENT_STATUS_FAIL BIT(2)
> > #define CXLDEV_EVENT_STATUS_FATAL BIT(3)
> > +#define CXLDEV_EVENT_STATUS_DCD BIT(4)
> >
> > #define CXLDEV_EVENT_STATUS_ALL (CXLDEV_EVENT_STATUS_INFO | \
> > CXLDEV_EVENT_STATUS_WARN | \
> > CXLDEV_EVENT_STATUS_FAIL | \
> > - CXLDEV_EVENT_STATUS_FATAL)
> > + CXLDEV_EVENT_STATUS_FATAL | \
> > + CXLDEV_EVENT_STATUS_DCD)
>
> See below. I think this define has become a bad idea, making things
> more confusing rather than simpler.
>
> > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> > index 7b754af2168d..1ea505b1f40e 100644
> > --- a/drivers/cxl/pci.c
> > +++ b/drivers/cxl/pci.c
> > @@ -510,11 +510,23 @@ static bool cxl_alloc_irq_vectors(struct pci_dev *pdev)
> > return true;
> > }
> >
> > +/* Event logs the driver drains: standard logs when native_cxl */
> > +static u32 cxl_event_drain_mask(struct pci_host_bridge *host_bridge)
> > +{
> > + if (host_bridge->native_cxl_error)
> > + return CXLDEV_EVENT_STATUS_ALL & ~CXLDEV_EVENT_STATUS_DCD;
>
> This seems a little backwards. Better I think to just list the logs that
> are supported. There are other logs coming and I think we'd want to opt into
> them deliberately like you are doing for DCD rather than have them caught
> by the _ALL define.
>
> if (host_bridge->native_cxl_error)
> return CXLDEV_EVENT_STATUS_INFO | CXLDEV_EVENT_STATUS_WARN |
> CXLDEV_EVENT_STATUS_FAIL | CXLDEV_EVENT_STATUS_FATAL;
Applied.
Thanks,
Anisa
> > +
> > + return 0;
> > +}
>
>
next prev parent reply other threads:[~2026-09-11 18:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 10:15 [RESEND PATCH v13 0/8] DCD Prep Series Anisa Su
2026-09-08 10:15 ` [RESEND PATCH v13 1/8] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD) Anisa Su
2026-09-08 15:39 ` dave
2026-09-08 18:45 ` Jonathan Cameron
2026-09-08 10:15 ` [RESEND PATCH v13 2/8] cxl/mem: Read dynamic capacity configuration from the device Anisa Su
2026-09-08 15:59 ` Davidlohr Bueso
2026-09-08 20:43 ` Jonathan Cameron
2026-09-10 23:56 ` Anisa Su
2026-09-11 0:53 ` Jonathan Cameron
2026-09-11 16:38 ` Anisa Su
2026-09-08 10:15 ` [RESEND PATCH v13 3/8] cxl/cdat: Gather DSMAS data for DCD partitions Anisa Su
2026-09-08 20:52 ` Jonathan Cameron
2026-09-11 0:02 ` Anisa Su
2026-09-11 0:56 ` Jonathan Cameron
2026-09-11 16:37 ` Anisa Su
2026-09-08 10:15 ` [RESEND PATCH v13 4/8] cxl/events: Split event msgnum configuration from irq setup Anisa Su
2026-09-08 16:37 ` Davidlohr Bueso
2026-09-08 10:15 ` [RESEND PATCH v13 5/8] cxl/pci: Factor out interrupt policy check Anisa Su
2026-09-08 17:17 ` Davidlohr Bueso
2026-09-08 10:15 ` [RESEND PATCH v13 6/8] cxl/mem: Configure dynamic capacity interrupts Anisa Su
2026-09-08 10:43 ` sashiko-bot
2026-09-11 21:10 ` Anisa Su
2026-09-12 0:09 ` Gregory Price
2026-09-08 22:14 ` Jonathan Cameron
2026-09-11 18:21 ` Anisa Su [this message]
2026-09-08 10:15 ` [RESEND PATCH v13 7/8] cxl/core: Enforce partition order/simplify partition calls Anisa Su
2026-09-08 10:15 ` [RESEND PATCH v13 8/8] Documentation/cxl: Document DPA partition layout and ordering rules Anisa Su
2026-09-08 22:17 ` Jonathan Cameron
2026-09-11 20:39 ` Anisa Su
2026-09-09 15:19 ` Davidlohr Bueso
2026-09-11 20:38 ` Anisa Su
2026-09-11 20:50 ` Davidlohr Bueso
2026-09-12 0:20 ` Gregory Price
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=aqRGjbwEE2C5-zpz@cxlqual \
--to=anisa.su887@gmail.com \
--cc=alison.schofield@intel.com \
--cc=benjamin.cheatham@amd.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=gourry@gourry.net \
--cc=habil.kim@samsung.com \
--cc=icheng@nvidia.com \
--cc=iweiny@kernel.org \
--cc=jh9934.park@samsung.com \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=vishal.l.verma@intel.com \
--cc=wj28.lee@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.