More spllowersoftclock() fallout.

This commit is contained in:
ad 2007-02-16 13:55:42 +00:00
parent c9962e639e
commit 36bb413e0d
4 changed files with 40 additions and 32 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kd.c,v 1.41 2006/10/01 18:56:22 elad Exp $ */ /* $NetBSD: kd.c,v 1.42 2007/02/16 13:55:42 ad Exp $ */
/*- /*-
* Copyright (c) 1996 The NetBSD Foundation, Inc. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.41 2006/10/01 18:56:22 elad Exp $"); __KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.42 2007/02/16 13:55:42 ad Exp $");
#include "opt_kgdb.h" #include "opt_kgdb.h"
#include "fb.h" #include "fb.h"
@ -342,20 +342,21 @@ static void
kdstart(struct tty *tp) kdstart(struct tty *tp)
{ {
struct clist *cl; struct clist *cl;
int s; int s1, s2;
s = spltty(); s1 = splsoftclock();
s2 = spltty();
if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT)) if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT))
goto out; goto out;
cl = &tp->t_outq; cl = &tp->t_outq;
if (cl->c_cc) { if (cl->c_cc) {
tp->t_state |= TS_BUSY; tp->t_state |= TS_BUSY;
if ((s & PSR_PIL) == 0) { if ((s1 & PSR_PIL) == 0) {
/* called at level zero - update screen now. */ /* called at level zero - update screen now. */
(void) spllowersoftclock(); splx(s2);
kd_putfb(tp); kd_putfb(tp);
(void) spltty(); s2 = spltty();
tp->t_state &= ~TS_BUSY; tp->t_state &= ~TS_BUSY;
} else { } else {
/* called at interrupt level - do it later */ /* called at interrupt level - do it later */
@ -370,7 +371,8 @@ kdstart(struct tty *tp)
selwakeup(&tp->t_wsel); selwakeup(&tp->t_wsel);
} }
out: out:
splx(s); splx(s2);
splx(s1);
} }
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: kd.c,v 1.42 2006/10/15 20:57:13 martin Exp $ */ /* $NetBSD: kd.c,v 1.43 2007/02/16 13:55:42 ad Exp $ */
/*- /*-
* Copyright (c) 1996 The NetBSD Foundation, Inc. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.42 2006/10/15 20:57:13 martin Exp $"); __KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.43 2007/02/16 13:55:42 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/proc.h> #include <sys/proc.h>
@ -315,9 +315,10 @@ static void
kdstart(struct tty *tp) kdstart(struct tty *tp)
{ {
struct clist *cl; struct clist *cl;
register int s; int s1, s2;
s = spltty(); s1 = splsoftclock();
s2 = spltty();
if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT)) if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT))
goto out; goto out;
@ -325,11 +326,11 @@ kdstart(struct tty *tp)
if (cl->c_cc) { if (cl->c_cc) {
if (kd_is_console) { if (kd_is_console) {
tp->t_state |= TS_BUSY; tp->t_state |= TS_BUSY;
if (s == 0) { if (s1 == 0) {
/* called at level zero - update screen now. */ /* called at level zero - update screen now. */
(void) spllowersoftclock(); splx(s2);
kd_putfb(tp); kd_putfb(tp);
(void) spltty(); s2 = spltty();
tp->t_state &= ~TS_BUSY; tp->t_state &= ~TS_BUSY;
} else { } else {
/* called at interrupt level - do it later */ /* called at interrupt level - do it later */
@ -354,7 +355,8 @@ kdstart(struct tty *tp)
selwakeup(&tp->t_wsel); selwakeup(&tp->t_wsel);
} }
out: out:
splx(s); splx(s2);
splx(s1);
} }
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: kd.c,v 1.14 2006/10/01 18:56:22 elad Exp $ */ /* $NetBSD: kd.c,v 1.15 2007/02/16 13:55:42 ad Exp $ */
/*- /*-
* Copyright (c) 1996 The NetBSD Foundation, Inc. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.14 2006/10/01 18:56:22 elad Exp $"); __KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.15 2007/02/16 13:55:42 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/proc.h> #include <sys/proc.h>
@ -359,9 +359,10 @@ static void
kdstart(struct tty *tp) kdstart(struct tty *tp)
{ {
struct clist *cl; struct clist *cl;
int s; int s1, s2;
s = spltty(); s1 = splsoftclock();
s2 = spltty();
if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT)) if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT))
goto out; goto out;
@ -369,11 +370,11 @@ kdstart(struct tty *tp)
if (cl->c_cc) { if (cl->c_cc) {
if (kd_is_console) { if (kd_is_console) {
tp->t_state |= TS_BUSY; tp->t_state |= TS_BUSY;
if (is_spl0(s)) { if (is_spl0(s1)) {
/* called at level zero - update screen now. */ /* called at level zero - update screen now. */
(void) spllowersoftclock(); splx(s2);
kd_putfb(tp); kd_putfb(tp);
(void) spltty(); s2 = spltty();
tp->t_state &= ~TS_BUSY; tp->t_state &= ~TS_BUSY;
} else { } else {
/* called at interrupt level - do it later */ /* called at interrupt level - do it later */
@ -398,7 +399,8 @@ kdstart(struct tty *tp)
selwakeup(&tp->t_wsel); selwakeup(&tp->t_wsel);
} }
out: out:
splx(s); splx(s2);
splx(s1);
} }
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: kd.c,v 1.48 2006/10/05 14:46:11 tsutsui Exp $ */ /* $NetBSD: kd.c,v 1.49 2007/02/16 13:55:42 ad Exp $ */
/*- /*-
* Copyright (c) 1996 The NetBSD Foundation, Inc. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.48 2006/10/05 14:46:11 tsutsui Exp $"); __KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.49 2007/02/16 13:55:42 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/proc.h> #include <sys/proc.h>
@ -286,9 +286,10 @@ static void
kdstart(struct tty *tp) kdstart(struct tty *tp)
{ {
struct clist *cl; struct clist *cl;
int s; int s1, s2;
s = spltty(); s1 = splsoftclock();
s2 = spltty();
if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT)) if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT))
goto out; goto out;
@ -296,11 +297,11 @@ kdstart(struct tty *tp)
if (cl->c_cc) { if (cl->c_cc) {
if (kd_is_console) { if (kd_is_console) {
tp->t_state |= TS_BUSY; tp->t_state |= TS_BUSY;
if ((s & PSL_IPL) == 0) { if ((s1 & PSL_IPL) == 0) {
/* called at level zero - update screen now. */ /* called at level zero - update screen now. */
(void) spllowersoftclock(); splx(s2);
kd_putfb(tp); kd_putfb(tp);
(void) spltty(); s2 = spltty();
tp->t_state &= ~TS_BUSY; tp->t_state &= ~TS_BUSY;
} else { } else {
/* called at interrupt level - do it later */ /* called at interrupt level - do it later */
@ -325,7 +326,8 @@ kdstart(struct tty *tp)
selwakeup(&tp->t_wsel); selwakeup(&tp->t_wsel);
} }
out: out:
splx(s); splx(s2);
splx(s1);
} }
/* /*