[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220831081603.3415-16-rrichter@amd.com>
Date: Wed, 31 Aug 2022 10:16:03 +0200
From: Robert Richter <rrichter@....com>
To: Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Ben Widawsky <bwidawsk@...nel.org>,
Dan Williams <dan.j.williams@...el.com>
CC: <linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, Robert Richter <rrichter@....com>
Subject: [PATCH 15/15] cxl/acpi: Specify module load order dependency for the cxl_acpi module
In RCD mode the CXL mem dev may be detected on the PCI bus before a
CXL host is brought up. This may cause a CXL mem initialization
failure as it expects the CXL host already detected. Address this by
specifying the module dependencies using MODULE_SOFTDEP().
The following additional dependencies exist:
* cxl_mem depends on cxl_acpi: The CXL hosts must be discovered
before the CXL device is initialized.
* cxl_acpi depends on cxl_port: The acpi driver adds ports to the cxl
bus, the port driver should be loaded before. This might also work
if modules are loaded in different order, but a) it aligns with the
existing cxl_mem/cxl_port softdep and b) it always guarantees a fix
module load order.
Signed-off-by: Robert Richter <rrichter@....com>
---
drivers/cxl/acpi.c | 1 +
drivers/cxl/mem.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index 56b2d222afcc..63a1cb295c07 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -834,3 +834,4 @@ module_exit(cxl_host_exit);
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(CXL);
MODULE_IMPORT_NS(ACPI);
+MODULE_SOFTDEP("pre: cxl_port");
diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
index 64ccf053d32c..ae13ec7d9894 100644
--- a/drivers/cxl/mem.c
+++ b/drivers/cxl/mem.c
@@ -128,3 +128,4 @@ MODULE_ALIAS_CXL(CXL_DEVICE_MEMORY_EXPANDER);
* endpoint registration.
*/
MODULE_SOFTDEP("pre: cxl_port");
+MODULE_SOFTDEP("pre: cxl_acpi");
--
2.30.2
Powered by blists - more mailing lists