aboutsummaryrefslogtreecommitdiff
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-04-16 23:53:29 +0200
committerThomas Gleixner <tglx@linutronix.de>2013-04-17 10:39:38 +0200
commit8198c1696a2cd15d436ade172bfd8085f5f818d3 (patch)
treecaece15784505f1a19b49b643e6eef6c973af63a /arch/um/kernel
parent2412aa1293a4159c610616305c17efd237c8208d (diff)
downloadlinux-8198c1696a2cd15d436ade172bfd8085f5f818d3.tar.gz
um: Use generic idle loop
Signed-off-by: Richard Weinberger <richard@nod.at> Cc: user-mode-linux-devel@lists.sourceforge.net Link: http://lkml.kernel.org/r/1366149209-24787-1-git-send-email-richard@nod.at Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/process.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index b462b13c5ba..bbcef522bcb 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -210,33 +210,14 @@ void initial_thread_cb(void (*proc)(void *), void *arg)
kmalloc_ok = save_kmalloc_ok;
}
-void default_idle(void)
+void arch_cpu_idle(void)
{
unsigned long long nsecs;
- while (1) {
- /* endless idle loop with no priority at all */
-
- /*
- * although we are an idle CPU, we do not want to
- * get into the scheduler unnecessarily.
- */
- if (need_resched())
- schedule();
-
- tick_nohz_idle_enter();
- rcu_idle_enter();
- nsecs = disable_timer();
- idle_sleep(nsecs);
- rcu_idle_exit();
- tick_nohz_idle_exit();
- }
-}
-
-void cpu_idle(void)
-{
cpu_tasks[current_thread_info()->cpu].pid = os_getpid();
- default_idle();
+ nsecs = disable_timer();
+ idle_sleep(nsecs);
+ local_irq_enable();
}
int __cant_sleep(void) {