X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-x86%2Facpi.h;h=f8a89793ac8cbb865dbedb2b70181236d2a4288d;hb=c2a7dcad9f0d92d7a96e735abb8bec7b9c621536;hp=0693689d4146bdb1be887638a8c6ade246843e35;hpb=b981d8b3f5e008ff10d993be633ad00564fc22cd;p=linux-2.6 diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 0693689d41..f8a89793ac 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h @@ -1,5 +1,32 @@ +#ifndef _ASM_X86_ACPI_H +#define _ASM_X86_ACPI_H + #ifdef CONFIG_X86_32 # include "acpi_32.h" #else # include "acpi_64.h" #endif + +#include + +/* + * Check if the CPU can handle C2 and deeper + */ +static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) +{ + /* + * Early models (<=5) of AMD Opterons are not supposed to go into + * C2 state. + * + * Steppings 0x0A and later are good + */ + if (boot_cpu_data.x86 == 0x0F && + boot_cpu_data.x86_vendor == X86_VENDOR_AMD && + boot_cpu_data.x86_model <= 0x05 && + boot_cpu_data.x86_mask < 0x0A) + return 1; + else + return max_cstate; +} + +#endif