[PATCH] [HACK] drop zen5_init checks due to segfault

Gregory Price
2025-04-05T02:39:02Z

Unclear why this is occuring, but a raw call to the PRM at this point
causes segfaults on my Zen5 system. Later calls to the prm work just
fine, and modifying the structure to include pci_dev info still results
in a segfault.

Debugging this is not possible on my end since the crash happens deep in
the ACPI prm code. Seems maybe the PRM interface isn't ready or something?

---
drivers/cxl/core/x86/amd.c | 17 -----------------
1 file changed, 17 deletions(-)

diff --git a/drivers/cxl/core/x86/amd.c b/drivers/cxl/core/x86/amd.c
index 483c92c18054..5e3708f9e179 100644
--- a/drivers/cxl/core/x86/amd.c
+++ b/drivers/cxl/core/x86/amd.c
@@ -227,26 +227,9 @@ static u64 cxl_zen5_to_hpa(struct cxl_decoder *cxld, u64 hpa)

static void cxl_zen5_init(struct cxl_port *port)
{
- u64 spa;
- struct prm_cxl_dpa_spa_data data = { .out = &spa, };
- int rc;
-
if (!is_zen5(port))
return;

- /* Check kernel and firmware support */
- rc = acpi_call_prm_handler(prm_cxl_dpa_spa_guid, &data);
-
- if (rc == -EOPNOTSUPP) {
- pr_warn_once("ACPI PRMT: PRM address translation not supported by kernel\n");
- return;
- }
-
- if (rc == -ENODEV) {
- pr_warn_once("ACPI PRMT: PRM address translation not supported by firmware\n");
- return;
- }
-
port->to_hpa = cxl_zen5_to_hpa;

dev_dbg(port->host_bridge, "PRM address translation enabled for %s.\n",
--
2.47.1