patch-2.4.0-test5 linux/arch/ia64/kernel/smp.c

Next file: linux/arch/ia64/kernel/sys_ia64.c
Previous file: linux/arch/ia64/kernel/signal.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test4/linux/arch/ia64/kernel/smp.c linux/arch/ia64/kernel/smp.c
@@ -183,7 +183,7 @@
 				int wait;
 
 				/* release the 'pointer lock' */
-				data = smp_call_function_data;
+				data = (struct smp_call_struct *) smp_call_function_data;
 				func = data->func;
 				info = data->info;
 				wait = data->wait;
@@ -396,35 +396,11 @@
 smp_do_timer(struct pt_regs *regs)
 {
         int cpu = smp_processor_id();
-        int user = user_mode(regs);
 	struct cpuinfo_ia64 *data = &cpu_data[cpu];
 
-	extern void update_one_process(struct task_struct *, unsigned long, unsigned long, 
-				       unsigned long, int);
         if (!--data->prof_counter) {
 		irq_enter(cpu, TIMER_IRQ);
-
-		update_one_process(current, 1, user, !user, cpu);
-		if (current->pid) { 
-			if (--current->counter < 0) {
-				current->counter = 0;
-				current->need_resched = 1;
-			}
-
-			if (user) {
-				if (current->nice > 0) {
-					kstat.cpu_nice++;
-					kstat.per_cpu_nice[cpu]++;
-				} else {
-					kstat.cpu_user++;
-					kstat.per_cpu_user[cpu]++;
-				}
-			} else {
-				kstat.cpu_system++;
-				kstat.per_cpu_system[cpu]++;
-			}
-		} 
-		
+		update_process_times(user_mode(regs));
 		data->prof_counter = data->prof_multiplier;
 		irq_exit(cpu, TIMER_IRQ);
 	}
@@ -536,7 +512,7 @@
 	 * Don't care about the usp and regs settings since we'll never
 	 * reschedule the forked task.
 	 */
-	return do_fork(CLONE_VM|CLONE_PID, 0, 0);
+	return do_fork(CLONE_VM|CLONE_PID, 0, 0, 0);
 }
 
 /*

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