Module Name: src Committed By: bouyer Date: Sat Mar 17 18:40:20 UTC 2012
Modified Files: src/sys/arch/x68k/dev [netbsd-5]: kbd.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1732): sys/arch/x68k/dev/kbd.c: revision 1.37 Calling psignal(9) (via EV_WAKEUP()) in interrupt handlers could cause mutex error panic, so defer it via softint(9). This should fix panic on heavy key strokes during running Xserver. Should be pulled up to netbsd-5. XXX: amiga and atari might have the similar problem? To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.6.1 src/sys/arch/x68k/dev/kbd.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/arch/x68k/dev/kbd.c diff -u src/sys/arch/x68k/dev/kbd.c:1.35 src/sys/arch/x68k/dev/kbd.c:1.35.6.1 --- src/sys/arch/x68k/dev/kbd.c:1.35 Wed Jun 25 08:14:59 2008 +++ src/sys/arch/x68k/dev/kbd.c Sat Mar 17 18:40:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kbd.c,v 1.35 2008/06/25 08:14:59 isaki Exp $ */ +/* $NetBSD: kbd.c,v 1.35.6.1 2012/03/17 18:40:20 bouyer Exp $ */ /* * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.35 2008/06/25 08:14:59 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.35.6.1 2012/03/17 18:40:20 bouyer Exp $"); #include "ite.h" #include "bell.h" @@ -350,7 +350,7 @@ kbdintr(void *arg) fe->value = KEY_UP(c) ? VKEY_UP : VKEY_DOWN; getmicrotime(&fe->time); sc->sc_events.ev_put = put; - EV_WAKEUP(&sc->sc_events); + softint_schedule(sc->sc_softintr_cookie); return 0; } @@ -358,10 +358,14 @@ kbdintr(void *arg) void kbdsoftint(void *arg) /* what if ite is not configured? */ { + struct kbd_softc *sc = arg; int s; s = spltty(); + if (sc->sc_event_mode) + EV_WAKEUP(&sc->sc_events); + while(kbdgetoff < kbdputoff) ite_filter(kbdbuf[kbdgetoff++ & KBDBUFMASK]); kbdgetoff = kbdputoff = 0;