From: Dmitry Adamushko <dmitry.adamushko@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] Re: [PATCH, RFC] nucleus:shared irq and possible ipipe problem
Date: Mon, 2 Jan 2006 20:43:05 +0200 [thread overview]
Message-ID: <b647ffbd0601021043n1e8704aco@domain.hid> (raw)
In-Reply-To: <b647ffbd0601021042h140c0f7dk@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]
>
> Nope, good spot, that could indeed happen in SMP configs. The code is
> expected to shut the given interrupt source _before_ calling
> rthal_irq_release(). But, the root of the problem is that
> rthal_irq_release() doesn't make sure that all _pending_ IRQs from the
> given kind are synchronized before processing. We need the equivalent of
> Linux's synchronize_irq() here, and I would tend to implement this in
> the Adeos layer directly, in ipipe_virtualize_irq() for the NULL handler
> case, since it's a matter of general consistency.
Yep, I thought about the analogue of Linux's synchronize_irq() too.
I guess, what we need to provide is the guarantee that the "cookie" argument
(as well as a "handler") remains valid as long as there is a given irq
handler in execution.
i.e.
o ipipe_virtualize_irq(THIS_IRQ, handler=NULL, cookie=NULL) call _removes_
the IPIPE_HANDLE_FLAG so that new occurences of the THIS_IRQ is no more
accepted for the given domain;
o then ipipe_virtualize_irq is buzy waiting (ipipe_synchronize_irq() or
smth like this) until the active ipd->irqs[THIS_IRQ].handler() is completed.
If there is not currently active handler we may drop all
cpudata->irq_pending_hits for THIS_IRQ to zero. But ipipe_sync_stage()
should check for IPIPE_HANDLE_FLAG then since this is a sign that a given
irq is no more handled (even if there are some pending ones).
o as a final step, ipd->irqs[THIS_IRQ].handler/cookie are set to zero.
Ok, repeating myself, the main idea is to keep the "cookie" unchanged as
long as the corresponding handler is active. This would partialy resolve the
sync. problem I have got on the nucleus layer.
err... I have to orginize some issues next few days so I'll be out of my
notebook. Then I'll finilize the ipipe-irq-related patch so to be ready for
the .01 version.
--
Best regards,
Dmitry Adamushko
[-- Attachment #2: Type: text/html, Size: 2309 bytes --]
next prev parent reply other threads:[~2006-01-02 18:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-31 12:37 [Xenomai-core] [PATCH, RFC] nucleus:shared irq and possible ipipe problem Dmitry Adamushko
2005-12-31 14:59 ` [Xenomai-core] " Philippe Gerum
[not found] ` <b647ffbd0601021042h140c0f7dk@domain.hid>
2006-01-02 18:43 ` Dmitry Adamushko [this message]
2006-01-05 19:00 ` Philippe Gerum
[not found] ` <b647ffbd0601061202g4414bb86k@domain.hid>
2006-01-06 20:06 ` Dmitry Adamushko
2006-01-07 19:05 ` Dmitry Adamushko
2006-01-08 11:29 ` Philippe Gerum
2006-01-09 20:14 ` Dmitry Adamushko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b647ffbd0601021043n1e8704aco@domain.hid \
--to=dmitry.adamushko@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.