From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [Xenomai-core] Xenomai on PXA From: Philippe Gerum In-Reply-To: <44D2E4DC.63409EBA@vollmann.ch> References: <200607071703.10700.vagninu@domain.hid> <17582.50372.830923.414981@domain.hid> <44B34343.9F56F13@domain.hid> <17595.47131.142881.132531@domain.hid> <1153153788.11603.2.camel@domain.hid> <17595.49478.157044.654500@domain.hid> <1154334859.9569.12.camel@domain.hid> <44CDCB61.2DEDCBFF@vollmann.ch> <1154342029.9569.27.camel@domain.hid> <44CDE4C2.77465253@domain.hid> <17616.42011.663899.554796@domain.hid> <1154525585.9559.22.camel@domain.hid> <17616.59841.283196.201008@domain.hid> <1154596354.9835.28.camel@domain.hid> <17617.63387.138316.343123@domain.hid> <1154617014.5010.29.camel@domain.hid> <17618.12042.631648.702921@domain.hid> <44D2E4DC.63409EBA@vollmann.ch> Content-Type: text/plain Date: Fri, 04 Aug 2006 11:04:01 +0200 Message-Id: <1154682242.4983.5.camel@domain.hid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: rpm@xenomai.org List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Detlef Vollmann Cc: xenomai@xenomai.org On Fri, 2006-08-04 at 08:10 +0200, Detlef Vollmann wrote: > Gilles Chanteperdrix wrote: > > Philippe Gerum wrote: > > > Fixing the I-pipe is the way to go, definitely. If I understand this > > > correctly, the best way to handle the demux case is to implement an > > > I-pipe variant of the demultiplexing code currently available in > > > pxa_gpio_demux_handler(), which would be called from __ipipe_grab_irq() > > > when processing the multiplexed interrupt channel. > > > > > > The I-pipe-specific demux code would then log the decoded IRQ by a call > > > to __ipipe_handle_irq() instead of running the root handler directly > > > (i.e. desc_handle_irq), which would in turn preserve the ability to > > > "wire" GPIO interrupts and also handle IRQ stickiness issues. > This was also my first idea. But after a bit of musing on that > idea, I'm not really sure that this is the best way to go. > We're talking here about more than 100 bits that have to be tested > one after the other (on PXA270, it's 116, though the actual code > checks 126 bits), and even on a fast CPU this takes some time. > > So I've thought about a way to register a GPIO-IRQ into I-pipe > that gets checked directly under I-pipe, while all other GPIOs > are only checked and handled in the domain that handles the > original multiplexing IRQ. > But I have to admit that I have no idea how to implement that... > Provided that every IRQ notification goes through __ipipe_grab_irq, including the GPIO_2_x one, then you just need to check for irq == GPIO_2_x in the latter routine and proceed to the demultiplexing only in this case. No? > [snip] > > +++ linux-2.6.16.5-tcl1-ipipe/arch/arm/mach-pxa/irq.c 2006-08-03 19:04:52.000000000 +0200 > > > +#ifdef CONFIG_IPIPE > > +void __ipipe_mach_demux_irq(unsigned irq, struct pt_regs *regs) > > > + __ipipe_handle_irq(irq, regs); > Just to check: this only marks the interrupt, but not actually > handles it, doesn't it? > > Detlef > -- Philippe.