[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5zb2fYQJD1DPgFc@rric.localdomain>
Date: Fri, 31 Jan 2025 15:19:05 +0100
From: Robert Richter <rrichter@....com>
To: Gregory Price <gourry@...rry.net>
Cc: Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>
Subject: Re: [PATCH v1 12/29] cxl: Modify address translation callback for
generic use
On Tue, Jan 07, 2025 at 01:44:56PM -0500, Gregory Price wrote:
> On Tue, Jan 07, 2025 at 03:09:58PM +0100, Robert Richter wrote:
> > The root decoder address translation callback could be reused for
> > other decoders too. For generic use of the callback, change the
> > function interface to use a decoder argument instead of the root
> > decoder.
> >
> > Signed-off-by: Robert Richter <rrichter@....com>
> > ---
> > drivers/cxl/acpi.c | 4 ++--
> > drivers/cxl/core/region.c | 2 +-
> > drivers/cxl/cxl.h | 5 ++---
> > 3 files changed, 5 insertions(+), 6 deletions(-)
> >
> ... snip ...
> > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> > index b3989dc58ed1..be7685fe8a23 100644
> > --- a/drivers/cxl/cxl.h
> > +++ b/drivers/cxl/cxl.h
> > @@ -443,8 +443,7 @@ struct cxl_switch_decoder {
> > struct cxl_dport *target[];
> > };
> >
> > -struct cxl_root_decoder;
> > -typedef u64 (*cxl_hpa_to_spa_fn)(struct cxl_root_decoder *cxlrd, u64 hpa);
> > +typedef u64 (*cxl_to_hpa_fn)(struct cxl_decoder *cxld, u64 hpa);
> >
>
> changed from _to_spa to _to_hpa? Was the name wrong previously? Maybe at
> least comment on this in the changelog.
A root decoder's HPA is equal to its SPA, but else it may be
different. Thus, I changed the name of the function type to
cxl_to_hpa_fn.
-Robert
Powered by blists - more mailing lists