On 28.11.22 15:42:38, Dan Williams wrote:
> Robert Richter wrote:
> > On 24.11.22 10:35:27, Dan Williams wrote:
> > > In preparation for devm_cxl_add_endpoint() to call out to
> > > cxl_rcrb_to_component() to map the upstream port component registers,
> > > move devm_cxl_add_endpoint() from the cxl_core to the cxl_mem driver.
> > > This is due to the organization of cxl_test that mandates that the
> > > cxl_core not call out to any mocked symbols. It also cleans up the
> > > export of devm_cxl_add_endpoint() which is just a wrapper around
> > > devm_cxl_add_port().
> > 
> > The last sentense is unclear to me? I see you just make it static as
> > there is only a single user, do you mean that here? The change itself
> > looks good.
> 
> Yeah, it does read strangely. I changed it to:
> 
>     cxl/mem: Move devm_cxl_add_endpoint() from cxl_core to cxl_mem
>     
>     tl;dr: Clean up an unnecessary export and enable cxl_test.
>     
>     An RCD (Restricted CXL Device), in contrast to a typical CXL device in
>     a VH topology, obtains its component registers from the bottom half of
>     the associated CXL host bridge RCRB (Root Complex Register Block). In
>     turn this means that cxl_rcrb_to_component() needs to be called from
>     devm_cxl_add_endpoint().
>     
>     Presently devm_cxl_add_endpoint() is part of the CXL core, but the only
>     user is the CXL mem module. Move it from cxl_core to cxl_mem to not only
>     get rid of an unnecessary export, but to also enable its call out to
>     cxl_rcrb_to_component(), in a subsequent patch, to be mocked by
>     cxl_test. Recall that cxl_test can only mock exported symbols, and since
>     cxl_rcrb_to_component() is itself inside the core, all callers must be
>     outside of cxl_core to allow cxl_test to mock it.
> 
> > Reviewed-by: Robert Richter <rrich...@amd.com>

Yep, thanks for changing.

-Robert

Reply via email to