From b8dad8ab1fd6570a99dbbe153ab33c7fbeaafedd Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 25 May 1998 10:42:21 +0000 Subject: [PATCH] Fix some severe bogons in the pci and isa interrupt system. --- sys/arch/atari/include/intr.h | 14 +++++++------- sys/arch/atari/isa/isa_machdep.c | 4 ++-- sys/arch/atari/pci/pci_machdep.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/arch/atari/include/intr.h b/sys/arch/atari/include/intr.h index daddb2f6018d..21afcd040dd5 100644 --- a/sys/arch/atari/include/intr.h +++ b/sys/arch/atari/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.5 1997/10/09 07:39:10 jtc Exp $ */ +/* $NetBSD: intr.h,v 1.6 1998/05/25 10:42:21 leo Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -36,12 +36,12 @@ #ifndef _ATARI_INTR_H_ #define _ATARI_INTR_H_ -#define IPL_NONE 0 /* disable no interrupts */ -#define IPL_BIO 3 /* disable block I/O interrupts */ -#define IPL_NET 3 /* disable network interrupts */ -#define IPL_TTY 4 /* disable terminal interrupts */ -#define IPL_CLOCK 6 /* disable clock interrupts */ -#define IPL_HIGH 7 /* disable all interrupts */ +#define IPL_NONE 0 /* disable no interrupts */ +#define IPL_BIO (PSL_S|PSL_IPL3) /* disable block I/O interrupts */ +#define IPL_NET (PSL_S|PSL_IPL3) /* disable network interrupts */ +#define IPL_TTY (PSL_S|PSL_IPL4) /* disable terminal interrupts */ +#define IPL_CLOCK (PSL_S|PSL_IPL6) /* disable clock interrupts */ +#define IPL_HIGH (PSL_S|PSL_IPL7) /* disable all interrupts */ #define IST_UNUSABLE -1 /* interrupt cannot be used */ #define IST_NONE 0 /* none (dummy) */ diff --git a/sys/arch/atari/isa/isa_machdep.c b/sys/arch/atari/isa/isa_machdep.c index 491dd1374aa4..7636cfc1afbc 100644 --- a/sys/arch/atari/isa/isa_machdep.c +++ b/sys/arch/atari/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.6 1998/04/22 07:53:22 leo Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.7 1998/05/25 10:43:04 leo Exp $ */ /* * Copyright (c) 1997 Leo Weppelman. All rights reserved. @@ -142,7 +142,7 @@ int sr; MFP->mf_imrb &= ~(IB_ISA1); else MFP->mf_imra &= ~(IA_ISA2); - if ((sr & PSL_IPL) >= iinfo_p->ipl) { + if ((sr & PSL_IPL) >= (iinfo_p->ipl & PSL_IPL)) { /* * We're running at a too high priority now. */ diff --git a/sys/arch/atari/pci/pci_machdep.c b/sys/arch/atari/pci/pci_machdep.c index 1e0f6747e788..41f5ebce5516 100644 --- a/sys/arch/atari/pci/pci_machdep.c +++ b/sys/arch/atari/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.11 1998/04/10 08:20:05 leo Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.12 1998/05/25 10:43:05 leo Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -360,7 +360,7 @@ int sr; */ MFP2->mf_imrb &= ~iinfo_p->imask; - if ((sr & PSL_IPL) >= iinfo_p->ipl) { + if ((sr & PSL_IPL) >= (iinfo_p->ipl & PSL_IPL)) { /* * We're running at a too high priority now. */