diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2015-01-26 13:33:44 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-01-27 06:35:33 -0500 |
commit | af3cfdbf56b91785650f54e7c9a899d814b4b9fb (patch) | |
tree | d3f8f97239085af0b605ad945812ac198f3d18ca /drivers/cpuidle | |
parent | c623b33b4e9599c6ac5076f7db7369eb9869aa04 (diff) |
arm64: kernel: remove ARM64_CPU_SUSPEND config option
ARM64_CPU_SUSPEND config option was introduced to make code providing
context save/restore selectable only on platforms requiring power
management capabilities.
Currently ARM64_CPU_SUSPEND depends on the PM_SLEEP config option which
in turn is set by the SUSPEND config option.
The introduction of CPU_IDLE for arm64 requires that code configured
by ARM64_CPU_SUSPEND (context save/restore) should be compiled in
in order to enable the CPU idle driver to rely on CPU operations
carrying out context save/restore.
The ARM64_CPUIDLE config option (ARM64 generic idle driver) is therefore
forced to select ARM64_CPU_SUSPEND, even if there may be (ie PM_SLEEP)
failed dependencies, which is not a clean way of handling the kernel
configuration option.
For these reasons, this patch removes the ARM64_CPU_SUSPEND config option
and makes the context save/restore dependent on CPU_PM, which is selected
whenever either SUSPEND or CPU_IDLE are configured, cleaning up dependencies
in the process.
This way, code previously configured through ARM64_CPU_SUSPEND is
compiled in whenever a power management subsystem requires it to be
present in the kernel (SUSPEND || CPU_IDLE), which is the behaviour
expected on ARM64 kernels.
The cpu_suspend and cpu_init_idle CPU operations are added only if
CPU_IDLE is selected, since they are CPU_IDLE specific methods and
should be grouped and defined accordingly.
PSCI CPU operations are updated to reflect the introduced changes.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/Kconfig.arm64 | 1 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle-arm64.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/cpuidle/Kconfig.arm64 b/drivers/cpuidle/Kconfig.arm64 index d0a08ed1b2ee..6effb3656735 100644 --- a/drivers/cpuidle/Kconfig.arm64 +++ b/drivers/cpuidle/Kconfig.arm64 | |||
@@ -4,7 +4,6 @@ | |||
4 | 4 | ||
5 | config ARM64_CPUIDLE | 5 | config ARM64_CPUIDLE |
6 | bool "Generic ARM64 CPU idle Driver" | 6 | bool "Generic ARM64 CPU idle Driver" |
7 | select ARM64_CPU_SUSPEND | ||
8 | select DT_IDLE_STATES | 7 | select DT_IDLE_STATES |
9 | help | 8 | help |
10 | Select this to enable generic cpuidle driver for ARM64. | 9 | Select this to enable generic cpuidle driver for ARM64. |
diff --git a/drivers/cpuidle/cpuidle-arm64.c b/drivers/cpuidle/cpuidle-arm64.c index 80704b931ba4..39a2c62716c3 100644 --- a/drivers/cpuidle/cpuidle-arm64.c +++ b/drivers/cpuidle/cpuidle-arm64.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | 20 | ||
21 | #include <asm/cpuidle.h> | 21 | #include <asm/cpuidle.h> |
22 | #include <asm/suspend.h> | ||
23 | 22 | ||
24 | #include "dt_idle_states.h" | 23 | #include "dt_idle_states.h" |
25 | 24 | ||