diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2006-06-17 20:48:19 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2006-06-17 20:48:19 +0000 |
commit | 391666dfb719582ab5ba9a9cf078ae610ad32129 (patch) | |
tree | 628dc8f10e34766cf7736411e20a416c89d8239e | |
parent | b6ca32f891653d7d31103b8bd8b35b4484b4bb6d (diff) |
Fix error where soft irq mask was not initialized for IPL_HIGH, and cleanup.
-rw-r--r-- | sys/arch/arm/xscale/i80321_intr.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/arm/xscale/i80321_intr.c b/sys/arch/arm/xscale/i80321_intr.c index 77a84ddb2b5..ee4fbf7643b 100644 --- a/sys/arch/arm/xscale/i80321_intr.c +++ b/sys/arch/arm/xscale/i80321_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i80321_intr.c,v 1.5 2006/06/15 21:35:30 drahn Exp $ */ +/* $OpenBSD: i80321_intr.c,v 1.6 2006/06/17 20:48:18 drahn Exp $ */ /* * Copyright (c) 2006 Dale Rahn <drahn@openbsd.org> @@ -107,6 +107,10 @@ i80321intc_setipl(int new) struct intrq i80321_handler[NIRQ]; +/* + * Recompute the irq mask bits. + * Must be called with interrupts disabled. + */ void i80321intc_calc_mask(void) { @@ -129,7 +133,7 @@ i80321intc_calc_mask(void) i80321_handler[irq].iq_irq = max; if (max == IPL_NONE) - min = IPL_NONE; + min = IPL_NONE; /* interrupt not enabled */ #if 0 printf("irq %d: min %x max %x\n", irq, min, max); #endif @@ -142,7 +146,7 @@ i80321intc_calc_mask(void) i80321intc_imask[i] &= ~(1 << irq); } /* initialize soft interrupt mask */ - for (i = IPL_NONE; i < IPL_HIGH; i++) { + for (i = IPL_NONE; i <= IPL_HIGH; i++) { i80321intc_smask[i] = 0; if (i < IPL_SOFT) i80321intc_smask[i] |= SI_TO_IRQBIT(SI_SOFT); |