tools/power/turbostat: Add skeleton support for table driven feature enumeration
authorZhang Rui <rui.zhang@intel.com>
Sun, 27 Aug 2023 13:52:53 +0000 (21:52 +0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 27 Sep 2023 14:14:18 +0000 (22:14 +0800)
commit45232ab168a3c5abad86eafaef2beed8d7037666
treef5e82fab560eb1448f369a3b83d6cfe8f43313b3
parent48674c1bb6124fe392e8fed80a39fcb3f62e6551
tools/power/turbostat: Add skeleton support for table driven feature enumeration

Turbostat supports a series of features that may diverge among different
CPU models.

Current code uses various of CPU model checks in different places to
handle this, which makes the code hard to maintain.

Add skeleton support for table driven feature enumeration to replace the
current error-prone CPU model checks and global variables.

Note: by comparing the CPU models with intel-family.h, it is found that
turbostat support for below four Models are missing, including
INTEL_FAM6_ICELAKE, INTEL_FAM6_ATOM_SILVERMONT_MID,
INTEL_FAM6_ATOM_AIRMONT_MID and INTEL_FAM6_ATOM_AIRMONT_NP. Adding
support for these models is a different work, thus it is not covered in
this patch set.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c