[Xenomai-core] Re: [PATCH] shirq correction

2006-03-11 Thread Philippe Gerum

Dmitry Adamushko wrote:


Hello,

I overlooked that the logic of decrementing the interrupt nesting count 
has been changed recently and
both xnintr_shirq_handler() and xnintr_edge_shirq_handler() behave wrong 
in this respect.


The attached patch fixes this misbehavior.



Applied, thanks.


--
Best regards,
Dmitry Adamushko




--

Philippe.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] [RFC, Experimental Patch] nested irq disable calls

2006-03-11 Thread Dmitry Adamushko


> > I would see the following scenario - an ISR wants to
> > _temporary_ defer an IRQ line enabling
> > until some later stage (e.g. rt_task which is a bottom half).
> > This is the only reason why xnarch_end_irq() or some later step in it
> > (in this case ->end() ) must be aware
> > of IPIPE_DISABLED_FLAG.
> >
> > Why the currently used approach is not that good for it (NOENABLE) ?
> >
> > 1)   it actually defers (for some PICs) not only "enabling" but sending
> > an EOI too;
> > As a consequence :
> >
> 
> This is no more the case for ppc over which Adeos had this bug Anders reported and
> fixed.

I thought that the actual reason of that problem was the use of rthal_enable_irq() in xnintr_irq_handler()
to play the IRQ .ending phase, not taking into account that .ending is not always == .enabling.
As a consequence, it didn't work for some ppc/PICs where the EOI is sent by .end and not .ack and
that's why rthal_end_irq() has been recently introduced.

> For each arch/pic pairs, ->ack() should now send eoi and likely mask the
> outstanding IRQ, whilst ->end() should only unmask it as needed.
> AFAICT after a brief inspection, x86, ppc, ia64, and blackfin ports look ok regarding this. (I
> did not check neither the ARM nor ppc64 ports yet, though). 
> But in any case, this is the way Adeos is expected to behave, and it should be fixed iff it doesn't.

This actually makes the implemention of nested irq disable calls simpler.

But is such a rework of the PIC logic always possible and correct, hw-wise?

let's consider 2 cases :

1)
.ack = NULL (do nothing)
.end = send EOI

2)
.ack = { mask and send EOI }
.end = unmask

I guess, both 1) and 2) keep the line "disabled" until .end takes place.
But 2) requires 2 more opertions (mask and unmask) and, hence, it gives high
overhead, esp. on some sluggish archs with not memory-mapped i/o ports.

Are those variants always safely exchangable?

> 
> To sum up, I agree with you that addressing #2 directly through a disable nesting
> count would solve those issues quite more elegantly.

Good.

> > Actually, why is ipipe_irq_unlock(irq) necessary in
> > __ipipe_override_irq_end()? ipipe_irq_lock() is not
> > called in __ipipe_ack_irq(). Is it locked somewhere else? At least, I
> > haven't found explicit ipipe_irq_lock()
> > or __ipipe_lock_irq() calls anywhere else.
> 
> Basically because as documented in __do_IRQ, the ->end() handler has to deal with
> interrupts which got disabled while the handler was running. If for some reason,
> some IRQ handler decides to disable its own IRQ line, then the lock bit would be
> raised in the pipeline for this IRQ too as a result of calling disable_irq().
> Therefore, ->end() must unlock the IRQ at pipeline level whenever it eventually
> decides to unmask.

So roughly, __ipipe_irq_lock() is coupled with ->disable() while __ipipe_irq_unlock() -
with ->enable().
Actually, I was confused by the fact that .ack normally does the same thing
as ->disable(), i.e. masking, but there is no corresponding __ipipe_irq_lock() call there.
IOW, a number of __ipipe_irq_lock() calls doesn't correlate to a number of __ipipe_irq_unlock()
calls as 1:1.

And actually this saves us from a possible problem, I guess.
.ack and .end may be issued from different domains and that, in turn, leads to calling
__ipipe_irq_lock() and __ipipe_irq_unlock() from different domains too. As a result, a given
IRQ line is enabled (at the hw layer) but remains to be "LOCKED" in the domain where .ack
took place.

The same may happen if a rt ISR calls ->enable() and then asks nucleus to propagate an interrupt
down to the Linux domain where .end takes place.


> --
>
>Philippe.
>

-- Best regards,Dmitry Adamushko


___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] [PATCH] shirq correction

2006-03-11 Thread Dmitry Adamushko

Hello,

I overlooked that the logic of decrementing the interrupt nesting count has been changed recently and
both xnintr_shirq_handler() and xnintr_edge_shirq_handler() behave wrong in this respect.

The attached patch fixes this misbehavior.
-- Best regards,Dmitry Adamushko




intr.c.patch
Description: Binary data


ChangeLog
Description: Binary data
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] Planetplanet on the web site?

2006-03-11 Thread Bruno Rouchouse
On 3/11/06, Romain Lenglet <[EMAIL PROTECTED]> wrote:
> For your information Xenomai website currently uses Joomla CMS framework.> The website is currently hosted by the fsffrance whose sys admin is really> careful about security issues. This means that we are advised to use debian
> stable packages only. I don't know if such a package exists for Planet (I> don't find it via debian search engine.)No there is none yet.To install it on Sarge, you must install packages python-feedparser and
python.Then, download the tarball from planetplanet's website, configure thetemplates, and make the python script run through cron. It generates staticHTML pages, and is not a dynamic script, so there are little security risks,
except that it must download the news feed files from the Internet togenerate the pages.OK thanks for the information and the arguments about security issues. I'm going to take a look at it.
> I need to check first if it is not possible to register news feeds directly
> with Joomla. Maybe it offers this functionality as a module. I'm quite sure> though I am going to stick to joomla because I noticed that some browsers> (Konqueror for example) have problems displaying the website correctly !
I am using Konqueror 3.5.1, and I have no problem?!Thanks for the report ! 
--Romain Lenglet
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core