diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-25 22:18:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-25 22:18:01 +0000 |
commit | af0f403f7f01adb984acc869f39d2ae091ab8f91 (patch) | |
tree | d4fe8b7f3e5bd638bab42a3aefca296425ca4ef6 /sys/arch/i386/isa/pcvt | |
parent | 54ee5abeea5658b4724f32bd792b862a2bbd0820 (diff) |
sync
Diffstat (limited to 'sys/arch/i386/isa/pcvt')
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_conf.h | 9 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_drv.c | 20 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_hdr.h | 16 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_ioctl.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.c | 12 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_sup.c | 5 |
6 files changed, 18 insertions, 47 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_conf.h b/sys/arch/i386/isa/pcvt/pcvt_conf.h index 54500d8155b..661783d2007 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_conf.h +++ b/sys/arch/i386/isa/pcvt/pcvt_conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_conf.h,v 1.3 1996/04/18 17:48:27 niklas Exp $ */ +/* $OpenBSD: pcvt_conf.h,v 1.4 1996/05/25 22:17:53 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -435,13 +435,6 @@ # define PCVT_MDAFASTSCROLL 1 /* MDA/Hercules which do support more */ #endif /* than one page of video memory. */ -#if !defined PCVT_SLOW_INTERRUPT/* ---------- DEFAULT: OFF ------------ */ -# define PCVT_SLOW_INTERRUPT 0 /* If off, protecting critical regions */ -#elif PCVT_SLOW_INTERRUPT != 0 /* in the keyboard fifo code is done by */ -# undef PCVT_SLOW_INTERRUPT /* disabling the processor irq's, if on */ -# define PCVT_SLOW_INTERRUPT 1 /* this is done by spl()/splx() calls. */ -#endif - /*---------------------------------------------------------------------------* * Kernel messages attribute definitions * These define the foreground and background attributes used to diff --git a/sys/arch/i386/isa/pcvt/pcvt_drv.c b/sys/arch/i386/isa/pcvt/pcvt_drv.c index 52dbd89b9c9..110c112ae21 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_drv.c +++ b/sys/arch/i386/isa/pcvt/pcvt_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_drv.c,v 1.12 1996/05/07 07:22:26 deraadt Exp $ */ +/* $OpenBSD: pcvt_drv.c,v 1.13 1996/05/25 22:17:55 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -814,10 +814,7 @@ static u_char pcvt_timeout_scheduled = 0; static void pcvt_timeout (void *arg) { u_char *cp; - -#if PCVT_SLOW_INTERRUPT int s; -#endif pcvt_timeout_scheduled = 0; @@ -844,12 +841,12 @@ static void pcvt_timeout (void *arg) (*linesw[pcconsp->t_line].l_rint)(*cp++ & 0xff, pcconsp); } - PCVT_DISABLE_INTR (); + s = spltty(); if (!pcvt_kbd_count) pcvt_timeout_scheduled = 0; - PCVT_ENABLE_INTR (); + splx(s); } return; @@ -868,10 +865,7 @@ pcrint(void) #if PCVT_KBD_FIFO u_char dt; u_char ret = -1; - -# if PCVT_SLOW_INTERRUPT int s; -# endif #else /* !PCVT_KBD_FIFO */ u_char *cp; @@ -906,9 +900,9 @@ pcrint(void) { pcvt_kbd_fifo[pcvt_kbd_wptr++] = dt; /* data -> fifo */ - PCVT_DISABLE_INTR (); /* XXX necessary ? */ + s = spltty(); /* XXX necessary ? */ pcvt_kbd_count++; /* update fifo count */ - PCVT_ENABLE_INTR (); + splx(s); if (pcvt_kbd_wptr >= PCVT_KBD_FIFO_SZ) pcvt_kbd_wptr = 0; /* wraparound pointer */ @@ -919,10 +913,10 @@ pcrint(void) { if (!pcvt_timeout_scheduled) /* if not already active .. */ { - PCVT_DISABLE_INTR (); + s = spltty(); pcvt_timeout_scheduled = 1; /* flag active */ timeout((TIMEOUT_FUNC_T)pcvt_timeout, (caddr_t) 0, 1); /* fire off */ - PCVT_ENABLE_INTR (); + splx(s); } } return (ret); diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h index 43a69e160f0..79b5b78b091 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h +++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_hdr.h,v 1.10 1996/05/10 12:46:24 deraadt Exp $ */ +/* $OpenBSD: pcvt_hdr.h,v 1.11 1996/05/25 22:17:55 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -102,6 +102,7 @@ #include <i386/isa/isavar.h> #endif #include <machine/cpufunc.h> +#include <machine/intr.h> #else #include <i386/isa/isa_device.h> #endif @@ -152,19 +153,6 @@ #include <sys/devconf.h> #endif -/* setup irq disable function to use */ - -#if !(PCVT_SLOW_INTERRUPT) && (PCVT_NETBSD > 9) -# define PCVT_DISABLE_INTR() disable_intr() -# define PCVT_ENABLE_INTR() enable_intr() -# undef PCVT_SLOW_INTERRUPT -#else -# define PCVT_DISABLE_INTR() s = spltty() -# define PCVT_ENABLE_INTR() splx(s) -# undef PCVT_SLOW_INTERRUPT -# define PCVT_SLOW_INTERRUPT 1 -#endif - /* perform option consistency checks */ #if defined PCVT_FREEBSD && PCVT_FREEBSD == 1 diff --git a/sys/arch/i386/isa/pcvt/pcvt_ioctl.h b/sys/arch/i386/isa/pcvt/pcvt_ioctl.h index 932c1f908c2..56a47582ee6 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_ioctl.h +++ b/sys/arch/i386/isa/pcvt/pcvt_ioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_ioctl.h,v 1.3 1996/04/18 17:48:32 niklas Exp $ */ +/* $OpenBSD: pcvt_ioctl.h,v 1.4 1996/05/25 22:17:57 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -461,7 +461,6 @@ struct pcvtinfo { /* compile time option values */ #define CONF_INHIBIT_NUMLOCK 0x00200000 #define CONF_META_ESC 0x00400000 #define CONF_NOFASTSCROLL 0x00800000 -#define CONF_SLOW_INTERRUPT 0x01000000 #define CONF_KBD_FIFO 0x02000000 #define CONF_NO_LED_UPDATE 0x04000000 }; diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c index e307429fcf1..1822a2f4af5 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.c,v 1.5 1996/05/07 07:22:30 deraadt Exp $ */ +/* $OpenBSD: pcvt_kbd.c,v 1.6 1996/05/25 22:17:58 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -963,7 +963,7 @@ sgetc(int noblock) u_char key; u_short type; -#if PCVT_KBD_FIFO && PCVT_SLOW_INTERRUPT +#if PCVT_KBD_FIFO int s; #endif @@ -1003,9 +1003,9 @@ loop: else /* source = keyboard fifo */ { dt = pcvt_kbd_fifo[pcvt_kbd_rptr++]; - PCVT_DISABLE_INTR(); + s = spltty(); pcvt_kbd_count--; - PCVT_ENABLE_INTR(); + splx(s); if (pcvt_kbd_rptr >= PCVT_KBD_FIFO_SZ) pcvt_kbd_rptr = 0; } @@ -1289,9 +1289,9 @@ no_mouse_event: else /* source = keyboard fifo */ { dt = pcvt_kbd_fifo[pcvt_kbd_rptr++]; /* yes, get it ! */ - PCVT_DISABLE_INTR(); + s = spltty(); pcvt_kbd_count--; - PCVT_ENABLE_INTR(); + splx(s); if (pcvt_kbd_rptr >= PCVT_KBD_FIFO_SZ) pcvt_kbd_rptr = 0; } diff --git a/sys/arch/i386/isa/pcvt/pcvt_sup.c b/sys/arch/i386/isa/pcvt/pcvt_sup.c index c2aaf76ea1a..cf7ad8f0f24 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_sup.c +++ b/sys/arch/i386/isa/pcvt/pcvt_sup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_sup.c,v 1.4 1996/05/07 13:07:04 mickey Exp $ */ +/* $OpenBSD: pcvt_sup.c,v 1.5 1996/05/25 22:18:00 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -355,9 +355,6 @@ vgapcvtinfo(struct pcvtinfo *data) #if PCVT_MDAFASTSCROLL | CONF_MDAFASTSCROLL #endif -#if PCVT_SLOW_INTERRUPT - | CONF_SLOW_INTERRUPT -#endif #if PCVT_NO_LED_UPDATE | CONF_NO_LED_UPDATE #endif |