[Skiboot] [RFC PATCH 0/6] OPAL debugfs calls

Cédric Le Goater clg at kaod.org
Fri Sep 18 02:35:37 AEST 2020


These patches add a couple of OPAL read/write calls which let the OPAL
drivers expose any kind of low level information : configuration, HW
registers, statistics. The write call can perform some reconfiguration.

I have been using them for a while on P9 and P10 to query XIVE internals,
time statistics on HW procedures and to modify the allocation of XIVE
resources for guests. It might be useful to others as debug or bringup

Last is the quickly-coded generic Linux driver.

One problem is our snprintf implementation in OPAL which does not
return the number of bytes that would have been written if the buffer
was large enough. It would help the Linux driver.



Cédric Le Goater (6):
  core: Add debugfs framework
  xive/p9: Add debugfs entries for internal tables
  xive/p9: Add debugfs entries for performance
  core: Add statistics framework
  xive/p9: Add statistics for HW procedures
  xive/p9: Allocate all XIVE structures on a selected chip

 include/opal-api.h     |   4 +-
 include/opal-debug.h   |  26 +++
 include/stat.h         |  49 ++++++
 include/xive-p9-regs.h |  14 ++
 core/opal-debug.c      |  85 +++++++++
 core/stat.c            |  98 +++++++++++
 hw/xive.c              | 390 +++++++++++++++++++++++++++++++++++++++--
 core/Makefile.inc      |   1 +
 8 files changed, 649 insertions(+), 18 deletions(-)
 create mode 100644 include/opal-debug.h
 create mode 100644 include/stat.h
 create mode 100644 core/opal-debug.c
 create mode 100644 core/stat.c


More information about the Skiboot mailing list