Use the softint API.

This commit is contained in:
ad 2007-11-26 23:29:36 +00:00
parent afa1151e21
commit 34db286793
7 changed files with 35 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.2 2006/11/03 03:04:53 tsutsui Exp $ */
/* $NetBSD: zs.c,v 1.3 2007/11/26 23:29:37 ad Exp $ */
/*-
* Copyright (c) 1996, 2005 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.2 2006/11/03 03:04:53 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.3 2007/11/26 23:29:37 ad Exp $");
#include "opt_ddb.h"
@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.2 2006/11/03 03:04:53 tsutsui Exp $");
#include <sys/device.h>
#include <sys/tty.h>
#include <sys/systm.h>
#include <sys/intr.h>
#include <machine/z8530var.h>
#include <dev/ic/z8530reg.h>
@ -93,7 +94,7 @@ zshard(void *arg)
zsc = arg;
rval = zsc_intr_hard(zsc);
if (zsc->zsc_cs[0]->cs_softreq || zsc->zsc_cs[1]->cs_softreq)
softintr_schedule(zsc->zsc_si);
softint_schedule(zsc->zsc_si);
return rval;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs_sbdio.c,v 1.6 2007/11/09 00:05:04 ad Exp $ */
/* $NetBSD: zs_sbdio.c,v 1.7 2007/11/26 23:29:37 ad Exp $ */
/*-
* Copyright (c) 1996, 2005 The NetBSD Foundation, Inc.
@ -44,13 +44,14 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs_sbdio.c,v 1.6 2007/11/09 00:05:04 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs_sbdio.c,v 1.7 2007/11/26 23:29:37 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/tty.h>
#include <sys/conf.h>
#include <sys/intr.h>
#include <dev/cons.h>
#include <dev/ic/z8530reg.h>
@ -189,7 +190,7 @@ zs_sbdio_attach(struct device *parent, struct device *self, void *aux)
}
}
zsc->zsc_si = softintr_establish(IPL_SOFTSERIAL,
zsc->zsc_si = softint_establish(SOFTINT_SERIAL,
(void (*)(void *))zsc_intr_soft, zsc);
intr_establish(sa->sa_irq, zshard, zsc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbscn.c,v 1.24 2007/11/19 18:51:41 ad Exp $ */
/* $NetBSD: sbscn.c,v 1.25 2007/11/26 23:29:37 ad Exp $ */
/*
* Copyright 2000, 2001
@ -116,7 +116,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.24 2007/11/19 18:51:41 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.25 2007/11/26 23:29:37 ad Exp $");
#define SBSCN_DEBUG
@ -144,6 +144,7 @@ __KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.24 2007/11/19 18:51:41 ad Exp $");
#include <sys/malloc.h>
#include <sys/vnode.h>
#include <sys/kauth.h>
#include <sys/intr.h>
#include <mips/sibyte/dev/sbobiovar.h>
#if 0
@ -384,7 +385,7 @@ sbscn_attach_channel(struct sbscn_softc *sc, int chan, int intr)
}
#endif
ch->ch_si = softintr_establish(IPL_SOFTSERIAL, sbscn_soft, ch);
ch->ch_si = softint_establish(SOFTINT_SERIAL, sbscn_soft, ch);
#if NRND > 0 && defined(RND_SBSCN)
rnd_attach_source(&ch->ch_rnd_source, sc->sc_dev.dv_xname,
@ -823,7 +824,7 @@ sbscn_schedrx(struct sbscn_channel *ch)
ch->ch_rx_ready = 1;
/* Wake up the poller. */
softintr_schedule(ch->ch_si);
softint_schedule(ch->ch_si);
}
void
@ -1668,7 +1669,7 @@ XXX
}
/* Wake up the poller. */
softintr_schedule(ch->ch_si);
softint_schedule(ch->ch_si);
#if NRND > 0 && defined(RND_SBSCN)
rnd_add_uint32(&ch->ch_rnd_source, isr | sr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.20 2007/11/09 00:05:05 ad Exp $ */
/* $NetBSD: zs.c,v 1.21 2007/11/26 23:29:36 ad Exp $ */
/*-
* Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.20 2007/11/09 00:05:05 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.21 2007/11/26 23:29:36 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -60,8 +60,9 @@ __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.20 2007/11/09 00:05:05 ad Exp $");
#include <sys/tty.h>
#include <sys/time.h>
#include <sys/syslog.h>
#include <sys/cpu.h>
#include <sys/intr.h>
#include <machine/cpu.h>
#include <machine/mainboard.h>
#include <machine/autoconf.h>
#include <machine/prom.h>
@ -291,7 +292,7 @@ zs_attach(parent, self, aux)
}
zsc->sc_si = softintr_establish(IPL_SOFTSERIAL, zssoft, zsc);
zsc->sc_si = softint_establish(SOFTINT_SERIAL, zssoft, zsc);
bus_intr_establish(zsc->zsc_bustag, SYS_INTR_SCC0, 0, 0, zshard, NULL);
evcnt_attach_dynamic(&zsc->zs_intrcnt, EVCNT_TYPE_INTR, NULL,
@ -347,7 +348,7 @@ zshard(arg)
softreq |= zsc->zsc_cs[1]->cs_softreq;
if (softreq && (zssoftpending == 0)) {
zssoftpending = 1;
softintr_schedule(zsc->sc_si);
softint_schedule(zsc->sc_si);
}
zsc->zs_intrcnt.ev_count++;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs_ap.c,v 1.22 2007/11/09 00:05:05 ad Exp $ */
/* $NetBSD: zs_ap.c,v 1.23 2007/11/26 23:29:36 ad Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,16 +45,17 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs_ap.c,v 1.22 2007/11/09 00:05:05 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs_ap.c,v 1.23 2007/11/26 23:29:36 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/tty.h>
#include <sys/conf.h>
#include <sys/cpu.h>
#include <sys/intr.h>
#include <machine/adrsmap.h>
#include <machine/cpu.h>
#include <machine/z8530var.h>
#include <dev/cons.h>
@ -307,7 +308,7 @@ zs_ap_attach(struct device *parent, struct device *self, void *aux)
if (!didintr) {
didintr = 1;
zsc->zsc_si = softintr_establish(IPL_SOFTSERIAL, zssoft, zsc);
zsc->zsc_si = softint_establish(SOFTINT_SERIAL, zssoft, zsc);
apbus_intr_establish(1, /* interrupt level ( 0 or 1 ) */
NEWS5000_INT1_SCC,
0, /* priority */

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.21 2005/12/11 12:18:24 christos Exp $ */
/* $NetBSD: zs.c,v 1.22 2007/11/26 23:29:37 ad Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.21 2005/12/11 12:18:24 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.22 2007/11/26 23:29:37 ad Exp $");
#include "opt_ddb.h"
@ -53,9 +53,10 @@ __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.21 2005/12/11 12:18:24 christos Exp $");
#include <sys/device.h>
#include <sys/tty.h>
#include <sys/systm.h>
#include <sys/cpu.h>
#include <sys/intr.h>
#include <machine/adrsmap.h>
#include <machine/cpu.h>
#include <machine/z8530var.h>
#include <dev/ic/z8530reg.h>
@ -104,7 +105,7 @@ zshard(void *arg)
softreq = zsc->zsc_cs[0]->cs_softreq;
softreq |= zsc->zsc_cs[1]->cs_softreq;
if (softreq)
softintr_schedule(zsc->zsc_si);
softint_schedule(zsc->zsc_si);
}
return rval;

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs_hb.c,v 1.22 2007/11/09 00:05:05 ad Exp $ */
/* $NetBSD: zs_hb.c,v 1.23 2007/11/26 23:29:37 ad Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,16 +45,17 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1.22 2007/11/09 00:05:05 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1.23 2007/11/26 23:29:37 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/tty.h>
#include <sys/conf.h>
#include <sys/cpu.h>
#include <sys/intr.h>
#include <machine/adrsmap.h>
#include <machine/cpu.h>
#include <machine/z8530var.h>
#include <dev/cons.h>
@ -292,7 +293,7 @@ zs_hb_attach(struct device *parent, struct device *self, void *aux)
if (!didintr) {
didintr = 1;
zsc->zsc_si = softintr_establish(IPL_SOFTSERIAL, zssoft, zsc);
zsc->zsc_si = softint_establish(SOFTINT_SERIAL, zssoft, zsc);
hb_intr_establish(intlevel, INTST1_SCC, IPL_SERIAL,
zshard_hb, NULL);
}