Re: [PATCH v16 6/8] cxl/mem: Configure dynamic capacity interrupts
From: Jonathan Cameron
Date: Mon Oct 12 2026 - 10:12:34 EST
On Sun, 11 Oct 2026 07:54:57 +0900
Anisa Su <anisa.su887@xxxxxxxxx> wrote:
> From: Ira Weiny <iweiny@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Co-developed-by: Anisa Su <anisa.su@xxxxxxxxxxx>
> Signed-off-by: Anisa Su <anisa.su@xxxxxxxxxxx>
> Tested-by: Wonjae Lee <wj28.lee@xxxxxxxxxxx>
> Tested-by: Junhee Park <jh9934.park@xxxxxxxxxxx>
> Tested-by: Heesoo Kim <habil.kim@xxxxxxxxxxx>
>
One really minor thing below. Up to you on whether you change
it even if you do respin!
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
> static bool cxl_event_int_is_fw(u8 setting)
> {
> u8 mode = FIELD_GET(CXLDEV_EVENT_INT_MODE_MASK, setting);
> @@ -651,46 +721,90 @@ static bool cxl_event_fw_owns_mem_logs(struct cxl_event_interrupt_policy *policy
> static int cxl_event_config(struct pci_host_bridge *host_bridge,
> struct cxl_memdev_state *mds, bool irq_avail)
> {
> - struct cxl_event_interrupt_policy policy;
> + struct cxl_event_interrupt_policy policy = { 0 };
Trivial but in earlier patch you used {}; for the bitmap.
They are equivalent (with modern compilers + the options the kernel uses)
but consistency would nice if you do respin. Not major enough to justify
doing that though! I think we already have a mix in CXL so this isn't
really making it worse.
Jonathan
> + bool native_cxl = host_bridge->native_cxl_error;