[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBzn2dYVhh4W_I0S@aschofie-mobl2.lan>
Date: Thu, 8 May 2025 10:20:25 -0700
From: Alison Schofield <alison.schofield@...el.com>
To: Alejandro Lucero Palau <alucerop@....com>
CC: <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>, 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 Thu, May 08, 2025 at 01:45:16PM +0100, Alejandro Lucero Palau wrote:
>
> 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.
BTW - It works fine, I just see no comment noting that the wrapper can
be removed because this function was 'elevated' out of the core? And I'm
not sure that is a good explanation.
>
>
> >
> > > 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