[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6887a5956dc2d_1196810015@dwillia2-mobl4.notmuch>
Date: Mon, 28 Jul 2025 09:30:13 -0700
From: <dan.j.williams@...el.com>
To: <alejandro.lucero-palau@....com>, <linux-cxl@...r.kernel.org>,
<netdev@...r.kernel.org>, <dan.j.williams@...el.com>, <edward.cree@....com>,
<davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <dave.jiang@...el.com>
CC: Alejandro Lucero <alucerop@....com>, Martin Habets
<habetsm.xilinx@...il.com>, Edward Cree <ecree.xilinx@...il.com>, "Jonathan
Cameron" <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v17 12/22] sfc: get endpoint decoder
alejandro.lucero-palau@ wrote:
> From: Alejandro Lucero <alucerop@....com>
>
> Use cxl api for getting DPA (Device Physical Address) to use through an
> endpoint decoder.
>
> Signed-off-by: Alejandro Lucero <alucerop@....com>
> Reviewed-by: Martin Habets <habetsm.xilinx@...il.com>
> Acked-by: Edward Cree <ecree.xilinx@...il.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> ---
> drivers/net/ethernet/sfc/Kconfig | 1 +
> drivers/net/ethernet/sfc/efx_cxl.c | 32 +++++++++++++++++++++++++++++-
> 2 files changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig
> index 979f2801e2a8..e959d9b4f4ce 100644
> --- a/drivers/net/ethernet/sfc/Kconfig
> +++ b/drivers/net/ethernet/sfc/Kconfig
> @@ -69,6 +69,7 @@ config SFC_MCDI_LOGGING
> config SFC_CXL
> bool "Solarflare SFC9100-family CXL support"
> depends on SFC && CXL_BUS >= SFC
> + depends on CXL_REGION
> default SFC
> help
> This enables SFC CXL support if the kernel is configuring CXL for
> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c
> index e2d52ed49535..c0adfd99cc78 100644
> --- a/drivers/net/ethernet/sfc/efx_cxl.c
> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
> @@ -22,6 +22,7 @@ int efx_cxl_init(struct efx_probe_data *probe_data)
> {
> struct efx_nic *efx = &probe_data->efx;
> struct pci_dev *pci_dev = efx->pci_dev;
> + resource_size_t max_size;
> struct efx_cxl *cxl;
> u16 dvsec;
> int rc;
> @@ -86,13 +87,42 @@ int efx_cxl_init(struct efx_probe_data *probe_data)
> return PTR_ERR(cxl->cxlmd);
> }
>
> + cxl->endpoint = cxl_acquire_endpoint(cxl->cxlmd);
> + if (IS_ERR(cxl->endpoint))
> + return PTR_ERR(cxl->endpoint);
Between Terry's set, the soft reserve set, and now this, it is become
clearer that the cxl_core needs a centralized solution to the questions
of:
- Does the platform have CXL and if so might a device ever successfully
complete cxl_mem_probe() for a cxl_memdev that it registered?
- When can a driver assume that no cxl_port topology is going to arrive?
I.e. when to give up on probe deferral.
It is also clear that a class of CXL accelerator drivers would be
served by a simple shared routine to autocreate a region.
I am going to take a stab at refactoring the current classmem case into
a scheme that resolves automatic region assembly at
devm_cxl_add_memdev() time in a way that can be reused to solve this
automatic region creation problem.
Powered by blists - more mailing lists