]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm26/kernel/process.c
V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENT
[linux-2.6-omap-h63xx.git] / arch / arm26 / kernel / process.c
index 9eb9964d32a7368c0b71c53015c75a7e58626f48..dcd81e62ff4e83f3c11b2a7c0f1b45d8da57c3fe 100644 (file)
@@ -11,7 +11,6 @@
  */
 #include <stdarg.h>
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -74,15 +73,13 @@ __setup("hlt", hlt_setup);
 void cpu_idle(void)
 {
        /* endless idle loop with no priority at all */
-       preempt_disable();
        while (1) {
-               while (!need_resched()) {
-                       local_irq_disable();
-                       if (!need_resched() && !hlt_counter)
-                               local_irq_enable();
-               }
+               while (!need_resched())
+                       cpu_relax();
+               preempt_enable_no_resched();
+               schedule();
+               preempt_disable();
        }
-       schedule();
 }
 
 static char reboot_mode = 'h';
@@ -279,10 +276,9 @@ int
 copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
            unsigned long unused, struct task_struct *p, struct pt_regs *regs)
 {
-       struct thread_info *thread = p->thread_info;
-       struct pt_regs *childregs;
+       struct thread_info *thread = task_thread_info(p);
+       struct pt_regs *childregs = task_pt_regs(p);
 
-       childregs = __get_user_regs(thread);
        *childregs = *regs;
        childregs->ARM_r0 = 0;
        childregs->ARM_sp = stack_start;