From 4bd938a998fdf87b0456e126889ce4c8b048f06c Mon Sep 17 00:00:00 2001 From: matthias Date: Mon, 23 Dec 1996 08:37:41 +0000 Subject: [PATCH] * Remove IPL_NONE. This is no longer used. * Add IPL_HIGH. Alias IPL_HIGH to IPL_RTTY * Define splrtty (used by the scn driver). * Add iv_level and iv_mask to struct iv. These define the IPL at which the handler should run. * intr_establish now takes *two* ipls. One at which the handler should run, and one in which the interrupt should get blocked. --- sys/arch/pc532/include/psl.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/sys/arch/pc532/include/psl.h b/sys/arch/pc532/include/psl.h index 8aa3ae8c431a..c43d9284b932 100644 --- a/sys/arch/pc532/include/psl.h +++ b/sys/arch/pc532/include/psl.h @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.17 1996/11/24 13:34:45 matthias Exp $ */ +/* $NetBSD: psl.h,v 1.18 1996/12/23 08:37:41 matthias Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -69,15 +69,18 @@ /* * Interrupt levels */ -#define IPL_NONE -1 #define IPL_ZERO 0 /* level 0 */ -#define IPL_BIO 1 /* block I/O */ -#define IPL_NET 2 /* network */ -#define IPL_TTY 3 /* terminal */ -#define IPL_CLOCK 4 /* clock */ -#define IPL_IMP 5 /* memory allocation */ -#define NIPL 6 /* number of interrupt priority levels */ -#define IPL_NAMES {"zero", "bio", "net", "tty", "clock", "imp"} +#define IPL_HIGH 1 /* block all interrupts */ +#define IPL_BIO 2 /* block I/O */ +#define IPL_NET 3 /* network */ +#define IPL_TTY 4 /* terminal */ +#define IPL_CLOCK 5 /* clock */ +#define IPL_IMP 6 /* memory allocation */ +#define NIPL 7 /* number of interrupt priority levels */ +#define IPL_NAMES {"zero", "", "bio", "net", "tty", "clock", "imp"} + +/* IPL_RTTY (for the scn driver) is the same as IPL_HIGH. */ +#define IPL_RTTY IPL_HIGH /* * Preassigned software interrupts @@ -96,6 +99,8 @@ struct iv { void (*iv_vec) __P((void *)); void *iv_arg; + int iv_level; + int iv_mask; int iv_cnt; char *iv_use; }; @@ -116,7 +121,8 @@ extern unsigned int imask[], Cur_pl, sirpending, astpending; void intr_init __P((void)); void check_sir __P((void *)); -int intr_establish __P((int, void (*)(void *), void *, char *, int, int)); +int intr_establish __P((int, void (*)(void *), void *, char *, + int, int, int)); PSL_STATIC PSL_INLINE int splraise __P((unsigned int)); PSL_STATIC PSL_INLINE int splx __P((unsigned int)); @@ -175,6 +181,7 @@ splx(ncpl) #define spltty() splraise(imask[IPL_TTY]) #define splclock() splraise(imask[IPL_CLOCK]) #define splimp() splraise(imask[IPL_IMP]) +#define splrtty() splraise(imask[IPL_RTTY]) #define splstatclock() splclock() /*