tools/cpupower: Add Hygon Dhyana support
The tool cpupower is useful to get CPU frequency information and monitor power stats on the Hygon Dhyana platform. So add Hygon Dhyana support to it by checking vendor and family to share the code path of AMD family 17h. Signed-off-by: Pu Wen <puwen@hygon.cn> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> CC: Prarit Bhargava <prarit@redhat.com> CC: Shuah Khan <shuah@kernel.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Thomas Renninger <trenn@suse.com> CC: linux-pm@vger.kernel.org Link: http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn
This commit is contained in:
@@ -170,6 +170,7 @@ static int get_boost_mode(unsigned int cpu)
|
||||
unsigned long pstates[MAX_HW_PSTATES] = {0,};
|
||||
|
||||
if (cpupower_cpu_info.vendor != X86_VENDOR_AMD &&
|
||||
cpupower_cpu_info.vendor != X86_VENDOR_HYGON &&
|
||||
cpupower_cpu_info.vendor != X86_VENDOR_INTEL)
|
||||
return 0;
|
||||
|
||||
@@ -190,8 +191,9 @@ static int get_boost_mode(unsigned int cpu)
|
||||
printf(_(" Supported: %s\n"), support ? _("yes") : _("no"));
|
||||
printf(_(" Active: %s\n"), active ? _("yes") : _("no"));
|
||||
|
||||
if (cpupower_cpu_info.vendor == X86_VENDOR_AMD &&
|
||||
cpupower_cpu_info.family >= 0x10) {
|
||||
if ((cpupower_cpu_info.vendor == X86_VENDOR_AMD &&
|
||||
cpupower_cpu_info.family >= 0x10) ||
|
||||
cpupower_cpu_info.vendor == X86_VENDOR_HYGON) {
|
||||
ret = decode_pstates(cpu, cpupower_cpu_info.family, b_states,
|
||||
pstates, &pstate_no);
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user