blob: f8a89793ac8cbb865dbedb2b70181236d2a4288d [file] [log] [blame]
Alexey Starikovskiyc1c30632007-11-26 20:42:19 +01001#ifndef _ASM_X86_ACPI_H
2#define _ASM_X86_ACPI_H
3
Thomas Gleixner96a388d2007-10-11 11:20:03 +02004#ifdef CONFIG_X86_32
5# include "acpi_32.h"
6#else
7# include "acpi_64.h"
8#endif
Alexey Starikovskiyc1c30632007-11-26 20:42:19 +01009
10#include <asm/processor.h>
11
12/*
13 * Check if the CPU can handle C2 and deeper
14 */
15static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
16{
17 /*
18 * Early models (<=5) of AMD Opterons are not supposed to go into
19 * C2 state.
20 *
21 * Steppings 0x0A and later are good
22 */
23 if (boot_cpu_data.x86 == 0x0F &&
24 boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
25 boot_cpu_data.x86_model <= 0x05 &&
26 boot_cpu_data.x86_mask < 0x0A)
27 return 1;
28 else
29 return max_cstate;
30}
31
32#endif