acpi-processor.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * arch/ia64/kernel/acpi-processor.c
  3. *
  4. * Copyright (C) 2005 Intel Corporation
  5. * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
  6. * - Added _PDC for platforms with Intel CPUs
  7. */
  8. #include <linux/kernel.h>
  9. #include <linux/module.h>
  10. #include <linux/init.h>
  11. #include <linux/acpi.h>
  12. #include <acpi/processor.h>
  13. #include <asm/acpi.h>
  14. static void init_intel_pdc(struct acpi_processor *pr)
  15. {
  16. u32 *buf = (u32 *)pr->pdc->pointer->buffer.pointer;
  17. buf[0] = ACPI_PDC_REVISION_ID;
  18. buf[1] = 1;
  19. buf[2] = ACPI_PDC_EST_CAPABILITY_SMP;
  20. /*
  21. * The default of PDC_SMP_T_SWCOORD bit is set for IA64 cpu so
  22. * that OSPM is capable of native ACPI throttling software
  23. * coordination using BIOS supplied _TSD info.
  24. */
  25. buf[2] |= ACPI_PDC_SMP_T_SWCOORD;
  26. return;
  27. }
  28. /* Initialize _PDC data based on the CPU vendor */
  29. void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
  30. {
  31. init_intel_pdc(pr);
  32. return;
  33. }
  34. EXPORT_SYMBOL(arch_acpi_processor_init_pdc);
  35. void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr)
  36. {
  37. if (pr->pdc) {
  38. kfree(pr->pdc->pointer->buffer.pointer);
  39. kfree(pr->pdc->pointer);
  40. kfree(pr->pdc);
  41. pr->pdc = NULL;
  42. }
  43. }
  44. EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);