Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/dev Calling psignal(9) (via EV_WAKEUP()) in in...
details: https://anonhg.NetBSD.org/src/rev/0799f7e58f47
branches: trunk
changeset: 770566:0799f7e58f47
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Oct 23 13:21:54 2011 +0000
description:
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?
diffstat:
sys/arch/x68k/dev/kbd.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r 8c04e04a88ef -r 0799f7e58f47 sys/arch/x68k/dev/kbd.c
--- a/sys/arch/x68k/dev/kbd.c Sun Oct 23 13:20:59 2011 +0000
+++ b/sys/arch/x68k/dev/kbd.c Sun Oct 23 13:21:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.36 2009/01/17 03:26:31 isaki Exp $ */
+/* $NetBSD: kbd.c,v 1.37 2011/10/23 13:21:54 tsutsui 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.36 2009/01/17 03:26:31 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.37 2011/10/23 13:21:54 tsutsui Exp $");
#include "ite.h"
#include "bell.h"
@@ -350,7 +350,7 @@
fe->value = KEY_UP(c) ? VKEY_UP : VKEY_DOWN;
firm_gettime(fe);
sc->sc_events.ev_put = put;
- EV_WAKEUP(&sc->sc_events);
+ softint_schedule(sc->sc_softintr_cookie);
return 0;
}
@@ -358,10 +358,14 @@
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;
Home |
Main Index |
Thread Index |
Old Index