From: Dan Williams <dan.j.williams@intel.com>
To: Alejandro Lucero Palau <alucerop@amd.com>,
Dan Williams <dan.j.williams@intel.com>,
<alejandro.lucero-palau@amd.com>, <linux-cxl@vger.kernel.org>,
<netdev@vger.kernel.org>, <dave.jiang@intel.com>,
<edward.cree@amd.com>, <davem@davemloft.net>, <kuba@kernel.org>,
<pabeni@redhat.com>, <edumazet@google.com>
Cc: Martin Habets <habetsm.xilinx@gmail.com>,
Fan Ni <fan.ni@samsung.com>, Edward Cree <ecree.xilinx@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v25 05/11] sfc: create type2 cxl memdev
Date: Wed, 1 Apr 2026 14:53:39 -0700 [thread overview]
Message-ID: <69cd93e334c11_1b0cc6100fc@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <f0f5a510-4073-444c-9f05-7153d0b2087b@amd.com>
Alejandro Lucero Palau wrote:
>
> On 4/1/26 06:17, Dan Williams wrote:
> > alejandro.lucero-palau@ wrote:
> >> From: Alejandro Lucero <alucerop@amd.com>
> >>
> >> Use cxl API for creating a cxl memory device using the type2
> >> cxl_dev_state struct.
> >>
> >> Signed-off-by: Alejandro Lucero <alucerop@amd.com>
> >> Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
> >> Reviewed-by: Fan Ni <fan.ni@samsung.com>
> >> Acked-by: Edward Cree <ecree.xilinx@gmail.com>
> >> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> >> ---
> >> drivers/net/ethernet/sfc/efx_cxl.c | 6 ++++++
> >> 1 file changed, 6 insertions(+)
> >>
> >> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c
> >> index 6619084a77d8..63e6f277ae9f 100644
> >> --- a/drivers/net/ethernet/sfc/efx_cxl.c
> >> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
> >> @@ -75,6 +75,12 @@ int efx_cxl_init(struct efx_probe_data *probe_data)
> >> return -ENODEV;
> >> }
> >>
> >> + cxl->cxlmd = devm_cxl_add_memdev(&cxl->cxlds, NULL);
> > Did this forget about:
> >
> > 29317f8dc6ed cxl/mem: Introduce cxl_memdev_attach for CXL-dependent operation
> >
> > ?
>
>
> I did not. The idea behind attach does not make sense for sfc, so I do
> not use that option. I did discuss this with you at LPC and based on
> previous comments which had not replies (case 1 in here):
>
>
> https://lore.kernel.org/linux-cxl/836d06d6-a36f-4ba3-b7c9-ba8687ba2190@amd.com/
>
>
> From our conversation at LPC, there is no reason for a CXL device
> connected to the CXL Root Bridge not having its memdev properly
> initialized.
The cxl_core can not make assumptions about attachment topology. It has
always been the case that the cxl_core needs to be prepared to handle
everything that the firmware did not. Error handling and kexec also lead to
situations where the boot configuration gets invalidated and needs
recovery.
> I did ask you specifically about this, and you mentioned links on CXL
> switches not ready, but as I said then and repeat now, this is not
> what sfc driver expects at all. Only a port from a CXL Root Bridge
> makes sense due to the latencies involved with more complex CXL
> topologies.
>
>
> So, from that list I wrote in that old thread where I tried to summarize
> the problems and clarify the confusion behind different concerns, the
> only issue is someone removing cxl_acpi. I do not think that should be
> possible at all,
...but it *is* possible to remove cxl_acpi, it *is* possible to invoke
'cxl disable-port'. The fact that it is possible contributes to
complexity, but it also supports flexibility and is a building block for
error handling / recovery.
> so something should be added for other modules depending on it
> avoiding its removal. I would say any CXL port created is (in X86)
> dependent on cxl_acpi, so something at port creation invoking a
> exported cxl_acpi function could do it, like a cxl_acpi_users counter.
> This could also help for visibility to user space about its usage.
There are two choices, fail removal or handle removal. There are some
degrees of freedom that can be pared back, but outright blocking removal
is not one of them.
> Therefore, I do not like the changes you propose here. But, if this
> proposal is the only way
It is not a matter of like or dislike, it is a matter of functional
correctness relative to the state of the subsystem today. Simply put,
one proposal handles the locking and lifetime concerns, the other does
not.
next prev parent reply other threads:[~2026-04-01 21:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 14:38 [PATCH v25 00/11] Type2 device basic support alejandro.lucero-palau
2026-03-30 14:38 ` [PATCH v25 01/11] sfc: add cxl support alejandro.lucero-palau
2026-03-31 3:37 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 02/11] cxl/sfc: Map cxl regs alejandro.lucero-palau
2026-03-30 14:38 ` [PATCH v25 03/11] cxl/sfc: Initialize dpa without a mailbox alejandro.lucero-palau
2026-03-30 14:38 ` [PATCH v25 04/11] cxl: Prepare memdev creation for type2 alejandro.lucero-palau
2026-03-31 3:46 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 05/11] sfc: create type2 cxl memdev alejandro.lucero-palau
2026-03-31 16:47 ` kernel test robot
2026-04-01 5:17 ` Dan Williams
2026-04-01 10:16 ` Alejandro Lucero Palau
2026-04-01 21:53 ` Dan Williams [this message]
2026-04-02 6:30 ` Alejandro Lucero Palau
2026-04-02 18:32 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 06/11] cxl/hdm: Add support for getting region from committed decoder alejandro.lucero-palau
2026-04-01 5:18 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 07/11] cxl: Add function for obtaining region range alejandro.lucero-palau
2026-04-01 5:20 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 08/11] cxl: Export function for unwinding cxl by accelerators alejandro.lucero-palau
2026-04-01 5:21 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 09/11] sfc: obtain decoder and region if committed by firmware alejandro.lucero-palau
2026-03-31 16:23 ` kernel test robot
2026-03-30 14:38 ` [PATCH v25 10/11] cxl: Avoid dax creation for accelerators alejandro.lucero-palau
2026-04-01 5:27 ` Dan Williams
2026-03-30 14:38 ` [PATCH v25 11/11] sfc: support pio mapping based on cxl alejandro.lucero-palau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69cd93e334c11_1b0cc6100fc@dwillia2-mobl4.notmuch \
--to=dan.j.williams@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alejandro.lucero-palau@amd.com \
--cc=alucerop@amd.com \
--cc=dave.jiang@intel.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=edward.cree@amd.com \
--cc=fan.ni@samsung.com \
--cc=habetsm.xilinx@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox