Merge branch 'intelfb-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / arch / arm / kernel / process.c
index 17c38db..bf35c17 100644 (file)
@@ -10,7 +10,6 @@
  */
 #include <stdarg.h>
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -33,6 +32,7 @@
 #include <asm/leds.h>
 #include <asm/processor.h>
 #include <asm/system.h>
+#include <asm/thread_notify.h>
 #include <asm/uaccess.h>
 #include <asm/mach/time.h>
 
@@ -221,16 +221,26 @@ void __show_regs(struct pt_regs *regs)
                processor_modes[processor_mode(regs)],
                thumb_mode(regs) ? " (T)" : "",
                get_fs() == get_ds() ? "kernel" : "user");
+#if CONFIG_CPU_CP15
        {
-               unsigned int ctrl, transbase, dac;
+               unsigned int ctrl;
                  __asm__ (
                "       mrc p15, 0, %0, c1, c0\n"
-               "       mrc p15, 0, %1, c2, c0\n"
-               "       mrc p15, 0, %2, c3, c0\n"
-               : "=r" (ctrl), "=r" (transbase), "=r" (dac));
-               printk("Control: %04X  Table: %08X  DAC: %08X\n",
-                       ctrl, transbase, dac);
+               : "=r" (ctrl));
+               printk("Control: %04X\n", ctrl);
        }
+#ifdef CONFIG_CPU_CP15_MMU
+       {
+               unsigned int transbase, dac;
+                 __asm__ (
+               "       mrc p15, 0, %0, c2, c0\n"
+               "       mrc p15, 0, %1, c3, c0\n"
+               : "=r" (transbase), "=r" (dac));
+               printk("Table: %08X  DAC: %08X\n",
+                       transbase, dac);
+       }
+#endif
+#endif
 }
 
 void show_regs(struct pt_regs * regs)
@@ -338,13 +348,9 @@ void exit_thread(void)
 {
 }
 
-static void default_fp_init(union fp_state *fp)
-{
-       memset(fp, 0, sizeof(union fp_state));
-}
+ATOMIC_NOTIFIER_HEAD(thread_notify_head);
 
-void (*fp_init)(union fp_state *) = default_fp_init;
-EXPORT_SYMBOL(fp_init);
+EXPORT_SYMBOL_GPL(thread_notify_head);
 
 void flush_thread(void)
 {
@@ -353,23 +359,16 @@ void flush_thread(void)
 
        memset(thread->used_cp, 0, sizeof(thread->used_cp));
        memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
-#if defined(CONFIG_IWMMXT)
-       iwmmxt_task_release(thread);
-#endif
-       fp_init(&thread->fpstate);
-#if defined(CONFIG_VFP)
-       vfp_flush_thread(&thread->vfpstate);
-#endif
+       memset(&thread->fpstate, 0, sizeof(union fp_state));
+
+       thread_notify(THREAD_NOTIFY_FLUSH, thread);
 }
 
 void release_thread(struct task_struct *dead_task)
 {
-#if defined(CONFIG_VFP)
-       vfp_release_thread(&task_thread_info(dead_task)->vfpstate);
-#endif
-#if defined(CONFIG_IWMMXT)
-       iwmmxt_task_release(task_thread_info(dead_task));
-#endif
+       struct thread_info *thread = task_thread_info(dead_task);
+
+       thread_notify(THREAD_NOTIFY_RELEASE, thread);
 }
 
 asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");