diff options
-rw-r--r-- | sys/arch/hp300/hp300/intr.c | 23 | ||||
-rw-r--r-- | sys/arch/m68k/m68k/m68k_machdep.c | 23 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/intr.c | 23 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/machdep.c | 23 |
4 files changed, 67 insertions, 25 deletions
diff --git a/sys/arch/hp300/hp300/intr.c b/sys/arch/hp300/hp300/intr.c index 6dbd866ef11..84c560d8677 100644 --- a/sys/arch/hp300/hp300/intr.c +++ b/sys/arch/hp300/hp300/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.17 2007/05/29 18:10:42 miod Exp $ */ +/* $OpenBSD: intr.c,v 1.18 2007/11/09 17:30:53 miod Exp $ */ /* $NetBSD: intr.c,v 1.5 1998/02/16 20:58:30 thorpej Exp $ */ /*- @@ -300,3 +300,24 @@ netintr() #undef DONETISR } } + +#ifdef DIAGNOSTIC +void +splassert_check(int wantipl, const char *func) +{ + int oldipl; + + __asm __volatile ("movew sr,%0" : "=&d" (oldipl)); + + oldipl = PSLTOIPL(oldipl); + + if (oldipl < wantipl) { + splassert_fail(wantipl, oldipl, func); + /* + * If the splassert_ctl is set to not panic, raise the ipl + * in a feeble attempt to reduce damage. + */ + _spl(PSL_S | IPLTOPSL(wantipl)); + } +} +#endif diff --git a/sys/arch/m68k/m68k/m68k_machdep.c b/sys/arch/m68k/m68k/m68k_machdep.c index 5661dc5fcc8..45c89ac54b8 100644 --- a/sys/arch/m68k/m68k/m68k_machdep.c +++ b/sys/arch/m68k/m68k/m68k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m68k_machdep.c,v 1.11 2007/05/15 13:46:22 martin Exp $ */ +/* $OpenBSD: m68k_machdep.c,v 1.12 2007/11/09 17:30:55 miod Exp $ */ /* $NetBSD: m68k_machdep.c,v 1.3 1997/06/12 09:57:04 veego Exp $ */ /*- @@ -114,24 +114,3 @@ child_return(arg) (p->p_flag & P_PPWAIT) ? SYS_vfork : SYS_fork, 0, 0); #endif } - -#ifdef DIAGNOSTIC -void -splassert_check(int wantipl, const char *func) -{ - int oldipl; - - __asm __volatile ("movew sr,%0" : "=&d" (oldipl)); - - oldipl = PSLTOIPL(oldipl); - - if (oldipl < wantipl) { - splassert_fail(wantipl, oldipl, func); - /* - * If the splassert_ctl is set to not panic, raise the ipl - * in a feeble attempt to reduce damage. - */ - _spl(PSL_S | IPLTOPSL(wantipl)); - } -} -#endif diff --git a/sys/arch/mac68k/mac68k/intr.c b/sys/arch/mac68k/mac68k/intr.c index bcc0140cae9..373175e3ae4 100644 --- a/sys/arch/mac68k/mac68k/intr.c +++ b/sys/arch/mac68k/mac68k/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.10 2007/07/29 21:24:05 miod Exp $ */ +/* $OpenBSD: intr.c,v 1.11 2007/11/09 17:30:55 miod Exp $ */ /* $NetBSD: intr.c,v 1.2 1998/08/25 04:03:56 scottr Exp $ */ /*- @@ -232,3 +232,24 @@ netintr() #undef DONETISR } } + +#ifdef DIAGNOSTIC +void +splassert_check(int wantipl, const char *func) +{ + int oldipl; + + __asm __volatile ("movew sr,%0" : "=&d" (oldipl)); + + oldipl = PSLTOIPL(oldipl); + + if (oldipl < wantipl) { + splassert_fail(wantipl, oldipl, func); + /* + * If the splassert_ctl is set to not panic, raise the ipl + * in a feeble attempt to reduce damage. + */ + _spl(PSL_S | IPLTOPSL(wantipl)); + } +} +#endif diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index f4bf15e6421..cffa80442df 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.107 2007/11/02 19:18:54 martin Exp $ */ +/* $OpenBSD: machdep.c,v 1.108 2007/11/09 17:30:55 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -996,3 +996,24 @@ memsize162() } } #endif + +#ifdef DIAGNOSTIC +void +splassert_check(int wantipl, const char *func) +{ + int oldipl; + + __asm __volatile ("movew sr,%0" : "=&d" (oldipl)); + + oldipl = PSLTOIPL(oldipl); + + if (oldipl < wantipl) { + splassert_fail(wantipl, oldipl, func); + /* + * If the splassert_ctl is set to not panic, raise the ipl + * in a feeble attempt to reduce damage. + */ + _spl(PSL_S | IPLTOPSL(wantipl)); + } +} +#endif |