Re: [PATCH v2 06/21] cxl: Add callback to parse the DSLBIS subtable from CDAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 29, 2023 at 01:59:12PM -0700, Dave Jiang wrote:
> 
> 
> On 3/28/23 5:44 PM, Alison Schofield wrote:
> > On Mon, Mar 27, 2023 at 02:44:39PM -0700, Dave Jiang wrote:
> > > Provide a callback to parse the Device Scoped Latency and Bandwidth
> > > Information Structure (DSLBIS) in the CDAT structures. The DSLBIS
> > > contains the bandwidth and latency information that's tied to a DSMAS
> > > handle. The driver will retrieve the read and write latency and
> > > bandwidth associated with the DSMAS which is tied to a DPA range.
> > > 
> > > Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> > > 
> > > ---
> > > v2:
> > > - Add size check to DSLIBIS table. (Lukas)
> > > - Remove unnecessary entry type check. (Jonathan)
> > > - Move data_type check to after match. (Jonathan)
> > > - Skip unknown data type. (Jonathan)
> > > - Add overflow check for unit multiply. (Jonathan)
> > > - Use dev_warn() when entries parsing fail. (Jonathan)
> > > ---
> > >   drivers/cxl/core/cdat.c |   41 +++++++++++++++++++++++++++++++++++++++++
> > >   drivers/cxl/cxlpci.h    |   34 +++++++++++++++++++++++++++++++++-
> > >   drivers/cxl/port.c      |    9 ++++++++-
> > >   3 files changed, 82 insertions(+), 2 deletions(-)
> > > 

snip

> > > --- a/drivers/cxl/port.c
> > > +++ b/drivers/cxl/port.c
> > > @@ -152,8 +152,15 @@ static int cxl_port_probe(struct device *dev)
> > >   			rc = cdat_table_parse_dsmas(port->cdat.table,
> > >   						    cxl_dsmas_parse_entry,
> > >   						    (void *)&dsmas_list);
> > > -			if (rc < 0)
> > > +			if (rc > 0) {
> > > +				rc = cdat_table_parse_dslbis(port->cdat.table,
> > > +							     cxl_dslbis_parse_entry,
> > > +							     (void *)&dsmas_list);
> > > +				if (rc <= 0)
> > > +					dev_warn(dev, "Failed to parse DSLBIS: %d\n", rc);
> > > +			} else {
> > >   				dev_warn(dev, "Failed to parse DSMAS: %d\n", rc);
> > > +			}
> > 
> > I see you touch this func more than once. Maybe some earlier nips and
> > tucks, makes this more readable.
> 
> Not sure what you mean.

I thought this was the same func, cxl_port_probe(), that I commented
on in the previous patch, so maybe it was already getting re-aligned.

> 
> > 
> > >   			dsmas_list_destroy(&dsmas_list);
> > >   		}
> > > 
> > > 



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux