From: Anders Blomdell <anders.blomdell@domain.hid>
To: Dmitry Adamushko <dmitry.adamushko@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Re: [PATCH] Shared interrupts (ready to merge)
Date: Tue, 21 Feb 2006 18:04:14 +0100 [thread overview]
Message-ID: <43FB480E.9020808@domain.hid> (raw)
In-Reply-To: <b647ffbd0602210848g321ffedei@domain.hid>
Dmitry Adamushko wrote:
>
> > Good point, leaves us with 2 possible return values for shared handlers:
> >
> > HANDLED
> > NOT_HANDLED
> >
> > i.e. shared handlers should never defer the end'ing of the interrupt
> (which
> > makes sense, since this would affect the other [shared] handlers).
>
> HANDLED_NOEBNABLE could be supported too.
Yes, but it breaks decoupling between shared handlers; interrupts will be
deferred for all [shared] handlers until it is properly ended.
> There would be no need in
> reenventing
> a wheel, just do it the way Linux does it.
> But it's about some additional re-designing of the current codebase
> (e.g. nested calling for irq_enable/disable())
> I'm not sure we do need it for something else rather than irq sharing
> code but it affects the rest of the code.
>
> And we have a kind of wrong concept :
>
> XN_ISR_ENABLE (or NOENABLE) corresponds to xnarch_end_irq().
Agree
>
> But the later one is not only about enabling the line, but
> on some archs - about .end-ing it too (sending EOI).
>
> And to support HANDLED_NOENABLE properly, those 2 have to be decoupled, i.e.
> EOI should always be sent from xnintr_shirq_handler().
But the one returning HANDLED_NOENABLE is likely to leave the interrupt
asserted, hence we can't EOI at this point (unless NO_ENABLE means DISABLE).
>
> > Yes, "should". And this "should" is best be handled by
> >
> > a) Documenting the potential conflict in the same place when describing
> > the return values
> >
> > b) Placing some debug warning in the nucleus' IRQ trampoline function to
> > bail out (once per line) when running into such situation
> >
> > But I'm against any further runtime restrictions, especially as most
> > drivers will never return anything else than NOT_HANDLED or HANDLED.
> > Actually, this was the reason why I tried to separate the NO_ENABLE and
> > PROPAGATE features as *additional* bits from HANDLED and
> > NOT_HANDLED/UNHANDLED/NOINT. But I acknowledge that having all valid bit
> > combination present as constants can be more helpful for the user. We
> > just have to draw some line between the standard values and the
> > additional gurus return codes
> >
> (documentation: "don't use NO_ENABLE or
> > PROPAGATE unless you understand their side-effects and pitfalls
> precisely").
>
> I agree with you on PROPAGATE case, but NO_ENABLE that, as pointed out
> above,
> should (IMHO and at least, in theory) only mean "keep the IRQ line disabled"
> (and have nothing to do with .end-ing the IRQ line) would be better
> supported.
> But this is, again as was pointed out above, about some redesigning of the
> current code => some overhead that likely affects non-shared aware code too.
>
>
> So on one hand,
>
> I'm ready to re-work code with :
>
> HANDLED and UNHANDLED (or NOINT)
>
> + 2 additional bits : NOENABLE and PROPAGATE.
>
> and document it like you suggested "don't use NO_ENABLE or
> PROPAGATE with shared interrupts
> unless you understand their side-effects and pitfalls precisely";
>
> on the other hand,
>
> I'd say that I'm almost ready to vote against merging the irq sharing
> code at all as it looks to be a rather partial solution.
I vote for (even though I'm the one who complains the most), BUT I think it is
important to keep the rules for using it simple (that's why I worry about the
plethora of return-flags).
--
Regards
Anders
next prev parent reply other threads:[~2006-02-21 17:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-15 17:39 [Xenomai-core] [PATCH] Shared interrupts (ready to merge) Dmitry Adamushko
2006-02-16 0:18 ` [Xenomai-core] " Jan Kiszka
2006-02-16 10:20 ` Dmitry Adamushko
2006-02-16 12:58 ` Jan Kiszka
2006-02-16 13:58 ` Dmitry Adamushko
2006-02-16 14:12 ` Jan Kiszka
2006-02-16 19:28 ` Dmitry Adamushko
2006-02-16 20:38 ` Jan Kiszka
2006-02-18 20:04 ` Dmitry Adamushko
2006-02-18 21:37 ` Jan Kiszka
2006-02-20 13:53 ` Anders Blomdell
2006-02-20 16:40 ` Dmitry Adamushko
2006-02-21 8:42 ` Jan Kiszka
2006-02-21 10:45 ` Dmitry Adamushko
[not found] ` <43FAD322.4060001@domain.hid>
2006-02-21 10:54 ` Dmitry Adamushko
2006-02-21 11:28 ` Anders Blomdell
2006-02-21 11:49 ` Jan Kiszka
2006-02-21 16:48 ` Dmitry Adamushko
2006-02-21 17:04 ` Anders Blomdell [this message]
2006-02-21 17:49 ` Jan Kiszka
2006-02-21 18:50 ` Anders Blomdell
2006-02-22 12:45 ` Dmitry Adamushko
2006-02-22 13:15 ` Anders Blomdell
2006-02-22 21:59 ` Jan Kiszka
2006-02-23 12:21 ` Philippe Gerum
2006-02-25 20:14 ` Dmitry Adamushko
2006-02-26 18:51 ` Jan Kiszka
2006-02-26 19:15 ` Philippe Gerum
2006-02-26 19:21 ` Jan Kiszka
2006-02-26 20:37 ` Philippe Gerum
2006-02-27 8:14 ` Anders Blomdell
2006-02-27 8:23 ` Jan Kiszka
2006-02-27 9:20 ` Philippe Gerum
2006-02-21 11:39 ` Anders Blomdell
2006-02-21 8:39 ` Jan Kiszka
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=43FB480E.9020808@domain.hid \
--to=anders.blomdell@domain.hid \
--cc=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.