Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/dev Always schedule callback functions via ad...



details:   https://anonhg.NetBSD.org/src/rev/9f4224e3b08c
branches:  trunk
changeset: 753797:9f4224e3b08c
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Apr 10 18:02:05 2010 +0000

description:
Always schedule callback functions via add_sicallback(),
which calls softint_schedule(9).

We cannot use BASEPRI() to check recursive calls any longer
since softint(9) has been reorganized to use kernel thread.

diffstat:

 sys/arch/atari/dev/atari5380.c |  22 ++++------------------
 sys/arch/atari/dev/dma.c       |  13 +++----------
 2 files changed, 7 insertions(+), 28 deletions(-)

diffs (84 lines):

diff -r 4a2717af316f -r 9f4224e3b08c sys/arch/atari/dev/atari5380.c
--- a/sys/arch/atari/dev/atari5380.c    Sat Apr 10 17:55:24 2010 +0000
+++ b/sys/arch/atari/dev/atari5380.c    Sat Apr 10 18:02:05 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atari5380.c,v 1.53 2009/10/20 19:10:10 snj Exp $       */
+/*     $NetBSD: atari5380.c,v 1.54 2010/04/10 18:02:05 tsutsui Exp $   */
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.53 2009/10/20 19:10:10 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.54 2010/04/10 18:02:05 tsutsui Exp $");
 
 #include "opt_atariscsi.h"
 
@@ -1104,14 +1104,7 @@
 {
        if (GET_5380_REG(NCR5380_DMSTAT) & SC_IRQ_SET) {
                scsi_idisable();
-               if (!BASEPRI(sr))
-                       add_sicallback((si_farg)ncr_ctrl_intr,
-                                               (void *)cur_softc, 0);
-               else {
-                       spl1();
-                       ncr_ctrl_intr(cur_softc);
-                       spl0();
-               }
+               add_sicallback((si_farg)ncr_ctrl_intr, (void *)cur_softc, 0);
        }
 }
 
@@ -1125,14 +1118,7 @@
 
        if ((reqp = connected) && (reqp->dr_flag & DRIVER_IN_DMA)) {
                scsi_idisable();
-               if (!BASEPRI(sr))
-                       add_sicallback((si_farg)ncr_dma_intr,
-                                       (void *)cur_softc, 0);
-               else {
-                       spl1();
-                       ncr_dma_intr(cur_softc);
-                       spl0();
-               }
+               add_sicallback((si_farg)ncr_dma_intr, (void *)cur_softc, 0);
        }
 }
 
diff -r 4a2717af316f -r 9f4224e3b08c sys/arch/atari/dev/dma.c
--- a/sys/arch/atari/dev/dma.c  Sat Apr 10 17:55:24 2010 +0000
+++ b/sys/arch/atari/dev/dma.c  Sat Apr 10 18:02:05 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dma.c,v 1.24 2009/10/20 19:10:10 snj Exp $     */
+/*     $NetBSD: dma.c,v 1.25 2010/04/10 18:02:05 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.24 2009/10/20 19:10:10 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.25 2010/04/10 18:02:05 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -218,14 +218,7 @@
                 */
                int_func = dma_active.tqh_first->int_func;
                softc    = dma_active.tqh_first->softc;
-
-               if(!BASEPRI(sr))
-                       add_sicallback((si_farg)int_func, softc, 0);
-               else {
-                       spl1();
-                       (*int_func)(softc);
-                       spl0();
-               }
+               add_sicallback((si_farg)int_func, softc, 0);
                return 1;
        }
        return 0;



Home | Main Index | Thread Index | Old Index