From 8198c1696a2cd15d436ade172bfd8085f5f818d3 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Tue, 16 Apr 2013 23:53:29 +0200 Subject: um: Use generic idle loop Signed-off-by: Richard Weinberger 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 --- arch/um/Kconfig.common | 1 + arch/um/kernel/process.c | 27 ++++----------------------- 2 files changed, 5 insertions(+), 23 deletions(-) (limited to 'arch/um') diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index bceee6623b0..57834067a51 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common @@ -12,6 +12,7 @@ config UML select GENERIC_CPU_DEVICES select GENERIC_IO select GENERIC_CLOCKEVENTS + select GENERIC_IDLE_LOOP select TTY # Needed for line.c config MMU 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) { -- cgit v1.2.3 From d190e8195b90bc1e65c494fe08e54e9e581bfd16 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 17 Apr 2013 10:33:13 +0200 Subject: idle: Remove GENERIC_IDLE_LOOP config switch All archs are converted over. Remove the config switch and the fallback code. Signed-off-by: Thomas Gleixner --- arch/um/Kconfig.common | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/um') diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index 57834067a51..bceee6623b0 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common @@ -12,7 +12,6 @@ config UML select GENERIC_CPU_DEVICES select GENERIC_IO select GENERIC_CLOCKEVENTS - select GENERIC_IDLE_LOOP select TTY # Needed for line.c config MMU -- cgit v1.2.3