]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/process.c
[IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / process.c
index 8bb571a8a73840447a23531c49cccb4602008c5c..4158906c45aacce3ad80bd8c203f9d34fdc2c23b 100644 (file)
@@ -155,7 +155,7 @@ show_regs (struct pt_regs *regs)
 }
 
 void
-do_notify_resume_user (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
+do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall)
 {
        if (fsys_mode(current, &scr->pt)) {
                /* defer signal-handling etc. until we return to privilege-level 0.  */
@@ -170,8 +170,8 @@ do_notify_resume_user (sigset_t *oldset, struct sigscratch *scr, long in_syscall
 #endif
 
        /* deal with pending signal delivery */
-       if (test_thread_flag(TIF_SIGPENDING))
-               ia64_do_signal(oldset, scr, in_syscall);
+       if (test_thread_flag(TIF_SIGPENDING)||test_thread_flag(TIF_RESTORE_SIGMASK))
+               ia64_do_signal(scr, in_syscall);
 }
 
 static int pal_halt        = 1;
@@ -236,6 +236,7 @@ void cpu_idle_wait(void)
 {
        unsigned int cpu, this_cpu = get_cpu();
        cpumask_t map;
+       cpumask_t tmp = current->cpus_allowed;
 
        set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
        put_cpu();
@@ -257,6 +258,7 @@ void cpu_idle_wait(void)
                }
                cpus_and(map, map, cpu_online_map);
        } while (!cpus_empty(map));
+       set_cpus_allowed(current, tmp);
 }
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
@@ -497,7 +499,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
 
@@ -511,7 +514,8 @@ copy_thread (int nr, unsigned long clone_flags,
 static void
 do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg)
 {
-       unsigned long mask, sp, nat_bits = 0, ip, ar_rnat, urbs_end, cfm;
+       unsigned long mask, sp, nat_bits = 0, ar_rnat, urbs_end, cfm;
+       unsigned long uninitialized_var(ip);    /* GCC be quiet */
        elf_greg_t *dst = arg;
        struct pt_regs *pt;
        char nat;
@@ -725,7 +729,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);
        }
@@ -751,7 +755,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
@@ -761,6 +765,9 @@ get_wchan (struct task_struct *p)
        unsigned long ip;
        int count = 0;
 
+       if (!p || p == current || p->state == TASK_RUNNING)
+               return 0;
+
        /*
         * Note: p may not be a blocked task (it could be current or
         * another process running on some other CPU.  Rather than
@@ -771,6 +778,8 @@ get_wchan (struct task_struct *p)
         */
        unw_init_from_blocked_task(&info, p);
        do {
+               if (p->state == TASK_RUNNING)
+                       return 0;
                if (unw_unwind(&info) < 0)
                        return 0;
                unw_get_ip(&info, &ip);