* [PATCH v1] cxl/pmem: Defer nvdimm bridge attachment failures
@ 2026-03-25 6:20 Li Chen
2026-04-11 20:51 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Li Chen @ 2026-03-25 6:20 UTC (permalink / raw)
To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
Vishal Verma, Ira Weiny, Dan Williams, Terry Bowman, Kees Cook,
linux-cxl, linux-kernel
Cc: Li Chen
cxl_acpi is initialized before cxl_pmem registers
cxl_nvdimm_bridge_driver when both are built in.
__devm_cxl_add_nvdimm_bridge() creates the nvdimm bridge
device and immediately checks whether a driver bound to it.
At that point the device may already exist while the bridge
driver is not registered, or has not bound yet, so
dev->driver == NULL
is only a temporary state rather than a permanent -ENODEV
failure.
Treating that state as fatal makes cxl_acpi probe fail, so
the root CXL topology never becomes visible to userspace and
region creation later reports no active memdevs.
Return -EPROBE_DEFER instead so cxl_acpi retries after
cxl_nvdimm_bridge_driver is registered.
Signed-off-by: Li Chen <me@linux.beauty>
---
drivers/cxl/core/pmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/core/pmem.c b/drivers/cxl/core/pmem.c
index 68462e38a977..a213eb074814 100644
--- a/drivers/cxl/core/pmem.c
+++ b/drivers/cxl/core/pmem.c
@@ -149,7 +149,7 @@ struct cxl_nvdimm_bridge *__devm_cxl_add_nvdimm_bridge(struct device *host,
if (cxl_nvdimm_bridge_failed_attach(cxl_nvb)) {
unregister_nvb(cxl_nvb);
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(-EPROBE_DEFER);
}
rc = devm_add_action_or_reset(host, unregister_nvb, cxl_nvb);
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v1] cxl/pmem: Defer nvdimm bridge attachment failures
2026-03-25 6:20 [PATCH v1] cxl/pmem: Defer nvdimm bridge attachment failures Li Chen
@ 2026-04-11 20:51 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2026-04-11 20:51 UTC (permalink / raw)
To: Li Chen, Davidlohr Bueso, Jonathan Cameron, Dave Jiang,
Alison Schofield, Vishal Verma, Ira Weiny, Terry Bowman,
Kees Cook, linux-cxl, linux-kernel
Cc: Li Chen
Li Chen wrote:
> cxl_acpi is initialized before cxl_pmem registers
Should be fixed since:
be5c5280cf2b cxl: Adjust the startup priority of cxl_pmem to be higher than that of cxl_acpi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-11 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 6:20 [PATCH v1] cxl/pmem: Defer nvdimm bridge attachment failures Li Chen
2026-04-11 20:51 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox