linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / ia64 / kernel / process.c
index ea914cc..309d596 100644 (file)
@@ -9,6 +9,7 @@
  *           Add notify_die() hooks.
  */
 #define __KERNEL_SYSCALLS__    /* see <asm/unistd.h> */
+#include <linux/config.h>
 
 #include <linux/cpu.h>
 #include <linux/pm.h>
@@ -29,6 +30,7 @@
 #include <linux/efi.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/kprobes.h>
 
 #include <asm/cpu.h>
 #include <asm/delay.h>
@@ -271,9 +273,9 @@ cpu_idle (void)
        /* endless idle loop with no priority at all */
        while (1) {
                if (can_do_pal_halt)
-                       current_thread_info()->status &= ~TS_POLLING;
+                       clear_thread_flag(TIF_POLLING_NRFLAG);
                else
-                       current_thread_info()->status |= TS_POLLING;
+                       set_thread_flag(TIF_POLLING_NRFLAG);
 
                if (!need_resched()) {
                        void (*idle)(void);
@@ -736,6 +738,13 @@ void
 exit_thread (void)
 {
 
+       /*
+        * Remove function-return probe instances associated with this task
+        * and put them back on the free list. Do not insert an exit probe for
+        * this function, it will be disabled by kprobe_flush_task if you do.
+        */
+       kprobe_flush_task(current);
+
        ia64_drop_fpu(current);
 #ifdef CONFIG_PERFMON
        /* if needed, stop monitoring and flush state to perfmon context */