patch-2.3.30 linux/arch/alpha/kernel/process.c

Next file: linux/arch/alpha/kernel/proto.h
Previous file: linux/arch/alpha/kernel/pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
@@ -94,8 +94,8 @@
 	}
 }
 
-void
-common_kill_arch (int mode, char *restart_cmd)
+static void
+common_shutdown(int mode, char *restart_cmd)
 {
 	/* The following currently only has any effect on SRM.  We should
 	   fix MILO to understand it.  Should be pretty easy.  Also we can
@@ -141,24 +141,12 @@
 
 #ifdef CONFIG_RTC
 	/* Reset rtc to defaults.  */
-	{
-		unsigned char control;
-
-		cli();
-
-		/* Reset periodic interrupt frequency.  */
-		CMOS_WRITE(0x26, RTC_FREQ_SELECT);
-
-		/* Turn on periodic interrupts.  */
-		control = CMOS_READ(RTC_CONTROL);
-		control |= RTC_PIE;
-		CMOS_WRITE(control, RTC_CONTROL);	
-		CMOS_READ(RTC_INTR_FLAGS);
-
-		sti();
-	}
+	rtc_kill_pit();
 #endif
 
+	if (alpha_mv.kill_arch)
+		alpha_mv.kill_arch(mode);
+
 	if (!alpha_using_srm && mode != LINUX_REBOOT_CMD_RESTART) {
 		/* Unfortunately, since MILO doesn't currently understand
 		   the hwrpb bits above, we can't reliably halt the 
@@ -175,21 +163,23 @@
 void
 machine_restart(char *restart_cmd)
 {
-	alpha_mv.kill_arch(LINUX_REBOOT_CMD_RESTART, restart_cmd);
+	common_shutdown(LINUX_REBOOT_CMD_RESTART, restart_cmd);
 }
 
 void
 machine_halt(void)
 {
-	alpha_mv.kill_arch(LINUX_REBOOT_CMD_HALT, NULL);
+	common_shutdown(LINUX_REBOOT_CMD_HALT, NULL);
 }
 
-void machine_power_off(void)
+void
+machine_power_off(void)
 {
-	alpha_mv.kill_arch(LINUX_REBOOT_CMD_POWER_OFF, NULL);
+	common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL);
 }
 
-void show_regs(struct pt_regs * regs)
+void
+show_regs(struct pt_regs * regs)
 {
 	printk("\nps: %04lx pc: [<%016lx>]\n", regs->ps, regs->pc);
 	printk("rp: [<%016lx>] sp: %p\n", regs->r26, regs+1);
@@ -210,7 +200,8 @@
 /*
  * Re-start a thread when doing execve()
  */
-void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
+void
+start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
 {
 	set_fs(USER_DS);
 	regs->pc = pc;
@@ -221,11 +212,13 @@
 /*
  * Free current thread data structures etc..
  */
-void exit_thread(void)
+void
+exit_thread(void)
 {
 }
 
-void flush_thread(void)
+void
+flush_thread(void)
 {
 	/* Arrange for each exec'ed process to start off with a clean slate
 	   with respect to the FPU.  This is all exceptions disabled.  Note
@@ -236,7 +229,8 @@
 	wrfpcr(FPCR_DYN_NORMAL | FPCR_INVD | FPCR_DZED | FPCR_OVFD | FPCR_INED);
 }
 
-void release_thread(struct task_struct *dead_task)
+void
+release_thread(struct task_struct *dead_task)
 {
 }
 
@@ -249,15 +243,17 @@
  * Notice that "fork()" is implemented in terms of clone,
  * with parameters (SIGCHLD, 0).
  */
-int alpha_clone(unsigned long clone_flags, unsigned long usp,
-		struct switch_stack * swstack)
+int
+alpha_clone(unsigned long clone_flags, unsigned long usp,
+	    struct switch_stack * swstack)
 {
 	if (!usp)
 		usp = rdusp();
 	return do_fork(clone_flags, usp, (struct pt_regs *) (swstack+1));
 }
 
-int alpha_vfork(struct switch_stack * swstack)
+int
+alpha_vfork(struct switch_stack * swstack)
 {
 	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(),
 			(struct pt_regs *) (swstack+1));
@@ -274,8 +270,9 @@
  * for a kernel fork().
  */
 
-int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
-	struct task_struct * p, struct pt_regs * regs)
+int
+copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
+	    struct task_struct * p, struct pt_regs * regs)
 {
 	extern void ret_from_sys_call(void);
 	extern void ret_from_smp_fork(void);
@@ -313,7 +310,8 @@
 /*
  * fill in the user structure for a core dump..
  */
-void dump_thread(struct pt_regs * pt, struct user * dump)
+void
+dump_thread(struct pt_regs * pt, struct user * dump)
 {
 	/* switch stack follows right below pt_regs: */
 	struct switch_stack * sw = ((struct switch_stack *) pt) - 1;
@@ -370,7 +368,8 @@
 	memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8);
 }
 
-int dump_fpu (struct pt_regs * regs, elf_fpregset_t *r)
+int
+dump_fpu(struct pt_regs * regs, elf_fpregset_t *r)
 {
 	/* switch stack follows right below pt_regs: */
 	struct switch_stack * sw = ((struct switch_stack *) regs) - 1;
@@ -388,7 +387,8 @@
  *
  * Don't do this at home.
  */
-asmlinkage int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
+asmlinkage int
+sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
 	unsigned long a3, unsigned long a4, unsigned long a5,
 	struct pt_regs regs)
 {
@@ -415,7 +415,8 @@
 #define first_sched	((unsigned long) scheduling_functions_start_here)
 #define last_sched	((unsigned long) scheduling_functions_end_here)
 
-unsigned long get_wchan(struct task_struct *p)
+unsigned long
+get_wchan(struct task_struct *p)
 {
 	unsigned long schedule_frame;
 	unsigned long pc;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)