On Fri, 1 Sep 2023, Shravan Kumar Ramani wrote: > Add new access mechanism and list of supported events to program > and read the counters in BlueField-3. > Performance counter blocks being added for BlueField-3 include: > - Memory Sub-system (mss) which has counters for monitoring > various DRAM and related skylib events > - Last level Tile, which has 2 sets of counters (llt, llt_miss) > for monitoring Tile and cache metrics > > Signed-off-by: Shravan Kumar Ramani <shravankr@xxxxxxxxxx> > Reviewed-by: Vadim Pasternak <vadimp@xxxxxxxxxx> > Reviewed-by: David Thompson <davthompson@xxxxxxxxxx> > --- > drivers/platform/mellanox/mlxbf-pmc.c | 685 ++++++++++++++++++++++++-- > 1 file changed, 653 insertions(+), 32 deletions(-) > - ret = device_property_read_u32(dev, "tile_num", &pmc->tile_count); > - if (ret) > - return ret; > + if (device_property_read_u32(dev, "tile_num", &pmc->tile_count)) { > + if (device_property_read_u8(dev, "llt_enable", > + &pmc->llt_enable)) { Just put this into a single line. > + dev_err(dev, "Number of tiles/LLTs undefined\n"); > + return -EINVAL; > + } > + if (device_property_read_u8(dev, "mss_enable", > + &pmc->mss_enable)) { Ditto. -- i.