Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/sparc add a junk variable to keep empty reads...



details:   https://anonhg.NetBSD.org/src/rev/c623969e3534
branches:  trunk
changeset: 588117:c623969e3534
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Feb 08 17:56:55 2006 +0000

description:
add a junk variable to keep empty reads from getting eliminated.
Fixed panic in timerattach_msiiep()

diffstat:

 sys/arch/sparc/sparc/timer_msiiep.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 883b2ac4cd7c -r c623969e3534 sys/arch/sparc/sparc/timer_msiiep.c
--- a/sys/arch/sparc/sparc/timer_msiiep.c       Wed Feb 08 17:29:33 2006 +0000
+++ b/sys/arch/sparc/sparc/timer_msiiep.c       Wed Feb 08 17:56:55 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: timer_msiiep.c,v 1.17 2005/11/16 03:00:23 uwe Exp $    */
+/*     $NetBSD: timer_msiiep.c,v 1.18 2006/02/08 17:56:55 macallan Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.17 2005/11/16 03:00:23 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.18 2006/02/08 17:56:55 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -93,7 +93,7 @@
  * counter is reset to 1 when new limit is written.
  */
 #define        tmr_ustolimIIep(n)      ((n) * 25 + 1)
-
+uint32_t junk;
 
 static int
 timermatch_msiiep(struct device *parent, struct cfdata *cf, void *aux)
@@ -124,11 +124,10 @@
        for (timerblurb = 1; ; ++timerblurb) {
                int t;
 
-               mspcic_read_4(pcic_pclr); /* clear the limit bit */
+               junk = mspcic_read_4(pcic_pclr); /* clear the limit bit */
                mspcic_write_4(pcic_pclr, 0); /* reset to 1, free run */
                delay(100);
                t = mspcic_read_4(pcic_pccr);
-
                if (t < 0)      /* limit bit set, cannot happen */
                        panic("delay calibration");
 
@@ -181,7 +180,7 @@
 clockintr_msiiep(void *cap)
 {
 
-       mspcic_read_4(pcic_sclr); /* clear the interrupt */
+       junk = mspcic_read_4(pcic_sclr); /* clear the interrupt */
        hardclock((struct clockframe *)cap);
        return (1);
 }
@@ -196,7 +195,7 @@
        struct clockframe *frame = cap;
        u_long newint;
 
-       mspcic_read_4(pcic_pclr); /* clear the interrupt */
+       junk = mspcic_read_4(pcic_pclr); /* clear the interrupt */
 
        statclock(frame);
 



Home | Main Index | Thread Index | Old Index