Module Name: src Committed By: riastradh Date: Thu Nov 17 23:57:21 UTC 2022
Modified Files: src/sys/dev/ic: pckbc.c Log Message: pckbc(4): Stop waiting 8us before reading each data byte. This appears to have copied from pccons(4), where it was introduced by mycroft@ in 1994 in sys/arch/i386/isa/pccons.c rev. 1.63 with the commit message `Rename two files.'. No justification was given. This delay was in a hard interrupt handler, and an MP-unsafe one to boot, so it could hold up system responsiveness by delaying interrupt handling and blocking other users of the legacy kernel lock. The delay remains in the pckbc_wait_output loop to set a command byte, which is not used in the interrupt path (and I suspect is used only on boot during attach anyway). To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/dev/ic/pckbc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/pckbc.c diff -u src/sys/dev/ic/pckbc.c:1.64 src/sys/dev/ic/pckbc.c:1.65 --- src/sys/dev/ic/pckbc.c:1.64 Fri Oct 28 23:44:38 2022 +++ src/sys/dev/ic/pckbc.c Thu Nov 17 23:57:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pckbc.c,v 1.64 2022/10/28 23:44:38 riastradh Exp $ */ +/* $NetBSD: pckbc.c,v 1.65 2022/11/17 23:57:20 riastradh Exp $ */ /* * Copyright (c) 2004 Ben Harris. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.64 2022/10/28 23:44:38 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.65 2022/11/17 23:57:20 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -146,7 +146,6 @@ pckbc_poll_data1(void *pt, pckbc_slot_t for (; i; i--, delay(1000)) { stat = bus_space_read_1(t->t_iot, t->t_ioh_c, 0); if (stat & KBS_DIB) { - KBD_DELAY; c = bus_space_read_1(t->t_iot, t->t_ioh_d, 0); process: @@ -512,12 +511,10 @@ pckbcintr_hard(void *vsc) if (!q) { /* XXX do something for live insertion? */ printf("pckbc: no dev for slot %d\n", slot); - KBD_DELAY; (void) bus_space_read_1(t->t_iot, t->t_ioh_d, 0); continue; } - KBD_DELAY; data = bus_space_read_1(t->t_iot, t->t_ioh_d, 0); rnd_add_uint32(&q->rnd_source, (stat<<8)|data); @@ -600,7 +597,6 @@ pckbcintr(void *vsc) return 0; served = 1; - KBD_DELAY; data = bus_space_read_1(t->t_iot, t->t_ioh_d, 0); if (q != NULL)