ACPI: Decouple ACPI idle and ACPI processor drivers

This patch introduces a new Kconfig symbol, ACPI_PROCESSOR_IDLE,
which is auto selected by architectures which support the ACPI
based C states for CPU Idle management.

The processor_idle driver in its present form contains declarations
specific to X86 and IA64. Since there are no reasonable defaults
for other architectures e.g. ARM64, the driver is selected only for
X86 or IA64.

This helps in decoupling the ACPI processor_driver from the ACPI
processor_idle driver which is useful for the upcoming alternative
patchwork for controlling CPU Performance (CPPC) and CPU Idle (LPI).

Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Ashwin Chaugule
2015-08-05 09:40:26 -04:00
committed by Rafael J. Wysocki
parent 239708a3af
commit 5f05586c60
3 changed files with 31 additions and 4 deletions

View File

@@ -355,13 +355,35 @@ static inline void acpi_processor_throttling_init(void) {}
#endif /* CONFIG_ACPI_CPU_FREQ_PSS */
/* in processor_idle.c */
extern struct cpuidle_driver acpi_idle_driver;
#ifdef CONFIG_ACPI_PROCESSOR_IDLE
int acpi_processor_power_init(struct acpi_processor *pr);
int acpi_processor_power_exit(struct acpi_processor *pr);
int acpi_processor_cst_has_changed(struct acpi_processor *pr);
int acpi_processor_hotplug(struct acpi_processor *pr);
extern struct cpuidle_driver acpi_idle_driver;
#else
static inline int acpi_processor_power_init(struct acpi_processor *pr)
{
return -ENODEV;
}
#ifdef CONFIG_PM_SLEEP
static inline int acpi_processor_power_exit(struct acpi_processor *pr)
{
return -ENODEV;
}
static inline int acpi_processor_cst_has_changed(struct acpi_processor *pr)
{
return -ENODEV;
}
static inline int acpi_processor_hotplug(struct acpi_processor *pr)
{
return -ENODEV;
}
#endif /* CONFIG_ACPI_PROCESSOR_IDLE */
#if defined(CONFIG_PM_SLEEP) & defined(CONFIG_ACPI_PROCESSOR_IDLE)
void acpi_processor_syscore_init(void);
void acpi_processor_syscore_exit(void);
#else