aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/Makefile4
-rw-r--r--arch/ia64/kernel/acpi-processor.c27
-rw-r--r--arch/x86/kernel/acpi/Makefile2
-rw-r--r--arch/x86/kernel/acpi/processor.c25
-rw-r--r--drivers/acpi/processor_pdc.c21
-rw-r--r--include/acpi/processor.h2
6 files changed, 21 insertions, 60 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 2a75e937ae8d..e1236349c99f 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -18,10 +18,6 @@ obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
18obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o 18obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o
19obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o 19obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o
20 20
21ifneq ($(CONFIG_ACPI_PROCESSOR),)
22obj-y += acpi-processor.o
23endif
24
25obj-$(CONFIG_IA64_PALINFO) += palinfo.o 21obj-$(CONFIG_IA64_PALINFO) += palinfo.o
26obj-$(CONFIG_IOSAPIC) += iosapic.o 22obj-$(CONFIG_IOSAPIC) += iosapic.o
27obj-$(CONFIG_MODULES) += module.o 23obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/ia64/kernel/acpi-processor.c b/arch/ia64/kernel/acpi-processor.c
deleted file mode 100644
index 7ba5accebf66..000000000000
--- a/arch/ia64/kernel/acpi-processor.c
+++ /dev/null
@@ -1,27 +0,0 @@
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
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
17void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr)
18{
19 if (pr->pdc) {
20 kfree(pr->pdc->pointer->buffer.pointer);
21 kfree(pr->pdc->pointer);
22 kfree(pr->pdc);
23 pr->pdc = NULL;
24 }
25}
26
27EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);
diff --git a/arch/x86/kernel/acpi/Makefile b/arch/x86/kernel/acpi/Makefile
index fd5ca97a2ad5..6f35260bb3ef 100644
--- a/arch/x86/kernel/acpi/Makefile
+++ b/arch/x86/kernel/acpi/Makefile
@@ -4,7 +4,7 @@ obj-$(CONFIG_ACPI) += boot.o
4obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup_rm.o wakeup_$(BITS).o 4obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup_rm.o wakeup_$(BITS).o
5 5
6ifneq ($(CONFIG_ACPI_PROCESSOR),) 6ifneq ($(CONFIG_ACPI_PROCESSOR),)
7obj-y += cstate.o processor.o 7obj-y += cstate.o
8endif 8endif
9 9
10$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin 10$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin
diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
deleted file mode 100644
index 0f57307f8224..000000000000
--- a/arch/x86/kernel/acpi/processor.c
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Copyright (C) 2005 Intel Corporation
3 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
4 * - Added _PDC for platforms with Intel CPUs
5 */
6
7#include <linux/kernel.h>
8#include <linux/module.h>
9#include <linux/init.h>
10#include <linux/acpi.h>
11
12#include <acpi/processor.h>
13#include <asm/acpi.h>
14
15void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr)
16{
17 if (pr->pdc) {
18 kfree(pr->pdc->pointer->buffer.pointer);
19 kfree(pr->pdc->pointer);
20 kfree(pr->pdc);
21 pr->pdc = NULL;
22 }
23}
24
25EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c
index 48df08ebcec4..e786e2ce1882 100644
--- a/drivers/acpi/processor_pdc.c
+++ b/drivers/acpi/processor_pdc.c
@@ -1,3 +1,12 @@
1/*
2 * Copyright (C) 2005 Intel Corporation
3 * Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
4 *
5 * Alex Chiang <achiang@hp.com>
6 * - Unified x86/ia64 implementations
7 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
8 * - Added _PDC for platforms with Intel CPUs
9 */
1#include <linux/dmi.h> 10#include <linux/dmi.h>
2 11
3#include <acpi/acpi_drivers.h> 12#include <acpi/acpi_drivers.h>
@@ -121,6 +130,16 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr)
121 return status; 130 return status;
122} 131}
123 132
133static void acpi_processor_cleanup_pdc(struct acpi_processor *pr)
134{
135 if (pr->pdc) {
136 kfree(pr->pdc->pointer->buffer.pointer);
137 kfree(pr->pdc->pointer);
138 kfree(pr->pdc);
139 pr->pdc = NULL;
140 }
141}
142
124void acpi_processor_set_pdc(struct acpi_processor *pr) 143void acpi_processor_set_pdc(struct acpi_processor *pr)
125{ 144{
126 if (arch_has_acpi_pdc() == false) 145 if (arch_has_acpi_pdc() == false)
@@ -128,7 +147,7 @@ void acpi_processor_set_pdc(struct acpi_processor *pr)
128 147
129 acpi_processor_init_pdc(pr); 148 acpi_processor_init_pdc(pr);
130 acpi_processor_eval_pdc(pr); 149 acpi_processor_eval_pdc(pr);
131 arch_acpi_processor_cleanup_pdc(pr); 150 acpi_processor_cleanup_pdc(pr);
132} 151}
133EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); 152EXPORT_SYMBOL_GPL(acpi_processor_set_pdc);
134 153
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 50edd734aec6..0873cd57510c 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -257,8 +257,6 @@ int acpi_processor_notify_smm(struct module *calling_module);
257DECLARE_PER_CPU(struct acpi_processor *, processors); 257DECLARE_PER_CPU(struct acpi_processor *, processors);
258extern struct acpi_processor_errata errata; 258extern struct acpi_processor_errata errata;
259 259
260void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr);
261
262#ifdef ARCH_HAS_POWER_INIT 260#ifdef ARCH_HAS_POWER_INIT
263void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, 261void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
264 unsigned int cpu); 262 unsigned int cpu);