[PATCH][PPC64] update_process_times simplification

Milton Miller miltonm at bga.com
Mon Nov 15 21:21:01 EST 2004


When the update_process_times call was moved out of do_timer for the UP case,
the replicator didn't track down the hiding and just added ifndef SMP.

This removes the ifdefs and the indirection of calling another file for
one function in a third file.

Untested.
Signed-off-by: Milton Miller <miltonm at bga.com>

===== arch/ppc64/kernel/smp.c 1.98 vs edited =====
--- 1.98/arch/ppc64/kernel/smp.c	2004-10-25 03:29:39 +02:00
+++ edited/arch/ppc64/kernel/smp.c	2004-11-15 10:11:09 +01:00
@@ -159,11 +159,6 @@ static void __init smp_space_timers(unsi
 	}
 }
 
-void smp_local_timer_interrupt(struct pt_regs * regs)
-{
-	update_process_times(user_mode(regs));
-}
-
 void smp_message_recv(int msg, struct pt_regs *regs)
 {
 	switch(msg) {
===== arch/ppc64/kernel/time.c 1.40 vs edited =====
--- 1.40/arch/ppc64/kernel/time.c	2004-10-20 10:37:07 +02:00
+++ edited/arch/ppc64/kernel/time.c	2004-11-15 10:13:07 +01:00
@@ -67,8 +67,6 @@
 #include <asm/prom.h>
 #include <asm/sections.h>
 
-void smp_local_timer_interrupt(struct pt_regs *);
-
 u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
 
 EXPORT_SYMBOL(jiffies_64);
@@ -258,8 +256,6 @@ int timer_interrupt(struct pt_regs * reg
 	lpaca->lppaca.xIntDword.xFields.xDecrInt = 0;
 
 	while (lpaca->next_jiffy_update_tb <= (cur_tb = get_tb())) {
-
-#ifdef CONFIG_SMP
 		/*
 		 * We cannot disable the decrementer, so in the period
 		 * between this cpu's being marked offline in cpu_online_map
@@ -268,8 +264,7 @@ int timer_interrupt(struct pt_regs * reg
 		 * is the case.
 		 */
 		if (!cpu_is_offline(cpu))
-			smp_local_timer_interrupt(regs);
-#endif
+			update_process_times(user_mode(regs));
 		/*
 		 * No need to check whether cpu is offline here; boot_cpuid
 		 * should have been fixed up by now.
@@ -278,9 +273,6 @@ int timer_interrupt(struct pt_regs * reg
 			write_seqlock(&xtime_lock);
 			tb_last_stamp = lpaca->next_jiffy_update_tb;
 			do_timer(regs);
-#ifndef CONFIG_SMP
-			update_process_times(user_mode(regs));
-#endif
 			timer_sync_xtime( cur_tb );
 			timer_check_rtc();
 			write_sequnlock(&xtime_lock);



More information about the Linuxppc64-dev mailing list