From 7c24ca50f8ed6d8180344b0bf983ef871d18e41f Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 15 Sep 2003 13:49:18 +0000 Subject: Quick fix for a pessimization in rev.1.194. An extra i/o instruction was added to the fast path to support the COM_IIR_RXRDYBUG() case even when that case is not configured. This increased the relative overhead of sio input by almost 25% in the worst case and by 2-3% in the usual case (usually only about 0.2% absolute per port at 115200 bps). The quick fix is to significantly pessimize only the COM_IIR_RXRDYBUG() case. --- sys/dev/sio/sio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/dev/sio/sio.c') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 0e42323de2a8..916f5ddd6e23 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -1770,8 +1770,13 @@ siointr1(com) u_char int_ctl; u_char int_ctl_new; - int_ctl = inb(com->intr_ctl_port); - int_ctl_new = int_ctl; + if (COM_IIR_TXRDYBUG(com->flags)) { + int_ctl = inb(com->intr_ctl_port); + int_ctl_new = int_ctl; + } else { + int_ctl = 0; + int_ctl_new = 0; + } while (!com->gone) { if (com->pps.ppsparam.mode & PPS_CAPTUREBOTH) { -- cgit v1.2.3