]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/pci: Support Global Persistent Flush (GPF)
authorDavidlohr Bueso <dave@stgolabs.net>
Fri, 24 Jan 2025 23:35:33 +0000 (15:35 -0800)
committerDave Jiang <dave.jiang@intel.com>
Fri, 14 Mar 2025 22:50:22 +0000 (15:50 -0700)
commita52b6a2c1c997b5047a724ccde955910f6150a97
tree1f4571b9ed3364d0752660b71582fb498f643c7f
parent2014c95afecee3e76ca4a56956a936e23283f05b
cxl/pci: Support Global Persistent Flush (GPF)

Add support for GPF flows. It is found that the CXL specification
around this to be a bit too involved from the driver side. And while
this should really all handled by the hardware, this patch takes
things with a grain of salt.

Upon respective port enumeration, both phase timeouts are set to
a max of 20 seconds, which is the NMI watchdog default for lockup
detection. The premise is that the kernel does not have enough
information to set anything better than a max across the board
and hope devices finish their GPF flows within the platform energy
budget.

Timeout detection is based on dirty Shutdown semantics. The driver
will mark it as dirty, expecting that the device clear it upon a
successful GPF event. The admin may consult the device Health and
check the dirty shutdown counter to see if there was a problem
with data integrity.

[ davej: Explicitly set return to 0 in update_gpf_port_dvsec() ]
[ davej: Add spec reference for 'struct cxl_mbox_set_shutdown_state_in ]
[ davej: Fix 0-day reported issue ]

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20250124233533.910535-1-dave@stgolabs.net
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Documentation/driver-api/cxl/maturity-map.rst
drivers/cxl/core/core.h
drivers/cxl/core/mbox.c
drivers/cxl/core/pci.c
drivers/cxl/core/port.c
drivers/cxl/cxl.h
drivers/cxl/cxlmem.h
drivers/cxl/cxlpci.h
drivers/cxl/pmem.c