Skip to content

Commit

Permalink
ACPI: processor: unify arch_acpi_processor_cleanup_pdc
Browse files Browse the repository at this point in the history
The x86 and ia64 implementations of the function in $subject are
exactly the same.

Also, since the arch-specific implementations of setting _PDC have
been completely hollowed out, remove the empty shells.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alex Chiang authored and Len Brown committed Dec 22, 2009
1 parent 6c5807d commit 4781725
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 60 deletions.
4 changes: 0 additions & 4 deletions arch/ia64/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += acpi-processor.o
endif

obj-$(CONFIG_IA64_PALINFO) += palinfo.o
obj-$(CONFIG_IOSAPIC) += iosapic.o
obj-$(CONFIG_MODULES) += module.o
Expand Down
27 changes: 0 additions & 27 deletions arch/ia64/kernel/acpi-processor.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/x86/kernel/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ obj-$(CONFIG_ACPI) += boot.o
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup_rm.o wakeup_$(BITS).o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
obj-y += cstate.o
endif

$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin
Expand Down
25 changes: 0 additions & 25 deletions arch/x86/kernel/acpi/processor.c

This file was deleted.

21 changes: 20 additions & 1 deletion drivers/acpi/processor_pdc.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (C) 2005 Intel Corporation
* Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
*
* Alex Chiang <achiang@hp.com>
* - Unified x86/ia64 implementations
* Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
* - Added _PDC for platforms with Intel CPUs
*/
#include <linux/dmi.h>

#include <acpi/acpi_drivers.h>
Expand Down Expand Up @@ -121,14 +130,24 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr)
return status;
}

static void acpi_processor_cleanup_pdc(struct acpi_processor *pr)
{
if (pr->pdc) {
kfree(pr->pdc->pointer->buffer.pointer);
kfree(pr->pdc->pointer);
kfree(pr->pdc);
pr->pdc = NULL;
}
}

void acpi_processor_set_pdc(struct acpi_processor *pr)
{
if (arch_has_acpi_pdc() == false)
return;

acpi_processor_init_pdc(pr);
acpi_processor_eval_pdc(pr);
arch_acpi_processor_cleanup_pdc(pr);
acpi_processor_cleanup_pdc(pr);
}
EXPORT_SYMBOL_GPL(acpi_processor_set_pdc);

Expand Down
2 changes: 0 additions & 2 deletions include/acpi/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ int acpi_processor_notify_smm(struct module *calling_module);
DECLARE_PER_CPU(struct acpi_processor *, processors);
extern struct acpi_processor_errata errata;

void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr);

#ifdef ARCH_HAS_POWER_INIT
void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
unsigned int cpu);
Expand Down

0 comments on commit 4781725

Please sign in to comment.