Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47817254 authored by Alex Chiang's avatar Alex Chiang Committed by Len Brown
Browse files

ACPI: processor: unify arch_acpi_processor_cleanup_pdc



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: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 6c5807d7
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -18,10 +18,6 @@ obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1)	+= acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1)	+= acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += 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_IA64_PALINFO)	+= palinfo.o
obj-$(CONFIG_IOSAPIC)		+= iosapic.o
obj-$(CONFIG_IOSAPIC)		+= iosapic.o
obj-$(CONFIG_MODULES)		+= module.o
obj-$(CONFIG_MODULES)		+= module.o

arch/ia64/kernel/acpi-processor.c

deleted100644 → 0
+0 −27
Original line number Original line Diff line number Diff line
/*
 * arch/ia64/kernel/acpi-processor.c
 *
 * Copyright (C) 2005 Intel Corporation
 * 	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
 * 	- Added _PDC for platforms with Intel CPUs
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/acpi.h>

#include <acpi/processor.h>
#include <asm/acpi.h>

void arch_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;
	}
}

EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@ obj-$(CONFIG_ACPI) += boot.o
obj-$(CONFIG_ACPI_SLEEP)	+= sleep.o wakeup_rm.o wakeup_$(BITS).o
obj-$(CONFIG_ACPI_SLEEP)	+= sleep.o wakeup_rm.o wakeup_$(BITS).o


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


$(obj)/wakeup_rm.o:    $(obj)/realmode/wakeup.bin
$(obj)/wakeup_rm.o:    $(obj)/realmode/wakeup.bin

arch/x86/kernel/acpi/processor.c

deleted100644 → 0
+0 −25
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2005 Intel Corporation
 * 	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
 * 	- Added _PDC for platforms with Intel CPUs
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/acpi.h>

#include <acpi/processor.h>
#include <asm/acpi.h>

void arch_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;
	}
}

EXPORT_SYMBOL(arch_acpi_processor_cleanup_pdc);
+20 −1
Original line number Original line Diff line number Diff line
/*
 * 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 <linux/dmi.h>


#include <acpi/acpi_drivers.h>
#include <acpi/acpi_drivers.h>
@@ -121,6 +130,16 @@ static int acpi_processor_eval_pdc(struct acpi_processor *pr)
	return status;
	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)
void acpi_processor_set_pdc(struct acpi_processor *pr)
{
{
	if (arch_has_acpi_pdc() == false)
	if (arch_has_acpi_pdc() == false)
@@ -128,7 +147,7 @@ void acpi_processor_set_pdc(struct acpi_processor *pr)


	acpi_processor_init_pdc(pr);
	acpi_processor_init_pdc(pr);
	acpi_processor_eval_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);
EXPORT_SYMBOL_GPL(acpi_processor_set_pdc);


Loading