[Skiboot] [PATCH v5 0/9]OPAL support for Nest instrumentation
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Thu Sep 3 19:22:27 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.
dtc output from /proc/device-tree (tuleta system):
(dt entried related to Nest instrumentation)
nest-counters {
compatible = "ibm,opal-in-memory-counters";
ranges;
#address-cells = <0x2>;
phandle = <0x1000005a>;
#size-cells = <0x2>;
linux,phandle = <0x1000005a>;
chip at e000720000 {
max-dimm-rate = <0x5dc0>;
ranges = <0x0 0xe0 0x720000 0x30000>;
#address-cells = <0x1>;
phandle = <0x100000a3>;
#size-cells = <0x1>;
linux,phandle = <0x100000a3>;
abus {
ranges;
#address-cells = <0x1>;
phandle = <0x100000b7>;
#size-cells = <0x1>;
linux,phandle = <0x100000b7>;
abus at 318 {
id = <0x0>;
reg = <0x318 0x8>;
unit = "MiB";
scale = "7.629e-6";
phandle = <0x100000b8>;
linux,phandle = <0x100000b8>;
};
abus at 320 {
id = <0x1>;
reg = <0x320 0x8>;
unit = "MiB";
scale = "7.629e-6";
phandle = <0x100000b9>;
linux,phandle = <0x100000b9>;
};
abus at 328 {
id = <0x2>;
reg = <0x328 0x8>;
unit = "MiB";
scale = "7.629e-6";
phandle = <0x100000ba>;
linux,phandle = <0x100000ba>;
};
};
xbus {
ranges;
#address-cells = <0x1>;
phandle = <0x100000b3>;
#size-cells = <0x1>;
linux,phandle = <0x100000b3>;
xbus at 218 {
id = <0x0>;
reg = <0x218 0x8>;
unit = "MiB";
scale = "7.629e-6";
phandle = <0x100000b4>;
linux,phandle = <0x100000b4>;
};
xbus at 220 {
id = <0x1>;
reg = <0x220 0x8>;
unit = "MiB";
scale = "7.629e-6";
phandle = <0x100000b5>;
linux,phandle = <0x100000b5>;
};
xbus at 228 {
id = <0x3>;
reg = <0x228 0x8>;
unit = "MiB";
scale = "7.629e-6";
phandle = <0x100000b6>;
linux,phandle = <0x100000b6>;
};
};
....... (pasted only one chip and couple of nest units DT entries)
Change log v4:
1)Moved top level "nest-counters" node from /ibm,opal to "/" root.
2)Added "range" property fields
3)Added #address-cell and #size-cells
4)Added code commentary and modified commit messages.
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
10)Renamed the OPAL call from "OPAL_NEST_IMA_CONTROL" to "OPAL_NEST_COUNTERS_CONTROL"
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
events.
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
Create Device-Tree(DT) nodes to pass "nest-counter" information
nest unit parser and nest mcs unit support functions
nest powerbus unit support
nest abus and xbus units support
Device-Tree entry for max 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 | 496 ++++++++++++++++++++++++++++++++++++
include/nest.h | 220 ++++++++++++++++
include/opal-api.h | 3 +-
include/platform.h | 1 +
8 files changed, 768 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
--
1.9.1
More information about the Skiboot
mailing list