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



I wrote:

> chs@ wrote:
> 
> > On Mon, Sep 17, 2012 at 03:40:12AM +0900, Izumi Tsutsui wrote:
> > > 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.
> > > 
> > > 
> > > - 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)
>  :
> > are you suggesting to undo my change and instead move the call to
> > iq80310_intr_init() from initarm() to somewhere else?  if so, where?
> > 
> > or are you suggesting to move the calls to evcnt_attach_dynamic()
> > from iq80310_intr_init() to a separate function which could be called
> > later?  if so, where would be a good place to call that other function?
> 
> The former is okay because interrupts won't be enabled before
> at least cpu_configure(9) and I moved such initializations
> into cpu_configure(9) on several mips and m68k ports.
> 
> But on evbarm cpu_configure(9) is shared among all boards
> so we need some hook to handle it? Or call it mainbus_attach()?
> Or just disable intr evcnt(9) for now?

Now I notice that matt@ already fixed some boards using the latter one
(split out evcnt_attach_dynamic() int a separate function and call it
 from board dependent mainbus_attach) so following it would be consistent.

http://mail-index.NetBSD.org/source-changes/2012/02/12/msg031698.html
http://www.nerv.org/~ryo/netbsd/netbsd/?q=id:20120212T163102Z.cef48d9fbe70f5c792f90fc3a83a35e9ec1d6880
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/arch/arm/xscale/i80321_icu.c.diff?r1=1.22&r2=1.23&f=h
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/arch/evbarm/hdl_g/i80321_mainbus.c.diff?r1=1.2&r2=1.3&f=h

---
Izumi Tsutsui 


Home | Main Index | Thread Index | Old Index