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

Commit 46ba51ea authored by Hanjun Guo's avatar Hanjun Guo Committed by Rafael J. Wysocki
Browse files

ACPI / processor: Introduce ARCH_MIGHT_HAVE_ACPI_PDC



The use of _PDC is deprecated in ACPI 3.0 in favor of _OSC,
as ARM platform is supported only in ACPI 5.0 or higher version,
_PDC will not be used in ARM platform, so make Make _PDC only for
platforms with Intel CPUs.

Introduce ARCH_MIGHT_HAVE_ACPI_PDC and move _PDC related code in
ACPI processor driver into a single file processor_pdc.c, make x86
and ia64 select it when ACPI is enabled.

This patch also use pr_* to replace printk to fix the checkpatch
warning and factor acpi_processor_alloc_pdc() a little bit to
avoid duplicate pr_err() code.

Suggested-by: default avatarRobert Richter <rric@kernel.org>
Signed-off-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b50154d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ config IA64
	select ARCH_MIGHT_HAVE_PC_SERIO
	select PCI if (!IA64_HP_SIM)
	select ACPI if (!IA64_HP_SIM)
	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
	select PM if (!IA64_HP_SIM)
	select HAVE_UNSTABLE_SCHED_CLOCK
	select HAVE_IDE
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ config X86_64
### Arch settings
config X86
	def_bool y
	select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
	select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
	select ARCH_MIGHT_HAVE_PC_PARPORT
	select ARCH_MIGHT_HAVE_PC_SERIO
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ if ACPI
config ACPI_LEGACY_TABLES_LOOKUP
	bool

config ARCH_MIGHT_HAVE_ACPI_PDC
	bool

config ACPI_SLEEP
	bool
	depends on SUSPEND || HIBERNATION
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ acpi-y += scan.o
acpi-y				+= resource.o
acpi-y				+= acpi_processor.o
acpi-y				+= processor_core.o
acpi-$(CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC) += processor_pdc.o
acpi-y				+= ec.o
acpi-$(CONFIG_ACPI_DOCK)	+= dock.o
acpi-y				+= pci_root.o pci_link.o pci_irq.o
+5 −0
Original line number Diff line number Diff line
@@ -108,7 +108,12 @@ int acpi_power_transition(struct acpi_device *device, int state);
int acpi_device_update_power(struct acpi_device *device, int *state_p);

int acpi_wakeup_device_init(void);

#ifdef CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC
void acpi_early_processor_set_pdc(void);
#else
static inline void acpi_early_processor_set_pdc(void) {}
#endif

/* --------------------------------------------------------------------------
                                  Embedded Controller
Loading