*/
#include <stdarg.h>
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
-#include <linux/pm.h>
#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>
__setup("nohlt", nohlt_setup);
__setup("hlt", hlt_setup);
-void arm_machine_restart(char mode)
-{
- /*
- * Clean and disable cache, and turn off interrupts
- */
- cpu_proc_fin();
-
- /*
- * Tell the mm system that we are going to reboot -
- * we may need it to insert some 1:1 mappings so that
- * soft boot works.
- */
- setup_mm_for_reboot(mode);
-
- /*
- * Now call the architecture specific reboot code.
- */
- arch_reset(mode);
-
- /*
- * Whoops - the architecture was unable to reboot.
- * Tell the user!
- */
- mdelay(1000);
- printk("Reboot failed -- System halted\n");
- while (1);
-}
-
/*
- * Function pointers to optional machine specific functions
+ * The following aren't currently used.
*/
void (*pm_idle)(void);
EXPORT_SYMBOL(pm_idle);
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
-void (*arm_pm_restart)(char str) = arm_machine_restart;
-EXPORT_SYMBOL_GPL(arm_pm_restart);
-
-
/*
* This is our default idle handler. We need to disable
* interrupts here to ensure we don't miss a wakeup call.
pm_power_off();
}
+
void machine_restart(char * __unused)
{
- arm_pm_restart(reboot_mode);
+ /*
+ * Clean and disable cache, and turn off interrupts
+ */
+ cpu_proc_fin();
+
+ /*
+ * Tell the mm system that we are going to reboot -
+ * we may need it to insert some 1:1 mappings so that
+ * soft boot works.
+ */
+ setup_mm_for_reboot(reboot_mode);
+
+ /*
+ * Now call the architecture specific reboot code.
+ */
+ arch_reset(reboot_mode);
+
+ /*
+ * Whoops - the architecture was unable to reboot.
+ * Tell the user!
+ */
+ mdelay(1000);
+ printk("Reboot failed -- System halted\n");
+ while (1);
}
void __show_regs(struct pt_regs *regs)
{
}
-ATOMIC_NOTIFIER_HEAD(thread_notify_head);
+static void default_fp_init(union fp_state *fp)
+{
+ memset(fp, 0, sizeof(union fp_state));
+}
-EXPORT_SYMBOL_GPL(thread_notify_head);
+void (*fp_init)(union fp_state *) = default_fp_init;
+EXPORT_SYMBOL(fp_init);
void flush_thread(void)
{
memset(thread->used_cp, 0, sizeof(thread->used_cp));
memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
- memset(&thread->fpstate, 0, sizeof(union fp_state));
-
- thread_notify(THREAD_NOTIFY_FLUSH, thread);
+#if defined(CONFIG_IWMMXT)
+ iwmmxt_task_release(thread);
+#endif
+ fp_init(&thread->fpstate);
+#if defined(CONFIG_VFP)
+ vfp_flush_thread(&thread->vfpstate);
+#endif
}
void release_thread(struct task_struct *dead_task)
{
- struct thread_info *thread = task_thread_info(dead_task);
-
- thread_notify(THREAD_NOTIFY_RELEASE, thread);
+#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
}
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");