blob: ab72d46f52c6c3db502db130cd6428cfbe71bacd [file] [log] [blame]
Venkatesh Pallipadi05131ec2005-10-23 16:31:00 -04001/*
Uwe Zeisbergerf30c2262006-10-03 23:01:26 +02002 * arch/ia64/kernel/acpi-processor.c
Venkatesh Pallipadi05131ec2005-10-23 16:31:00 -04003 *
4 * Copyright (C) 2005 Intel Corporation
5 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
6 * - Added _PDC for platforms with Intel CPUs
7 */
8
9#include <linux/kernel.h>
10#include <linux/module.h>
11#include <linux/init.h>
12#include <linux/acpi.h>
13
14#include <acpi/processor.h>
15#include <asm/acpi.h>
16
17static void init_intel_pdc(struct acpi_processor *pr)
18{
Alex Chiang407cd872009-12-20 12:19:19 -070019 u32 *buf = (u32 *)pr->pdc->pointer->buffer.pointer;
Venkatesh Pallipadi05131ec2005-10-23 16:31:00 -040020
21 buf[0] = ACPI_PDC_REVISION_ID;
22 buf[1] = 1;
Venki Pallipadice45b512007-05-22 15:35:24 -070023 buf[2] = ACPI_PDC_EST_CAPABILITY_SMP;
Zhao Yakui3abbd332008-01-28 13:53:21 +080024 /*
25 * The default of PDC_SMP_T_SWCOORD bit is set for IA64 cpu so
26 * that OSPM is capable of native ACPI throttling software
27 * coordination using BIOS supplied _TSD info.
28 */
29 buf[2] |= ACPI_PDC_SMP_T_SWCOORD;
Venkatesh Pallipadi05131ec2005-10-23 16:31:00 -040030
Venkatesh Pallipadi05131ec2005-10-23 16:31:00 -040031 return;
32}
33
34/* Initialize _PDC data based on the CPU vendor */
35void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
36{
Venkatesh Pallipadi05131ec2005-10-23 16:31:00 -040037 init_intel_pdc(pr);
38 return;
39}
40
41EXPORT_SYMBOL(arch_acpi_processor_init_pdc);
Pallipadi, Venkatesh7b768f02009-06-19 17:14:59 -070042
43void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr)
44{
45 if (pr->pdc) {
46 kfree(pr->pdc->pointer->buffer.pointer);
47 kfree(pr->pdc->pointer);
48 kfree(pr->pdc);
49 pr->pdc = NULL;
50 }
51}
52
53EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);