summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2003-09-15 13:49:18 +0000
committerbde <bde@FreeBSD.org>2003-09-15 13:49:18 +0000
commit286bde0c9de8e595ed2ec8e3ffa15cdc0f64b523 (patch)
treeb72677300b21060ebe57aa63dc51a5ee5f401849
parent7f14fd53128df22f4bc1cac494908f253582293c (diff)
downloadFreeBSD-src-286bde0c9de8e595ed2ec8e3ffa15cdc0f64b523.zip
FreeBSD-src-286bde0c9de8e595ed2ec8e3ffa15cdc0f64b523.tar.gz
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.
-rw-r--r--sys/dev/sio/sio.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 0e42323..916f5dd 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) {
OpenPOWER on IntegriCloud