Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/evbarm/iq80310



chs@ wrote:

> Module Name:  src
> Committed By: chs
> Date:         Tue Aug 14 15:46:21 UTC 2012
> 
> Modified Files:
>       src/sys/arch/evbarm/iq80310: iq80310_intr.c
> 
> Log Message:
> move evcnt_attach_dynamic() calls later to avoid assertions.

--- src/sys/arch/evbarm/iq80310/iq80310_intr.c  2012/08/02 15:56:07     1.30
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c  2012/08/14 15:46:21     1.31
@@ -338,8 +338,6 @@ iq80310_intr_init(void)
                TAILQ_INIT(&iq->iq_list);
 
                sprintf(iq->iq_name, "irq %d", i);
-               evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
-                   NULL, "iq80310", iq->iq_name);
        }
 
        iq80310_intr_calculate_masks();
@@ -379,6 +377,8 @@ iq80310_intr_establish(int irq, int ipl,
        oldirqstate = disable_interrupts(I32_bit);
 
        TAILQ_INSERT_TAIL(&iq->iq_list, ih, ih_list);
+       evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
+           NULL, "iq80310", iq->iq_name);
 
        iq80310_intr_calculate_masks();
---


- what happens if intr_establish function is called more than once
  against the same irq?

- shouldn't disestablish function have evcnt_detach()?

- isn't it better to defer intr_init() calls after evcnt_init(),
  rather than calling evcnt_attach_dynamic() in intr_establish() ?


It looks many other arm intr_init functions
(arm/ep93xx/ep93xx_intr.c, arm/xscale/ixp425_intr.c etc)
have the same problem, though.
(on the other hand marvell variants don't have evcnt at all)

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index