diff options
Diffstat (limited to 'sys/pc98/cbus/sio.c')
| -rw-r--r-- | sys/pc98/cbus/sio.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 89056545e20c..4477cac1d797 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -533,7 +533,8 @@ static int siocnunit; #endif static Port_t siogdbiobase; static int siogdbunit = -1; -static bool_t sio_registered; +static struct intrhand *sio_slow_ih; +static struct intrhand *sio_fast_ih; static int sio_timeout; static int sio_timeouts_until_log; static struct callout_handle sio_timeout_handle @@ -2083,9 +2084,11 @@ determined_type: ; printf(" with a bogus IIR_TXRDY register"); printf("\n"); - if (!sio_registered) { - register_swi(SWI_TTY, siopoll); - sio_registered = TRUE; + 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); } make_dev(&sio_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit); @@ -2917,7 +2920,7 @@ more_intr: } ++com->bytes_in; if (com->hotchar != 0 && recv_data == com->hotchar) - setsofttty(); + sched_swi(sio_fast_ih, SWI_NOSWITCH); ioptr = com->iptr; if (ioptr >= com->ibufend) CE_RECORD(com, CE_INTERRUPT_BUF_OVERFLOW); @@ -2926,14 +2929,10 @@ more_intr: microtime(&com->timestamp); ++com_events; /* XXX - needs to go away when alpha gets ithreads */ -#ifdef __alpha__ - schedsofttty(); -#else - setsofttty(); -#endif + sched_swi(sio_slow_ih, SWI_DELAY); #if 0 /* for testing input latency vs efficiency */ if (com->iptr - com->ibuf == 8) - setsofttty(); + sched_swi(sio_fast_ih, SWI_NOSWITCH); #endif ioptr[0] = recv_data; ioptr[com->ierroff] = line_status; @@ -2987,7 +2986,7 @@ cont: if (!(com->state & CS_CHECKMSR)) { com_events += LOTS_OF_EVENTS; com->state |= CS_CHECKMSR; - setsofttty(); + sched_swi(sio_fast_ih, SWI_NOSWITCH); } /* handle CTS change immediately for crisp flow ctl */ @@ -3089,7 +3088,8 @@ cont: if (!(com->state & CS_ODONE)) { com_events += LOTS_OF_EVENTS; com->state |= CS_ODONE; - setsofttty(); /* handle at high level ASAP */ + /* handle at high level ASAP */ + sched_swi(sio_fast_ih, SWI_NOSWITCH); } } if (COM_IIR_TXRDYBUG(com->flags) && (int_ctl != int_ctl_new)) { |
