[Skiboot] [PATCH v4 0/9] OPAL support for Nest instrumentation

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Mon Aug 17 03:19:18 AEST 2015

Patchset adds support for Nest instrumentation services
in OPAL. Power8 has Nest instrumentation enabled with which
per-chip metrics like memory bandwidth, Powerbus, Xlink and
Alink metrics can be obtained.

Patchset does two things,1) At the time of boot, it detects
the Nest instrumentation feature and created device-tree
entries to pass the information to kernel. Secondly, it
implements an opal call to control the PORE_SLW_IMA microcode
from kernel to start/stop Nest PMU counter collection.
Patchset tested only in IBM Tuleta boxes.

Device tree layout for Nest instrumentations:

/ibm,opal/nest-counters		<device node>
 -compatible			("ibm,opal-in-memory-counters")
 -homer-offset@<chip-id>	<sub node>
   -compatible			("ibm,opal-chip-homer-slw-offset")
   -offset			("chip homer base + slw ima offset")
 -alink				<one of the nest units as sub nodes>
   -compatible			("ibm,nest-counters-chip")
   -alink0			<event offset in homer slw memory region for counter data>
   -alink0.scale		<event related>
   -alink0.unit			<event related>

Change log v3:

1)Renamed the top level device tree(dt) from "nest-ima" to "nest-counters"
2)Moved the toplevel device node from "/" to "/ibm,opal"
3)Added "compatible" field at toplevel node
3)Renamed the per chip homer offset node from "ima-chip" to "homer-offset"
4)Added "compatible" filed to "homer-offset" node
5)Renamed "reg" property file from per chip node to "offset"
6)Converted dt node and property names from caps to lower case.
7)Removed "catalogue" and replaced it with "catalog" for consistency
8)Renamed the "dimm" rate dt file to "max-dimm-rate"
9)Added a macro for SAMPLE rate value
11)Added couple of more parameters for OPAL call to make it extendable for
 future modes and updated the document.
12)Added two more events for powerbus units.
13)Merged per unit device tree event creation function to a common on with
 additional parameters.
14)Added checks for "unit" and "scale" pointers in the dt creation function for
15)Made changes to commit messages and code commeints based on the code changes
 and review.
16)Rearranged the patchset for easy reviewing.
17)Removed the "scale." and "unit." from the event unit and scale file.
18)Added domain parameter to event parser function.

Change log v2:

1) Renamed uintXX_t and __beXX variable type to uXX type.
2) Merged the Makefile and core/init file update patch as one to help out review
3) Merged nest parser function and nest mcs support function as one patch
   to fix compilation issue reported.
4) Rebased with latest skiboot code and modified OPAL call number to 117 from 116
5) Added more comments and made changes to commit message
6) Removed commented lines in the header file structures.

Change log from v1:

1) Modified OPAL-API interface, now opal call has two parameters and have
   add documentation for the same.
2) Have split the lid loading part into two functions, first queues lid loading
   and second part verifies the magic and updates the data structure.
3) Added workaround for default sampling rate issue
4) Added more comments,fixed spelling errors,removed type cast for malloc
5) Moved "NEST_CATALOGUE_SIZE" macro definition from mem-map.h to nest.h
6) Added "Naples" chip id check
7) Merged alink (patch 8) and xlink (patch 9) dt type functions
8) Removed memset since snprintf takes care of adding trailing null
9) Renamed some variables and function for consistency.
10) Removed "ibm-fsp/firenze" from patchset subject since this series is not
    specific to "ibm-fsp/firenze" platform.
11) Made changes to commit messages.

Change log from RFC:

1) Removed "uncore" naming and replaced it with "nest/ima" in all the
   file and function.
2) Added a DT entry to pass DIMM rate information
3) Added nest instrumentation detection code and catalog parser function
4) Added support functions for different nest units.

Kindly let me know your comments and feedback.

Madhavan Srinivasan (9):
  nest data structure definitions
  OPAL nest feature detection
  Device-Tree(DT) entry for per-chip homer offset
  nest unit parser and nest mcs unit support functions
  nest powerbus unit support
  nest alink and xlink units support
  Device-Tree entry for dimm rate
  nest sampling rate workaround
  Add OPAL call to enable/disable nest pmu

 core/init.c                         |   9 +
 doc/opal-api/opal-nest-counters.txt |  37 +++
 hw/Makefile.inc                     |   2 +-
 hw/fsp/fsp.c                        |   2 +
 hw/nest.c                           | 455 ++++++++++++++++++++++++++++++++++++
 include/nest.h                      | 220 +++++++++++++++++
 include/opal-api.h                  |   3 +-
 include/platform.h                  |   1 +
 8 files changed, 727 insertions(+), 2 deletions(-)
 create mode 100644 doc/opal-api/opal-nest-counters.txt
 create mode 100644 hw/nest.c
 create mode 100644 include/nest.h


More information about the Skiboot mailing list