lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 12/32] s390/pci: get SHM information from list pci
From
Date
On Thu, 2021-12-09 at 16:47 +0100, Christian Borntraeger wrote:
> Am 07.12.21 um 21:57 schrieb Matthew Rosato:
> > KVM will need information on the special handle mask used to indicate
> > emulated devices. In order to obtain this, a new type of list pci call
> > must be made to gather the information. Remove the unused data pointer
> > from clp_list_pci and __clp_add and instead optionally pass a pointer to
> > a model-dependent-data field. Additionally, allow for clp_list_pci calls
> > that don't specify a callback - in this case, just do the first pass of
> > list pci and exit.
> >
> > Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> > ---
> > arch/s390/include/asm/pci.h | 6 ++++++
> > arch/s390/include/asm/pci_clp.h | 2 +-
> > arch/s390/pci/pci.c | 19 +++++++++++++++++++
> > arch/s390/pci/pci_clp.c | 16 ++++++++++------
> > 4 files changed, 36 insertions(+), 7 deletions(-)
> >
---8<---
> >
> > +int zpci_get_mdd(u32 *mdd)
> > +{
> > + struct clp_req_rsp_list_pci *rrb;
> > + int rc;
> > +
> > + if (!mdd)
> > + return -EINVAL;
> > +
> > + rrb = clp_alloc_block(GFP_KERNEL);
> > + if (!rrb)
> > + return -ENOMEM;
> > +
> > + rc = clp_list_pci(rrb, mdd, NULL);
> > +
> > + clp_free_block(rrb);
> > + return rc;
> > +}
> > +EXPORT_SYMBOL_GPL(zpci_get_mdd);
>
> Maybe move this into pci_clp.c to avoid the export of clp_alloc_block and void clp_free_block?
> Niklas?

That was actually my idea. I'm thinking of moving clp_get_state(),
clp_scan_pci_devices(), ans clp_refresh_fh() to pci.c too because I
feel these deal with higher level concerns than the rest of pci_clp.c.

I have no strong opinion though and might be thinking ahead to much
here. With the change discussed in the other mail of not modifying
clp_list_pci() maybe it would be better to keep it here and thus this
patch more focused and minimal and then possibly move it with the other
similar functions.

\
 
 \ /
  Last update: 2021-12-10 09:47    [W:0.096 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site