diff options
author | Len Brown <len.brown@intel.com> | 2006-06-15 15:41:53 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-15 15:41:53 -0400 |
commit | 3e8e7c93d7eb091463839b5212789c4aae09459e (patch) | |
tree | 697a04ce1202b8d8ff398b96944be844329b713c /arch/x86_64 | |
parent | 36a557d1f48669c57f59e37d9334400a29e4e53c (diff) | |
parent | ffd642e748c867a7339b57225b8bf8b9a0dcd9c5 (diff) |
Pull bugzilla-5653 into release branch
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/acpi/Makefile | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/acpi/processor.c | 72 |
2 files changed, 1 insertions, 72 deletions
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index 4fe97071f297..080b9963f1bc 100644 --- a/arch/x86_64/kernel/acpi/Makefile +++ b/arch/x86_64/kernel/acpi/Makefile | |||
@@ -4,5 +4,6 @@ obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | |||
4 | 4 | ||
5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
6 | obj-y += processor.o | 6 | obj-y += processor.o |
7 | processor-y := ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o | ||
7 | endif | 8 | endif |
8 | 9 | ||
diff --git a/arch/x86_64/kernel/acpi/processor.c b/arch/x86_64/kernel/acpi/processor.c deleted file mode 100644 index 3bdc2baa5bb1..000000000000 --- a/arch/x86_64/kernel/acpi/processor.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * arch/x86_64/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 | |||
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 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
48 | |||
49 | obj->type = ACPI_TYPE_BUFFER; | ||
50 | obj->buffer.length = 12; | ||
51 | obj->buffer.pointer = (u8 *) buf; | ||
52 | obj_list->count = 1; | ||
53 | obj_list->pointer = obj; | ||
54 | pr->pdc = obj_list; | ||
55 | |||
56 | return; | ||
57 | } | ||
58 | |||
59 | /* Initialize _PDC data based on the CPU vendor */ | ||
60 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
61 | { | ||
62 | unsigned int cpu = pr->id; | ||
63 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
64 | |||
65 | pr->pdc = NULL; | ||
66 | if (c->x86_vendor == X86_VENDOR_INTEL && cpu_has(c, X86_FEATURE_EST)) | ||
67 | init_intel_pdc(pr, c); | ||
68 | |||
69 | return; | ||
70 | } | ||
71 | |||
72 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||