All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>,
	Richard Cochran <richardcochran@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Stuck MSI in normal Linux driver
Date: Wed, 02 Mar 2011 19:18:46 +0100	[thread overview]
Message-ID: <4D6E8A06.9060508@domain.hid> (raw)
In-Reply-To: <4D6E61B6.906@domain.hid>

On 2011-03-02 16:26, Gilles Chanteperdrix wrote:
> Richard Cochran wrote:
>> I am running Xenomai 2.5 git master on a P2020 with kernel 2.6.36.
>>
>> We have a custom PCIe card that raise a MSI, with a normal (not rtdm)
>> driver. It appears that the interrupt comes just once and then is
>> stuck. It work under plain Linux, but I cannot rule out a HW timing
>> bug either.
>>
>> The wiki pages 
>>
>>    http://www.xenomai.org/index.php/FAQs
>>    http://www.xenomai.org/index.php/Configuring_x86_kernels
>>
>> say not to enable MSI on x86, with a link to a very old (2008)
>> discussion. I found a newer mail
>>
>>    https://mail.gna.org/public/xenomai-help/2010-01/msg00095.html
>>
>> claiming that MSI is okay.
> 
> No. This is my fault. I simply had forgotten that MSI were not OK on x86.
> 
>>
>> Is there a known problem with MSI and Xenomai?
> 
> There is a known problem with MSI on x86 (explained by the FAQ link).
> 
>>
>> If so, where/how can I start to get working on fixing it?
>>
>> (I don't need the MSI in a rtdm or adeos context.)
> 
> Given that the problem is that the interrupt controller ack/mask
> functions (if I recall correctly) need, on x86, to use some Linux
> primitives which can not be called from Xenomai domain, I am not sure it
> is easy to fix. And the fact that you do not need the MSI in Xenomai
> domain does not change anything, since ack/mask routines are called
> ahead of the pipeline anyway.

The current situation looks like this:
 - MSI[-X] usage for plain Linux drivers is fine, we are using it on
   machines where you can hardly avoid MSI today
 - MSI[-X] usage for RTDM (ie. RT) drivers is basically fine as long as
   you avoid enabling/disabling from RT context (also used for quite
   a while here, no known issues under this restriction)

Fixing that enabling/disabling (i.e. mask/unmask) is indeed tricky for
classic MSI as we can't rely on direct hardware (too slow). It's easier
for MSI-X - as long as the addressed device is not delaying the mask
operation in firmware or wherever (seen only with MSI devices so far,
but might be possible with MSI-X as well).

Note that much of this is arch independent, only the PCI config space
access method required for classic MSI may vary (likely positively).

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


  parent reply	other threads:[~2011-03-02 18:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 15:16 [Xenomai-help] Stuck MSI in normal Linux driver Richard Cochran
2011-03-02 15:26 ` Gilles Chanteperdrix
2011-03-02 15:34   ` Richard Cochran
2011-03-02 15:38     ` Gilles Chanteperdrix
2011-03-02 18:18   ` Jan Kiszka [this message]
2011-03-03  7:21     ` Richard Cochran
2011-03-03  7:32       ` Philippe Gerum
2011-03-03 12:25         ` Wolfgang Grandegger
2011-03-03 12:30           ` Jan Kiszka
2011-03-03 12:54             ` Philippe Gerum
2011-03-03 23:45               ` Jan Kiszka
2011-03-04  7:51                 ` Philippe Gerum
2011-03-04  8:09                   ` Jan Kiszka
2011-03-04  8:30                     ` Richard Cochran
2011-03-04  8:36                       ` Jan Kiszka
2011-03-04  8:11                   ` Richard Cochran
2011-03-04  8:16                     ` Jan Kiszka
2011-03-07  9:26                   ` Richard Cochran
2011-03-07 16:37                     ` Philippe Gerum
2011-03-07 18:33                       ` Richard Cochran
2011-03-08  7:55                         ` Richard Cochran
2011-03-07 18:39                       ` Gilles Chanteperdrix
2011-03-07 21:47                         ` Philippe Gerum

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=4D6E8A06.9060508@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=richardcochran@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.