platform/x86: amd-pmc: Add support for logging SMU metrics
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Tue, 29 Jun 2021 08:48:00 +0000 (14:18 +0530)
committerHans de Goede <hdegoede@redhat.com>
Wed, 14 Jul 2021 13:09:22 +0000 (15:09 +0200)
commit76620567496237f1f1f54683ec7da1755ee501d7
tree9adb2c494ce029eaeed44d12485eb942db2cddf9
parent162b937a8064029ed22cd1039d4dcf7f1721f940
platform/x86: amd-pmc: Add support for logging SMU metrics

SMU provides a way to dump the s0ix debug statistics in the form of a
metrics table via a of set special mailbox commands.

Add support to the driver which can send these commands to SMU and expose
the information received via debugfs. The information contains the s0ix
entry/exit, active time of each IP block etc.

As a side note, SMU subsystem logging is not supported on Picasso based
SoC's.

Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210629084803.248498-5-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c