Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/pic Increment ci->ci_intr_depth for the duratio...
details: https://anonhg.NetBSD.org/src/rev/ca2fc79f66ee
branches: trunk
changeset: 761591:ca2fc79f66ee
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Tue Feb 01 21:44:27 2011 +0000
description:
Increment ci->ci_intr_depth for the duration of pic_do_pending_ints().
Fixes locking catastrophy commonly noticed with mvsata(4) on evbarm.
diffstat:
sys/arch/arm/pic/pic.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 54bd3fc7a84a -r ca2fc79f66ee sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c Tue Feb 01 21:28:43 2011 +0000
+++ b/sys/arch/arm/pic/pic.c Tue Feb 01 21:44:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pic.c,v 1.6 2010/08/31 14:33:41 kiyohara Exp $ */
+/* $NetBSD: pic.c,v 1.7 2011/02/01 21:44:27 jakllsch Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.6 2010/08/31 14:33:41 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.7 2011/02/01 21:44:27 jakllsch Exp $");
#define _INTR_PRIVATE
#include <sys/param.h>
@@ -539,7 +539,9 @@
KASSERT(panicstr || newipl <= ci->ci_cpl);
if (newipl < ci->ci_cpl) {
register_t psw = disable_interrupts(I32_bit);
+ ci->ci_intr_depth++;
pic_do_pending_ints(psw, newipl, NULL);
+ ci->ci_intr_depth--;
restore_interrupts(psw);
}
return oldipl;
@@ -552,7 +554,9 @@
KASSERT(savedipl < NIPL);
if (savedipl < ci->ci_cpl) {
register_t psw = disable_interrupts(I32_bit);
+ ci->ci_intr_depth++;
pic_do_pending_ints(psw, savedipl, NULL);
+ ci->ci_intr_depth--;
restore_interrupts(psw);
}
ci->ci_cpl = savedipl;
Home |
Main Index |
Thread Index |
Old Index