patch-2.1.36 linux/arch/m68k/kernel/process.c
Next file: linux/arch/m68k/kernel/ptrace.c
Previous file: linux/arch/m68k/kernel/m68k_ksyms.c
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
Thu Apr 17 13:20:42 1997
- Orig file:
v2.1.35/linux/arch/m68k/kernel/process.c
- Orig date:
Sun Jan 26 02:07:05 1997
diff -u --recursive --new-file v2.1.35/linux/arch/m68k/kernel/process.c linux/arch/m68k/kernel/process.c
@@ -22,6 +22,7 @@
#include <linux/malloc.h>
#include <linux/user.h>
#include <linux/a.out.h>
+#include <linux/reboot.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -43,6 +44,7 @@
goto out;
/* endless idle loop with no priority at all */
+ current->priority = -100;
current->counter = -100;
for (;;)
schedule();
@@ -52,12 +54,23 @@
return ret;
}
-void hard_reset_now(void)
+void machine_restart(char * __unused)
{
if (mach_reset)
mach_reset();
}
+void machine_halt(void)
+{
+}
+
+void machine_power_off(void)
+{
+#if defined(CONFIG_APM) && defined(CONFIG_APM_POWER_OFF)
+ apm_set_power_state(APM_STATE_OFF);
+#endif
+}
+
void show_regs(struct pt_regs * regs)
{
printk("\n");
@@ -169,7 +182,7 @@
/* Fill in the fpu structure for a core dump. */
-int dump_fpu (struct user_m68kfp_struct *fpu)
+int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
{
char fpustate[216];
@@ -207,7 +220,7 @@
if (dump->start_stack < TASK_SIZE)
dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
- dump->u_ar0 = (struct pt_regs *)(((int)(&dump->regs)) -((int)(dump)));
+ dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump);
sw = ((struct switch_stack *)regs) - 1;
dump->regs.d1 = regs->d1;
dump->regs.d2 = regs->d2;
@@ -230,7 +243,7 @@
dump->regs.pc = regs->pc;
dump->regs.fmtvec = (regs->format << 12) | regs->vector;
/* dump floating point stuff */
- dump->u_fpvalid = dump_fpu (&dump->m68kfp);
+ dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp);
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov