From ca59b74c8caf478cdaa0aef4a87b5d5a6069fe77 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 13 Jan 2003 20:12:19 +0000 Subject: Clean up ipl handling: be sure to always return valid levels in getipl(), and check input level in setipl() if DIAGNOSTIC. Doing this pointed out an horrible bug where exception frames would refer to the saved ipl at the time the exception was processed, but would not save it before, and the joys of stack values would make it a correct value 90% of the time. Of course, bad things could happen when restoring the ``saved'' ipl... --- sys/arch/mvme88k/include/intr.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'sys/arch/mvme88k/include/intr.h') diff --git a/sys/arch/mvme88k/include/intr.h b/sys/arch/mvme88k/include/intr.h index 19bc04f86d5..8c2754c8b77 100644 --- a/sys/arch/mvme88k/include/intr.h +++ b/sys/arch/mvme88k/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.11 2003/01/04 02:14:45 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.12 2003/01/13 20:12:16 miod Exp $ */ /* * Copyright (C) 2000 Steve Murphree, Jr. * All rights reserved. @@ -83,9 +83,6 @@ extern int intrcnt[M88K_NIRQ]; #ifdef _KERNEL #ifndef _LOCORE unsigned setipl(unsigned level); -#ifdef DDB -unsigned db_setipl(unsigned level); -#endif int spl0(void); /* needs major cleanup - XXX nivas */ @@ -138,10 +135,5 @@ above... #define splx(x) ((x) ? setipl((x)) : spl0()) -#ifdef DDB -#define db_splx(x) db_setipl((x)) -#define db_splhigh() db_setipl(IPL_HIGH) -#endif /* DDB */ - #endif /* _KERNEL */ #endif /* _MVME88K_INTR_H_ */ -- cgit v1.2.3