diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2018-01-23 14:47:22 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2018-01-23 14:47:22 +0000 |
commit | b1c72f51a74caff59c8c7bc0a26a6a7e39397d2d (patch) | |
tree | ebde35a4fb33df6e95bfac87d869f18fb0140b13 | |
parent | 2c4e47174515d1e5be801bfac5cdc61df27df9d9 (diff) |
Always lock the kernel lock with non-MP-safe interrupt handlers.
Suggested by kettenis@
-rw-r--r-- | sys/arch/loongson/loongson/loongson3_intr.c | 6 | ||||
-rw-r--r-- | sys/arch/octeon/dev/octcit.c | 4 | ||||
-rw-r--r-- | sys/arch/octeon/dev/octciu.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/loongson/loongson/loongson3_intr.c b/sys/arch/loongson/loongson/loongson3_intr.c index 445c36d4eb0..a94dd425a69 100644 --- a/sys/arch/loongson/loongson/loongson3_intr.c +++ b/sys/arch/loongson/loongson/loongson3_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loongson3_intr.c,v 1.5 2017/02/19 09:53:37 visa Exp $ */ +/* $OpenBSD: loongson3_intr.c,v 1.6 2018/01/23 14:47:21 visa Exp $ */ /* * Copyright (c) 2016 Visa Hankala @@ -416,7 +416,7 @@ loongson3_intr(uint32_t pending, struct trapframe *frame) if (ih->ih_flags & IH_MPSAFE) need_lock = 0; else - need_lock = ih->ih_level < IPL_CLOCK; + need_lock = 1; if (need_lock) __mp_lock(&kernel_lock); #endif @@ -492,7 +492,7 @@ loongson3_ht_intr(uint32_t pending, struct trapframe *frame) if (ih->ih_flags & IH_MPSAFE) need_lock = 0; else - need_lock = ih->ih_level < IPL_CLOCK; + need_lock = 1; if (need_lock) __mp_lock(&kernel_lock); #endif diff --git a/sys/arch/octeon/dev/octcit.c b/sys/arch/octeon/dev/octcit.c index fef4663414e..785cafa4019 100644 --- a/sys/arch/octeon/dev/octcit.c +++ b/sys/arch/octeon/dev/octcit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcit.c,v 1.4 2017/12/27 13:16:53 visa Exp $ */ +/* $OpenBSD: octcit.c,v 1.5 2018/01/23 14:47:21 visa Exp $ */ /* * Copyright (c) 2017 Visa Hankala @@ -431,7 +431,7 @@ octcit_intr(uint32_t hwpend, struct trapframe *frame) if (ISSET(ih->ih_flags, IH_MPSAFE)) need_lock = 0; else - need_lock = ih->ih_level < IPL_CLOCK; + need_lock = 1; if (need_lock) __mp_lock(&kernel_lock); #endif diff --git a/sys/arch/octeon/dev/octciu.c b/sys/arch/octeon/dev/octciu.c index 179e21fb0c5..6014d069cd1 100644 --- a/sys/arch/octeon/dev/octciu.c +++ b/sys/arch/octeon/dev/octciu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octciu.c,v 1.8 2017/11/03 16:19:25 visa Exp $ */ +/* $OpenBSD: octciu.c,v 1.9 2018/01/23 14:47:21 visa Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -480,7 +480,7 @@ octciu_intr_bank(struct octciu_softc *sc, struct intrbank *bank, if (ih->ih_flags & IH_MPSAFE) need_lock = 0; else - need_lock = ih->ih_level < IPL_CLOCK; + need_lock = 1; if (need_lock) __mp_lock(&kernel_lock); #endif |