diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2005-01-17 04:27:21 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2005-01-17 04:27:21 +0000 |
commit | c2c8fbbff82de6abf4a9a73c535963a58cd01aff (patch) | |
tree | e06e7484e27bdc3b5fbd3aee560856cb5c60e6c9 /sys/arch/arm/xscale/pxa2x0_intr.c | |
parent | 12cf284ae53a53ee3fd7ca89175078d4cafe3ff0 (diff) |
Interrupts which are handled by the second level interrupt handler gpio
should not have two counters triggered for each interrupt.
add a flag, name == NULL to pxa_intr to indicate that the event counter
should not be register for such interrupts.
In gpio, register its interrupts with this indication, however it
should count the gpio0 and gpio1 interrupts which are registered.
requested deraadt@
Diffstat (limited to 'sys/arch/arm/xscale/pxa2x0_intr.c')
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_intr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c index c9b80f5304f..c6adc81061a 100644 --- a/sys/arch/arm/xscale/pxa2x0_intr.c +++ b/sys/arch/arm/xscale/pxa2x0_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_intr.c,v 1.6 2005/01/13 17:59:32 drahn Exp $ */ +/* $OpenBSD: pxa2x0_intr.c,v 1.7 2005/01/17 04:27:20 drahn Exp $ */ /* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */ /* @@ -452,7 +452,9 @@ pxa2x0_intr_establish(int irqno, int level, ih->ih_irq = irqno; extirq_level[irqno] = level; - evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq, &evcount_intr); + if (name != NULL) + evcount_attach(&ih->ih_count, name, (void *)&ih->ih_irq, + &evcount_intr); pxa2x0_update_intr_masks(irqno, level); @@ -478,7 +480,8 @@ pxa2x0_intr_disestablish(void *cookie) psw = disable_interrupts(I32_bit); ih = &handler[irqno]; - evcount_detach(&ih->ih_count); + if (ih->name != NULL) + evcount_detach(&ih->ih_count); ih->arg = (void *) irqno; ih->func = pxa2x0_stray_interrupt; |