acpi.h 632 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _ASM_X86_ACPI_H
  2. #define _ASM_X86_ACPI_H
  3. #ifdef CONFIG_X86_32
  4. # include "acpi_32.h"
  5. #else
  6. # include "acpi_64.h"
  7. #endif
  8. #include <asm/processor.h>
  9. /*
  10. * Check if the CPU can handle C2 and deeper
  11. */
  12. static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
  13. {
  14. /*
  15. * Early models (<=5) of AMD Opterons are not supposed to go into
  16. * C2 state.
  17. *
  18. * Steppings 0x0A and later are good
  19. */
  20. if (boot_cpu_data.x86 == 0x0F &&
  21. boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
  22. boot_cpu_data.x86_model <= 0x05 &&
  23. boot_cpu_data.x86_mask < 0x0A)
  24. return 1;
  25. else
  26. return max_cstate;
  27. }
  28. #endif