Re: [PATCH v24 08/11] cxl: Export function for unwinding cxl by accelerators

Cheatham, Benjamin
2026-03-26T21:28:48Z

On 3/24/2026 4:36 PM, Alejandro Lucero Palau wrote:
>
> On 3/24/26 16:50, Jonathan Cameron wrote:
>> On Mon, 23 Mar 2026 11:31:14 +0000
>> alejandro.lucero-palau@amd.com wrote:
>>
>>> From: Alejandro Lucero <alucerop@amd.com>
>>>
>>> Add cxl_unregister_region() to the accelerator driver API
>>> for a clean exit.
>>>
>>> Signed-off-by: Alejandro Lucero <alucerop@amd.com>
>>> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
>> For this I'm seeing an outstanding question from Gregory on v23.
>
>
> Yes, I did not forget about it but I forgot to comment back.
>
>
> The kreview is obviously wrong but I think it points out to the missing invocation I need to add. I did not suffer those problems Gregory mentions, but I think that is due to how I configure my testing kernel. So, yes, I need to remove the release action from inside this function to avoid invoking ... this same function. That is another thing that puzzled me when I saw that review, and it implies I need to have different functions for accelerator driver specific invocation and for normal release action call. Or maybe just an extra param only removing the devm release action if invoked by accelerators. I think I will go with this last one. Any suggestion?
>

May be a dumb question, but what happens if you don't export this function and just rely on the devm action registered during creation in the core?
An extra parameter seems icky to me, but the alternative would be to push registering the release action to the endpoint driver (cxl_pci, sfc, etc.) which
is pretty rough as well.

I may just be missing something here, I haven't thought about this too much. I was going to look at the rest of the set tomorrow, I'll see if I can think
of something then.

Thanks,
Ben
>
> Thank you