[PATCH] PPC64 Simplify timer_interrupt

Paul Mackerras paulus at samba.org
Tue Jan 4 17:39:00 EST 2005


This patch is from Milton Miller <miltonm at bga.com>.

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.

Signed-off-by: Milton Miller <miltonm at bga.com>
Signed-off-by: Paul Mackerras <paulus at samba.org>

diff -urN base-2.6/arch/ppc64/kernel/smp.c test/arch/ppc64/kernel/smp.c
--- base-2.6/arch/ppc64/kernel/smp.c	2005-01-04 16:24:21.930503880 +1100
+++ test/arch/ppc64/kernel/smp.c	2005-01-04 17:36:44.569526376 +1100
@@ -156,11 +156,6 @@
 	}
 }
 
-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) {
diff -urN base-2.6/arch/ppc64/kernel/time.c test/arch/ppc64/kernel/time.c
--- base-2.6/arch/ppc64/kernel/time.c	2005-01-04 16:27:42.854446184 +1100
+++ test/arch/ppc64/kernel/time.c	2005-01-04 17:36:44.571526072 +1100
@@ -68,8 +68,6 @@
 #include <asm/sections.h>
 #include <asm/systemcfg.h>
 
-void smp_local_timer_interrupt(struct pt_regs *);
-
 u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
 
 EXPORT_SYMBOL(jiffies_64);
@@ -259,8 +257,6 @@
 	lpaca->lppaca.int_dword.fields.decr_int = 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
@@ -269,8 +265,7 @@
 		 * 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.
@@ -279,9 +274,6 @@
 			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