From: Ashwin Chaugule <ashwin.chaugule@linaro.org>
To: rjw@rjwysocki.net, jaswinder.singh@linaro.org
Cc: sudeep.holla@arm.com, linux-pm@vger.kernel.org,
linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org,
patches@linaro.org, viresh.kumar@linaro.org,
rwells@codeaurora.org,
Ashwin Chaugule <ashwin.chaugule@linaro.org>
Subject: [PATCH v8 3/9] ACPI: Decouple ACPI idle and ACPI processor drivers
Date: Wed, 5 Aug 2015 09:40:26 -0400 [thread overview]
Message-ID: <c8c4eb78a6c4ac3a3cc0039d18f04d56920320e7.1438781668.git.ashwin.chaugule@linaro.org> (raw)
In-Reply-To: <cover.1438781668.git.ashwin.chaugule@linaro.org>
In-Reply-To: <cover.1438781668.git.ashwin.chaugule@linaro.org>
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>
---
drivers/acpi/Kconfig | 6 +++++-
drivers/acpi/Makefile | 3 ++-
include/acpi/processor.h | 26 ++++++++++++++++++++++++--
3 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index d6e2a86..54e9729 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -193,10 +193,14 @@ config ACPI_CPU_FREQ_PSS
bool
select THERMAL
+config ACPI_PROCESSOR_IDLE
+ bool
+ select CPU_IDLE
+
config ACPI_PROCESSOR
tristate "Processor"
depends on X86 || IA64
- select CPU_IDLE
+ select ACPI_PROCESSOR_IDLE
select ACPI_CPU_FREQ_PSS
default y
help
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 7e97aef..3ea59ae 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -80,7 +80,8 @@ obj-$(CONFIG_ACPI_CUSTOM_METHOD)+= custom_method.o
obj-$(CONFIG_ACPI_BGRT) += bgrt.o
# processor has its own "processor." module_param namespace
-processor-y := processor_driver.o processor_idle.o
+processor-y := processor_driver.o
+processor-$(CONFIG_ACPI_PROCESSOR_IDLE) += processor_idle.o
processor-$(CONFIG_ACPI_CPU_FREQ_PSS) += processor_throttling.o \
processor_thermal.o
processor-$(CONFIG_CPU_FREQ) += processor_perflib.o
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index b6c9178..2c4e7a9 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -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;
+}
+
+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 */
-#ifdef CONFIG_PM_SLEEP
+#if defined(CONFIG_PM_SLEEP) & defined(CONFIG_ACPI_PROCESSOR_IDLE)
void acpi_processor_syscore_init(void);
void acpi_processor_syscore_exit(void);
#else
--
1.9.1
next prev parent reply other threads:[~2015-08-05 13:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 13:40 [PATCH v8 0/9] CPUFreq driver using CPPC methods Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 1/9] PCC: Initialize PCC Mailbox earlier at boot Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 2/9] ACPI: Split out ACPI PSS from ACPI Processor driver Ashwin Chaugule
2015-08-05 13:40 ` Ashwin Chaugule [this message]
2015-08-05 13:40 ` [PATCH v8 4/9] ACPI: Introduce CPU performance controls using CPPC Ashwin Chaugule
2015-08-26 1:46 ` Rafael J. Wysocki
2015-08-27 15:48 ` Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 5/9] CPPC: Add a CPUFreq driver for use with CPPC Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 6/9] ACPI: Add weak routines for ACPI CPU Hotplug Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 7/9] CPPC: Probe for CPPC tables for each ACPI Processor object Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 8/9] PCC: Disable compilation by default Ashwin Chaugule
2015-08-05 13:40 ` [PATCH v8 9/9] ACPI: Allow selection of the ACPI processor driver for ARM64 Ashwin Chaugule
2015-08-26 0:24 ` [PATCH v8 0/9] CPUFreq driver using CPPC methods Rafael J. Wysocki
2015-08-26 0:03 ` Ashwin Chaugule
2015-08-26 0:46 ` Rafael J. Wysocki
2015-08-26 0:31 ` Ashwin Chaugule
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8c4eb78a6c4ac3a3cc0039d18f04d56920320e7.1438781668.git.ashwin.chaugule@linaro.org \
--to=ashwin.chaugule@linaro.org \
--cc=jaswinder.singh@linaro.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rjw@rjwysocki.net \
--cc=rwells@codeaurora.org \
--cc=sudeep.holla@arm.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).