lkml.org 
[lkml]   [2021]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 07/10] cxl/pci: Split cxl_pci_setup_regs()
On Wed, 10 Nov 2021 09:30:40 -0800
Ben Widawsky <ben.widawsky@intel.com> wrote:

> On 21-11-10 17:14:37, Jonathan Cameron wrote:
> > On Fri, 15 Oct 2021 16:30:42 -0700
> > Dan Williams <dan.j.williams@intel.com> wrote:
> >
> > > From: Ben Widawsky <ben.widawsky@intel.com>
> > >
> > > In preparation for moving parts of register mapping to cxl_core, split
> > > cxl_pci_setup_regs() into a helper that finds register blocks,
> > > (cxl_find_regblock()), and a generic wrapper that probes the precise
> > > register sets within a block (cxl_setup_regs()).
> > >
> > > Move the actual mapping (cxl_map_regs()) of the only register-set that
> > > cxl_pci cares about (memory device registers) up a level from the former
> > > cxl_pci_setup_regs() into cxl_pci_probe().
> > >
> > > With this change the unused component registers are no longer mapped,
> > > but the helpers are primed to move into the core.
> > >
> > > [djbw: drop cxl_map_regs() for component registers]
> > >
> > > Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
> > > [djbw: rebase on the cxl_register_map refactor]
> > > Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> > > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> >
> > Hi Ben / all,
> >
> > This is probably the best patch to comment on for this
> > (note it is not a comment about this patch, but more the state we end up
> > in after it).
> >
> > cxl_map_regs() is a generic function, but with the new split approach
> > as a result of this patch, we now always know at the caller which of
> > the types of map we are doing.
> >
> > I think it would be clearer to embrace that situation and drop cxl_map_regs()
> > in favor of directly calling the relevant specific versions such as
> > cxl_map_device_regs(). I can't immediately see how the generic cxl_map_regs()
> > will be useful to us going forwards.
> >
> > Jonathan
>
> I completely agree. Long term, something like cxl_map_regs() might be desirable
> for a Type2 device, but we have no such user today. Patches welcome?

Sure, will do.

J

\
 
 \ /
  Last update: 2021-11-10 18:48    [W:0.046 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site