@@ -802,7 +802,8 @@ void acpi_dead_idle(void)
__mwait(cx->address, 0);
}
}
- else if ( current_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+ else if ( (current_cpu_data.x86_vendor &
+ (X86_VENDOR_AMD | X86_VENDOR_HYGON)) &&
cx->entry_method == ACPI_CSTATE_EM_SYSIO )
{
/* Intel prefers not to use SYSIO */
@@ -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;
@@ -360,7 +360,7 @@ unsigned int __init powernow_register_driver()
for_each_online_cpu(i) {
struct cpuinfo_x86 *c = &cpu_data[i];
- if (c->x86_vendor != X86_VENDOR_AMD)
+ if (!(c->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
ret = -ENODEV;
else
{