Merged from sys/isa/sio.c revision 1.324 (sched_swi -> swi_sched).
This commit is contained in:
parent
eb0dde377b
commit
b54b3917b1
@ -525,8 +525,8 @@ static int siocnunit;
|
||||
#endif
|
||||
static Port_t siogdbiobase;
|
||||
static int siogdbunit = -1;
|
||||
static struct intrhand *sio_slow_ih;
|
||||
static struct intrhand *sio_fast_ih;
|
||||
static void *sio_slow_ih;
|
||||
static void *sio_fast_ih;
|
||||
static int sio_timeout;
|
||||
static int sio_timeouts_until_log;
|
||||
static struct callout_handle sio_timeout_handle
|
||||
@ -1221,7 +1221,7 @@ sioprobe(dev, xrid)
|
||||
com->bsh = rman_get_bushandle(port);
|
||||
|
||||
if (atomic_cmpset_int(&sio_inited, 0, 1))
|
||||
mtx_init(&sio_lock, "sio", MTX_SPIN);
|
||||
mtx_init(&sio_lock, driver_name, MTX_SPIN);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
@ -2074,10 +2074,10 @@ determined_type: ;
|
||||
printf("\n");
|
||||
|
||||
if (sio_fast_ih == NULL) {
|
||||
sio_fast_ih = sinthand_add("tty:sio", &tty_ithd, siopoll,
|
||||
NULL, SWI_TTY, 0);
|
||||
sio_slow_ih = sinthand_add("tty:sio", &clk_ithd, siopoll,
|
||||
NULL, SWI_TTY, 0);
|
||||
swi_add(&tty_ithd, "tty:sio", siopoll, NULL, SWI_TTY, 0,
|
||||
&sio_fast_ih);
|
||||
swi_add(&clk_ithd, "tty:sio", siopoll, NULL, SWI_TTY, 0,
|
||||
&sio_slow_ih);
|
||||
}
|
||||
com->devs[0] = make_dev(&sio_cdevsw, unit,
|
||||
UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
|
||||
@ -2903,7 +2903,7 @@ status_read:;
|
||||
}
|
||||
++com->bytes_in;
|
||||
if (com->hotchar != 0 && recv_data == com->hotchar)
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
ioptr = com->iptr;
|
||||
if (ioptr >= com->ibufend)
|
||||
CE_RECORD(com, CE_INTERRUPT_BUF_OVERFLOW);
|
||||
@ -2911,10 +2911,10 @@ status_read:;
|
||||
if (com->do_timestamp)
|
||||
microtime(&com->timestamp);
|
||||
++com_events;
|
||||
sched_swi(sio_slow_ih, SWI_DELAY);
|
||||
swi_sched(sio_slow_ih, SWI_DELAY);
|
||||
#if 0 /* for testing input latency vs efficiency */
|
||||
if (com->iptr - com->ibuf == 8)
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
#endif
|
||||
ioptr[0] = recv_data;
|
||||
ioptr[com->ierroff] = line_status;
|
||||
@ -2968,7 +2968,7 @@ if (com->iptr - com->ibuf == 8)
|
||||
if (!(com->state & CS_CHECKMSR)) {
|
||||
com_events += LOTS_OF_EVENTS;
|
||||
com->state |= CS_CHECKMSR;
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
}
|
||||
|
||||
/* handle CTS change immediately for crisp flow ctl */
|
||||
@ -3071,7 +3071,7 @@ if (com->iptr - com->ibuf == 8)
|
||||
com_events += LOTS_OF_EVENTS;
|
||||
com->state |= CS_ODONE;
|
||||
/* handle at high level ASAP */
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
}
|
||||
}
|
||||
if (COM_IIR_TXRDYBUG(com->flags) && (int_ctl != int_ctl_new)) {
|
||||
|
@ -525,8 +525,8 @@ static int siocnunit;
|
||||
#endif
|
||||
static Port_t siogdbiobase;
|
||||
static int siogdbunit = -1;
|
||||
static struct intrhand *sio_slow_ih;
|
||||
static struct intrhand *sio_fast_ih;
|
||||
static void *sio_slow_ih;
|
||||
static void *sio_fast_ih;
|
||||
static int sio_timeout;
|
||||
static int sio_timeouts_until_log;
|
||||
static struct callout_handle sio_timeout_handle
|
||||
@ -1221,7 +1221,7 @@ sioprobe(dev, xrid)
|
||||
com->bsh = rman_get_bushandle(port);
|
||||
|
||||
if (atomic_cmpset_int(&sio_inited, 0, 1))
|
||||
mtx_init(&sio_lock, "sio", MTX_SPIN);
|
||||
mtx_init(&sio_lock, driver_name, MTX_SPIN);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
@ -2074,10 +2074,10 @@ determined_type: ;
|
||||
printf("\n");
|
||||
|
||||
if (sio_fast_ih == NULL) {
|
||||
sio_fast_ih = sinthand_add("tty:sio", &tty_ithd, siopoll,
|
||||
NULL, SWI_TTY, 0);
|
||||
sio_slow_ih = sinthand_add("tty:sio", &clk_ithd, siopoll,
|
||||
NULL, SWI_TTY, 0);
|
||||
swi_add(&tty_ithd, "tty:sio", siopoll, NULL, SWI_TTY, 0,
|
||||
&sio_fast_ih);
|
||||
swi_add(&clk_ithd, "tty:sio", siopoll, NULL, SWI_TTY, 0,
|
||||
&sio_slow_ih);
|
||||
}
|
||||
com->devs[0] = make_dev(&sio_cdevsw, unit,
|
||||
UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
|
||||
@ -2903,7 +2903,7 @@ status_read:;
|
||||
}
|
||||
++com->bytes_in;
|
||||
if (com->hotchar != 0 && recv_data == com->hotchar)
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
ioptr = com->iptr;
|
||||
if (ioptr >= com->ibufend)
|
||||
CE_RECORD(com, CE_INTERRUPT_BUF_OVERFLOW);
|
||||
@ -2911,10 +2911,10 @@ status_read:;
|
||||
if (com->do_timestamp)
|
||||
microtime(&com->timestamp);
|
||||
++com_events;
|
||||
sched_swi(sio_slow_ih, SWI_DELAY);
|
||||
swi_sched(sio_slow_ih, SWI_DELAY);
|
||||
#if 0 /* for testing input latency vs efficiency */
|
||||
if (com->iptr - com->ibuf == 8)
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
#endif
|
||||
ioptr[0] = recv_data;
|
||||
ioptr[com->ierroff] = line_status;
|
||||
@ -2968,7 +2968,7 @@ if (com->iptr - com->ibuf == 8)
|
||||
if (!(com->state & CS_CHECKMSR)) {
|
||||
com_events += LOTS_OF_EVENTS;
|
||||
com->state |= CS_CHECKMSR;
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
}
|
||||
|
||||
/* handle CTS change immediately for crisp flow ctl */
|
||||
@ -3071,7 +3071,7 @@ if (com->iptr - com->ibuf == 8)
|
||||
com_events += LOTS_OF_EVENTS;
|
||||
com->state |= CS_ODONE;
|
||||
/* handle at high level ASAP */
|
||||
sched_swi(sio_fast_ih, SWI_NOSWITCH);
|
||||
swi_sched(sio_fast_ih, SWI_NOSWITCH);
|
||||
}
|
||||
}
|
||||
if (COM_IIR_TXRDYBUG(com->flags) && (int_ctl != int_ctl_new)) {
|
||||
|
Loading…
Reference in New Issue
Block a user