All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Anders Blomdell <anders.blomdell@domain.hid>
Cc: Jan Kiszka <jan.kiszka@domain.hid>, xenomai@xenomai.org
Subject: Re: [Xenomai-core] Re: [PATCH] Shared interrupts (ready to merge)
Date: Mon, 27 Feb 2006 10:20:28 +0100	[thread overview]
Message-ID: <4402C45C.10103@domain.hid> (raw)
In-Reply-To: <4402B4D3.4050606@domain.hid>

Anders Blomdell wrote:
> Jan Kiszka wrote:
> 
>> Philippe Gerum wrote:
>>
>>> Jan Kiszka wrote:
>>>
>>>> Dmitry Adamushko wrote:
>>>>
>>>>
>>>>> ...
>>>>> This said, I'm going to publish the shirq patch (after finalizing ISR
>>>>> return
>>>>> bits,
>>>>> where I still have some doubts) without enable/disable nesting 
>>>>> support.
>>>>> It can be supported at some point of time later, if it's really 
>>>>> needed.
>>>>>
>>>>
>>>>
>>>> Regarding enable/disable nesting and existing driver patterns: I
>>>> currently do the following on devices init via RTDM (and users may have
>>>> copied this):
>>>>
>>>> rtdm_irq_request(...);
>>>> <init_hardware, also clear pending IRQs of the device>
>>>> rtdm_irq_enable(...);
>>>>
>>>> But I do not disable the IRQ before rtdm_irq_free() again. Is this
>>>> unbalanced enabling still needed today? Is it even wrong these days?
>>>
>>>
>>> Looks unsafe, since nothing says that freeing the descriptor associated
>>> with some IRQ should disable this IRQ line at hw level. However, we
>>> would be correct to assume that no IRQ could happen after we have been
>>> asked to free its associated descriptor.
>>>
>>> Is
>>>
>>>> it arch-dependent?
>>>
>>>
>>> Nope. Both APIs are arch-agnostic anyway.
>>>
>>> I think the pattern dates back in RTAI times and was
>>>
>>>> needed for so far unused IRQs. Disabling them on device closure blocked
>>>> the line for later use under Linux.
>>>>
>>>
>>> We never had this problem with Xeno, since we always relied on the
>>> standard IRQ controllers defined by Linux for managing interrupt lines.
>>> IOW, Linux can undo what Xenomai did wrt IRQ line enabling/disabling.
>>>
>>
>>
>> So the enable is definitely needed and a disable on release should not
>> cause harm anymore? If that's the case, we could start re-introducing
>> rtdm_irq_disable before rtdm_irq_free again.
> 
> Except for interrupts shared between RT/non-RT, the don't need enable 
> (since they are enabled by Linux already), and probably doesn't fare 
> well with a final disable.
> 

That's the uncommon case by essence, for which a different set of rules already 
applies anyway.

>>
>>
>>>> I'm asking now in case we have to change the usage: we may better do it
>>>> early (e.g. with the introduction of Xenomai 2.1), so that the 
>>>> number of
>>>> surprises can be kept low when the underlying mechanisms get reworked
>>>> later.
>>>>


-- 

Philippe.


  parent reply	other threads:[~2006-02-27  9:20 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
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 [this message]
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=4402C45C.10103@domain.hid \
    --to=rpm@xenomai.org \
    --cc=anders.blomdell@domain.hid \
    --cc=jan.kiszka@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.