Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / tools / power / cpupower / utils / cpufreq-info.c
index ccd08dd009962de64d09ce1ceacf38ca9bfed6c2..c3f39d5128ee4e8445cb0921f1485224fc252914 100644 (file)
@@ -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)