[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92ff6f90-3b32-490e-9b62-0f516cb89ef4@amd.com>
Date: Thu, 8 May 2025 13:45:16 +0100
From: Alejandro Lucero Palau <alucerop@....com>
To: Alison Schofield <alison.schofield@...el.com>,
alejandro.lucero-palau@....com
Cc: 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, Ben Cheatham <benjamin.cheatham@....com>,
Fan Ni <fan.ni@...sung.com>, Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v14 03/22] cxl: move pci generic code
On 5/8/25 01:36, Alison Schofield wrote:
> On Thu, Apr 17, 2025 at 10:29:06PM +0100, alejandro.lucero-palau@....com wrote:
>> From: Alejandro Lucero <alucerop@....com>
>>
>> Inside cxl/core/pci.c there are helpers for CXL PCIe initialization
>> meanwhile cxl/pci.c implements the functionality for a Type3 device
>> initialization.
>>
>> Move helper functions from cxl/pci.c to cxl/core/pci.c in order to be
>> exported and shared with CXL Type2 device initialization.
>>
>> Signed-off-by: Alejandro Lucero <alucerop@....com>
>> Reviewed-by: Dave Jiang <dave.jiang@...el.com>
>> Reviewed-by: Ben Cheatham <benjamin.cheatham@....com>
>> Reviewed-by: Fan Ni <fan.ni@...sung.com>
>> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
>> ---
>> drivers/cxl/core/core.h | 2 +
>> drivers/cxl/core/pci.c | 62 +++++++++++++++++++++++++++++++
>> drivers/cxl/core/regs.c | 1 -
>> drivers/cxl/cxl.h | 2 -
>> drivers/cxl/cxlpci.h | 2 +
>> drivers/cxl/pci.c | 70 -----------------------------------
>> include/cxl/pci.h | 13 +++++++
>> tools/testing/cxl/Kbuild | 1 -
>> tools/testing/cxl/test/mock.c | 17 ---------
> The commit log doesn't mention these cxl/test changes.
> Why are these done?
If I recall this right, moving the code has the effect of not requiring
this code anymore.
This comes from Dan's work for fixing the problem with that code moving.
>
>> index af2594e4f35d..3c6a071fbbe3 100644
>> --- a/tools/testing/cxl/test/mock.c
>> +++ b/tools/testing/cxl/test/mock.c
>> @@ -268,23 +268,6 @@ struct cxl_dport *__wrap_devm_cxl_add_rch_dport(struct cxl_port *port,
>> }
>> EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_add_rch_dport, "CXL");
>>
>> -resource_size_t __wrap_cxl_rcd_component_reg_phys(struct device *dev,
>> - struct cxl_dport *dport)
>> -{
>> - int index;
>> - resource_size_t component_reg_phys;
>> - struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
>> -
>> - if (ops && ops->is_mock_port(dev))
>> - component_reg_phys = CXL_RESOURCE_NONE;
>> - else
>> - component_reg_phys = cxl_rcd_component_reg_phys(dev, dport);
>> - put_cxl_mock_ops(index);
>> -
>> - return component_reg_phys;
>> -}
>> -EXPORT_SYMBOL_NS_GPL(__wrap_cxl_rcd_component_reg_phys, "CXL");
>> -
>> void __wrap_cxl_endpoint_parse_cdat(struct cxl_port *port)
>> {
>> int index;
>> --
>> 2.34.1
>>
>>
Powered by blists - more mailing lists