[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aNQl2ogOPKid7yyp@gourry-fedora-PF4VCD3F>
Date: Wed, 24 Sep 2025 13:09:46 -0400
From: Gregory Price <gourry@...rry.net>
To: Robert Richter <rrichter@....com>
Cc: Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>,
Joshua Hahn <joshua.hahnjy@...il.com>
Subject: Re: [PATCH v3 11/11] cxl: Enable AMD Zen5 address translation using
ACPI PRMT
On Fri, Sep 12, 2025 at 04:45:13PM +0200, Robert Richter wrote:
> +static void cxl_prm_init(struct cxl_port *port)
> +{
> + u64 spa;
> + struct prm_cxl_dpa_spa_data data = { .out = &spa, };
> + int rc;
> +
> + if (!check_prm_address_translation(port))
> + return;
> +
> + /* Check kernel (-EOPNOTSUPP) and firmware support (-ENODEV) */
> + rc = acpi_call_prm_handler(prm_cxl_dpa_spa_guid, &data);
> + if (rc == -EOPNOTSUPP || rc == -ENODEV)
> + return;
> +
> + port->to_hpa = cxl_prm_to_hpa;
> +
> + dev_dbg(port->host_bridge, "PRM address translation enabled for %s.\n",
> + dev_name(&port->dev));
> +}
Is it possible that the PRMT function is present but uninitialize?
For example if expanders are not in a normalized address mode.
This code would likely still add the to_hpa() function reference even
if the underlying PRMT function hasn't been set up for translation.
~Gregory
Powered by blists - more mailing lists