ACPI: CPPC: Fix enabling CPPC on AMD systems with shared memory
[sfrench/cifs-2.6.git] / arch / x86 / kernel / acpi / cppc.c
index 734b96454896bd7b9e80fffd24187f7995a379c0..8d8752b44f11395298a40acce79de2027614248b 100644 (file)
@@ -16,6 +16,12 @@ bool cpc_supported_by_cpu(void)
        switch (boot_cpu_data.x86_vendor) {
        case X86_VENDOR_AMD:
        case X86_VENDOR_HYGON:
+               if (boot_cpu_data.x86 == 0x19 && ((boot_cpu_data.x86_model <= 0x0f) ||
+                   (boot_cpu_data.x86_model >= 0x20 && boot_cpu_data.x86_model <= 0x2f)))
+                       return true;
+               else if (boot_cpu_data.x86 == 0x17 &&
+                        boot_cpu_data.x86_model >= 0x70 && boot_cpu_data.x86_model <= 0x7f)
+                       return true;
                return boot_cpu_has(X86_FEATURE_CPPC);
        }
        return false;