aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/process.c')
-rw-r--r--arch/arm64/kernel/process.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index de17c89985db..1c0a9be2ffa8 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>
@@ -84,11 +85,6 @@ EXPORT_SYMBOL_GPL(pm_power_off);
84void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); 85void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
85EXPORT_SYMBOL_GPL(arm_pm_restart); 86EXPORT_SYMBOL_GPL(arm_pm_restart);
86 87
87void arch_cpu_idle_prepare(void)
88{
89 local_fiq_enable();
90}
91
92/* 88/*
93 * This is our default idle handler. 89 * This is our default idle handler.
94 */ 90 */
@@ -98,8 +94,10 @@ void arch_cpu_idle(void)
98 * This should do all the clock switching and wait for interrupt 94 * This should do all the clock switching and wait for interrupt
99 * tricks 95 * tricks
100 */ 96 */
101 cpu_do_idle(); 97 if (cpuidle_idle_call()) {
102 local_irq_enable(); 98 cpu_do_idle();
99 local_irq_enable();
100 }
103} 101}
104 102
105#ifdef CONFIG_HOTPLUG_CPU 103#ifdef CONFIG_HOTPLUG_CPU
@@ -135,7 +133,6 @@ void machine_restart(char *cmd)
135 133
136 /* Disable interrupts first */ 134 /* Disable interrupts first */
137 local_irq_disable(); 135 local_irq_disable();
138 local_fiq_disable();
139 136
140 /* Now call the architecture specific reboot code. */ 137 /* Now call the architecture specific reboot code. */
141 if (arm_pm_restart) 138 if (arm_pm_restart)
@@ -308,6 +305,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
308unsigned long get_wchan(struct task_struct *p) 305unsigned long get_wchan(struct task_struct *p)
309{ 306{
310 struct stackframe frame; 307 struct stackframe frame;
308 unsigned long stack_page;
311 int count = 0; 309 int count = 0;
312 if (!p || p == current || p->state == TASK_RUNNING) 310 if (!p || p == current || p->state == TASK_RUNNING)
313 return 0; 311 return 0;
@@ -315,9 +313,11 @@ unsigned long get_wchan(struct task_struct *p)
315 frame.fp = thread_saved_fp(p); 313 frame.fp = thread_saved_fp(p);
316 frame.sp = thread_saved_sp(p); 314 frame.sp = thread_saved_sp(p);
317 frame.pc = thread_saved_pc(p); 315 frame.pc = thread_saved_pc(p);
316 stack_page = (unsigned long)task_stack_page(p);
318 do { 317 do {
319 int ret = unwind_frame(&frame); 318 if (frame.sp < stack_page ||
320 if (ret < 0) 319 frame.sp >= stack_page + THREAD_SIZE ||
320 unwind_frame(&frame))
321 return 0; 321 return 0;
322 if (!in_sched_functions(frame.pc)) 322 if (!in_sched_functions(frame.pc))
323 return frame.pc; 323 return frame.pc;