Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH]  Let Malta and its friends use common timer interrupt code
@ 2002-07-19 21:14 Jun Sun
  2002-07-22 13:41 ` Maciej W. Rozycki
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Sun @ 2002-07-19 21:14 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]


This patch let Malta and other MIPS boards use the common timer interrupt 
code.  Not only it reduces maintainance, but also it lets Malta benefit from 
common improvement (such as Preemptible kernel).

Jun


[-- Attachment #2: 020719.a.mips-boards-use-ll_timer_interrupt.patch --]
[-- Type: text/plain, Size: 1288 bytes --]

diff -Nru linux/arch/mips/mips-boards/generic/time.c.orig linux/arch/mips/mips-boards/generic/time.c
--- linux/arch/mips/mips-boards/generic/time.c.orig	Tue May  7 20:05:01 2002
+++ linux/arch/mips/mips-boards/generic/time.c	Fri Jul 19 13:55:42 2002
@@ -35,6 +35,7 @@
 #include <asm/hardirq.h>
 #include <asm/div64.h>
 #include <asm/cpu.h>
+#include <asm/time.h>
 
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
@@ -46,8 +47,6 @@
 static unsigned int r4k_offset; /* Amount to increment compare reg each time */
 static unsigned int r4k_cur;    /* What counter should be at next timer irq */
 
-extern unsigned int mips_counter_frequency;
-
 #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
 
 #if defined(CONFIG_MIPS_ATLAS)
@@ -71,13 +70,6 @@
 
 void mips_timer_interrupt(struct pt_regs *regs)
 {
-	int cpu = smp_processor_id();
-	int irq = MIPS_CPU_TIMER_IRQ;
-
-	irq_enter(cpu, irq);
-	kstat.irqs[cpu][irq]++;
-	timer_interrupt(irq, NULL, regs);
-
 	if ((timer_tick_count++ % HZ) == 0) {
 		mips_display_message(&display_string[display_count++]);
 		if (display_count == MAX_DISPLAY_COUNT)
@@ -85,10 +77,7 @@
 
 	}
 
-	irq_exit(cpu, irq);
-
-	if (softirq_pending(cpu))
-		do_softirq();
+	ll_timer_interrupt(MIPS_CPU_TIMER_IRQ, regs);
 }
 
 /* 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]  Let Malta and its friends use common timer interrupt code
  2002-07-19 21:14 [PATCH] Let Malta and its friends use common timer interrupt code Jun Sun
@ 2002-07-22 13:41 ` Maciej W. Rozycki
  0 siblings, 0 replies; 2+ messages in thread
From: Maciej W. Rozycki @ 2002-07-22 13:41 UTC (permalink / raw)
  To: Jun Sun; +Cc: linux-mips, Ralf Baechle

On Fri, 19 Jul 2002, Jun Sun wrote:

> This patch let Malta and other MIPS boards use the common timer interrupt 
> code.  Not only it reduces maintainance, but also it lets Malta benefit from 
> common improvement (such as Preemptible kernel).

 Hmm, as a side note, it's actually questionable whether a kernel
preemption is an improvement or not. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-22 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-19 21:14 [PATCH] Let Malta and its friends use common timer interrupt code Jun Sun
2002-07-22 13:41 ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox