diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2013-07-17 05:12:24 -0400 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2013-12-16 12:17:35 -0500 |
commit | b8824dfe1b3fe1d4ef3d7ee78a071b8290d3b153 (patch) | |
tree | e171e8bee9cc6b557329f376eeb60d5583a94d70 /arch/arm64/kernel | |
parent | 1f85008e74768a88e1ddb96cc1fe45bb2378166c (diff) |
arm64: kernel: add CPU idle call
When CPU idle is enabled, the architectural idle call should go through
the idle subsystem to allow CPUs to enter idle states defined
by the platform CPU idle back-end operations.
This patch, mirroring other archs behaviour, adds the CPU idle call to the
architectural arch_cpu_idle implementation for arm64.
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/process.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index de17c89985db..50491ec4de34 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/kallsyms.h> | 33 | #include <linux/kallsyms.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/cpu.h> | 35 | #include <linux/cpu.h> |
36 | #include <linux/cpuidle.h> | ||
36 | #include <linux/elfcore.h> | 37 | #include <linux/elfcore.h> |
37 | #include <linux/pm.h> | 38 | #include <linux/pm.h> |
38 | #include <linux/tick.h> | 39 | #include <linux/tick.h> |
@@ -98,8 +99,10 @@ void arch_cpu_idle(void) | |||
98 | * This should do all the clock switching and wait for interrupt | 99 | * This should do all the clock switching and wait for interrupt |
99 | * tricks | 100 | * tricks |
100 | */ | 101 | */ |
101 | cpu_do_idle(); | 102 | if (cpuidle_idle_call()) { |
102 | local_irq_enable(); | 103 | cpu_do_idle(); |
104 | local_irq_enable(); | ||
105 | } | ||
103 | } | 106 | } |
104 | 107 | ||
105 | #ifdef CONFIG_HOTPLUG_CPU | 108 | #ifdef CONFIG_HOTPLUG_CPU |