Pull cpuidle into release branch
[pandora-kernel.git] / arch / ia64 / kernel / process.c
index fa40cba..2418289 100644 (file)
@@ -105,7 +105,8 @@ show_regs (struct pt_regs *regs)
        unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;
 
        print_modules();
-       printk("\nPid: %d, CPU %d, comm: %20s\n", current->pid, smp_processor_id(), current->comm);
+       printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
+                       smp_processor_id(), current->comm);
        printk("psr : %016lx ifs : %016lx ip  : [<%016lx>]    %s\n",
               regs->cr_ipsr, regs->cr_ifs, ip, print_tainted());
        print_symbol("ip is at %s\n", ip);
@@ -198,9 +199,13 @@ default_idle (void)
 {
        local_irq_enable();
        while (!need_resched()) {
-               if (can_do_pal_halt)
-                       safe_halt();
-               else
+               if (can_do_pal_halt) {
+                       local_irq_disable();
+                       if (!need_resched()) {
+                               safe_halt();
+                       }
+                       local_irq_enable();
+               } else
                        cpu_relax();
        }
 }
@@ -499,7 +504,8 @@ copy_thread (int nr, unsigned long clone_flags,
 
                /* Copy partially mapped page list */
                if (!retval)
-                       retval = ia32_copy_partial_page_list(p, clone_flags);
+                       retval = ia32_copy_ia64_partial_page_list(p,
+                                                               clone_flags);
        }
 #endif
 
@@ -728,7 +734,7 @@ flush_thread (void)
        ia64_drop_fpu(current);
 #ifdef CONFIG_IA32_SUPPORT
        if (IS_IA32_PROCESS(task_pt_regs(current))) {
-               ia32_drop_partial_page_list(current);
+               ia32_drop_ia64_partial_page_list(current);
                current->thread.task_size = IA32_PAGE_OFFSET;
                set_fs(USER_DS);
        }
@@ -754,7 +760,7 @@ exit_thread (void)
                pfm_release_debug_registers(current);
 #endif
        if (IS_IA32_PROCESS(task_pt_regs(current)))
-               ia32_drop_partial_page_list(current);
+               ia32_drop_ia64_partial_page_list(current);
 }
 
 unsigned long