summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/dev/pcons.c22
-rw-r--r--sys/arch/sparc64/include/cpu.h16
-rw-r--r--sys/arch/sparc64/sparc64/clock.c6
-rw-r--r--sys/arch/sparc64/sparc64/intr.c21
4 files changed, 12 insertions, 53 deletions
diff --git a/sys/arch/sparc64/dev/pcons.c b/sys/arch/sparc64/dev/pcons.c
index b728e65d541..7029724e3b2 100644
--- a/sys/arch/sparc64/dev/pcons.c
+++ b/sys/arch/sparc64/dev/pcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcons.c,v 1.8 2004/09/13 20:31:25 deraadt Exp $ */
+/* $OpenBSD: pcons.c,v 1.9 2005/04/26 18:54:36 miod Exp $ */
/* $NetBSD: pcons.c,v 1.7 2001/05/02 10:32:20 scw Exp $ */
/*-
@@ -130,11 +130,11 @@ pconsmatch(parent, match, aux)
void *aux;
{
struct mainbus_attach_args *ma = aux;
- extern int prom_cngetc(dev_t);
+ extern int prom_cngetc(dev_t);
/* Only attach if no other console has attached. */
- return ((strcmp("pcons", ma->ma_name) == 0) &&
- (cn_tab->cn_getc == prom_cngetc));
+ return (strcmp("pcons", ma->ma_name) == 0 &&
+ cn_tab->cn_getc == prom_cngetc);
}
@@ -190,7 +190,7 @@ pconsopen(dev, flag, mode, p)
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
pconsparam(tp, &tp->t_termios);
ttsetwater(tp);
- } else if ((tp->t_state&TS_XCLUDE) && suser(p, 0))
+ } else if ((tp->t_state & TS_XCLUDE) && suser(p, 0))
return EBUSY;
tp->t_state |= TS_CARR_ON;
@@ -361,26 +361,22 @@ pcons_cnpollc(dev, on)
if (pcons_cd.cd_devs)
sc = pcons_cd.cd_devs[minor(dev)];
+ if (sc == NULL)
+ return;
+
if (on) {
- if (!sc) return;
if (sc->of_flags & OFPOLL)
timeout_del(&sc->sc_poll_to);
sc->of_flags &= ~OFPOLL;
} else {
/* Resuming kernel. */
- if (sc && !(sc->of_flags & OFPOLL)) {
+ if (!(sc->of_flags & OFPOLL)) {
sc->of_flags |= OFPOLL;
timeout_add(&sc->sc_poll_to, 1);
}
}
}
-void pcons_dopoll(void);
-void
-pcons_dopoll() {
- pcons_poll((void *)pcons_cd.cd_devs[0]);
-}
-
/* XXXXXXXX --- more cnmagic stuff. */
#define ENCODE_STATE(c, n) (short)(((c)&0x1ff)|(((n)&0x7f)<<9))
diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h
index 29fc31eebad..30f2b40dec4 100644
--- a/sys/arch/sparc64/include/cpu.h
+++ b/sys/arch/sparc64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.30 2004/10/01 18:18:49 jason Exp $ */
+/* $OpenBSD: cpu.h,v 1.31 2005/04/26 18:54:38 miod Exp $ */
/* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */
/*
@@ -154,20 +154,6 @@ struct clockframe {
(((framep)->t.tf_kstack < (vaddr_t)EINTSTACK)&&\
((framep)->t.tf_kstack > (vaddr_t)INTSTACK)))
-/*
- * Software interrupt request `register'.
- */
-#ifdef DEPRECATED
-union sir {
- int sir_any;
- char sir_which[4];
-} sir;
-
-#define SIR_NET 0
-#define SIR_CLOCK 1
-#endif
-
-void setsoftint(void);
void setsoftnet(void);
extern int want_ast;
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c
index 8785f7c8997..cba652afe00 100644
--- a/sys/arch/sparc64/sparc64/clock.c
+++ b/sys/arch/sparc64/sparc64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.22 2004/09/28 19:21:58 jason Exp $ */
+/* $OpenBSD: clock.c,v 1.23 2005/04/26 18:54:39 miod Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
@@ -849,8 +849,6 @@ clockintr(cap)
return (1);
}
-int poll_console = 0;
-
/*
* Level 10 (clock) interrupts. If we are using the FORTH PROM for
* console input, we need to check for that here as well, and generate
@@ -866,8 +864,6 @@ tickintr(cap)
int s;
hardclock((struct clockframe *)cap);
- if (poll_console)
- setsoftint();
s = splhigh();
__asm __volatile("rd %%tick, %0" : "=r" (lasttick) :);
diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c
index 7d5c812bfdb..d4121d0cca1 100644
--- a/sys/arch/sparc64/sparc64/intr.c
+++ b/sys/arch/sparc64/sparc64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.22 2004/06/28 01:47:41 aaron Exp $ */
+/* $OpenBSD: intr.c,v 1.23 2005/04/26 18:54:39 miod Exp $ */
/* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */
/*
@@ -41,8 +41,6 @@
* @(#)intr.c 8.3 (Berkeley) 11/11/93
*/
-#include "pcons.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -126,17 +124,6 @@ strayintr(fp, vectored)
* Network software interrupt
* Soft clock interrupt
*/
-int
-softintr(fp)
- void *fp;
-{
-#if NPCONS >0
- extern void pcons_dopoll(void);
-
- pcons_dopoll();
-#endif
- return (1);
-}
int netisr;
@@ -160,15 +147,9 @@ softnet(fp)
return (1);
}
-struct intrhand soft01intr = { softintr, NULL, 1 };
struct intrhand soft01net = { softnet, NULL, 1 };
void
-setsoftint() {
- send_softint(-1, IPL_SOFTINT, &soft01intr);
-}
-
-void
setsoftnet() {
send_softint(-1, IPL_SOFTNET, &soft01net);
}