diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-09-10 12:36:58 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-09-10 12:36:58 +0000 |
commit | 564170b0c493795efbdb567cde3f80935d752594 (patch) | |
tree | 725089b4527be699e61b4e2e9be46fb4a991efc6 /sys/arch | |
parent | d4bf2be00cf5b4abbf51ab6e38ac1ef903d706e1 (diff) |
Make splassert for IPL_NONE fail, if we're in interrupt context.
ok rapha@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/armv7/armv7/intr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/armv7/armv7/intr.c b/sys/arch/armv7/armv7/intr.c index cdd74cb11e5..62938a9d33a 100644 --- a/sys/arch/armv7/armv7/intr.c +++ b/sys/arch/armv7/armv7/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.1 2013/09/04 14:38:25 patrick Exp $ */ +/* $OpenBSD: intr.c,v 1.2 2013/09/10 12:36:57 patrick Exp $ */ /* * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> * @@ -275,8 +275,7 @@ splx(int ipl) void arm_splassert_check(int wantipl, const char *func) { - struct cpu_info *ci = curcpu(); - int oldipl = ci->ci_cpl; + int oldipl = curcpu()->ci_cpl; if (oldipl < wantipl) { splassert_fail(wantipl, oldipl, func); @@ -286,6 +285,10 @@ arm_splassert_check(int wantipl, const char *func) */ arm_intr_func.setipl(wantipl); } + + if (wantipl == IPL_NONE && curcpu()->ci_idepth != 0) { + splassert_fail(-1, curcpu()->ci_idepth, func); + } } #endif |