summaryrefslogtreecommitdiff
path: root/xen/arch/x86/acpi/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorPu Wen <puwen@hygon.cn>2019-06-12 20:53:58 +0800
committerAndrew Cooper <andrew.cooper3@citrix.com>2019-06-12 13:59:05 +0100
commitbe9e6ddfc1592086d621922fa948f8c37c3ab319 (patch)
treedd86b7346d3e70803520d8d6448699258fb6f066 /xen/arch/x86/acpi/cpufreq/cpufreq.c
parent07513e15e6e7e5163bf4f59c747825cce748531c (diff)
x86/acpi: Add Hygon Dhyana support
Add Hygon Dhyana support to the acpi cpufreq and cpuidle subsystems by using the code path of AMD. Signed-off-by: Pu Wen <puwen@hygon.cn> Acked-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/acpi/cpufreq/cpufreq.c')
-rw-r--r--xen/arch/x86/acpi/cpufreq/cpufreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index f4e13e10e8..7086d1aa15 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -649,7 +649,8 @@ static int __init cpufreq_driver_init(void)
(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))
ret = cpufreq_register_driver(&acpi_cpufreq_driver);
else if ((cpufreq_controller == FREQCTL_xen) &&
- (boot_cpu_data.x86_vendor == X86_VENDOR_AMD))
+ (boot_cpu_data.x86_vendor &
+ (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
ret = powernow_register_driver();
return ret;
@@ -660,8 +661,9 @@ int cpufreq_cpu_init(unsigned int cpuid)
{
int ret;
- /* Currently we only handle Intel and AMD processor */
- if ( boot_cpu_data.x86_vendor & (X86_VENDOR_INTEL | X86_VENDOR_AMD) )
+ /* Currently we only handle Intel, AMD and Hygon processor */
+ if ( boot_cpu_data.x86_vendor &
+ (X86_VENDOR_INTEL | X86_VENDOR_AMD | X86_VENDOR_HYGON) )
ret = cpufreq_add_cpu(cpuid);
else
ret = -EFAULT;