All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: krishna m <krishnamurthyjs@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] MSI support in Xenomai
Date: Tue, 22 Mar 2011 17:51:41 +0100	[thread overview]
Message-ID: <4D88D39D.907@domain.hid> (raw)
In-Reply-To: <COL122-W1673FD60DDA60D713554EBDB40@domain.hid>

On 2011-03-22 16:55, krishna m wrote:
>  > Date: Tue, 22 Mar 2011 13:13:16 +0100
>  > From: jan.kiszka@domain.hid
>  > To: krishnamurthyjs@domain.hid
>  > CC: gilles.chanteperdrix@xenomai.org; xenomai@xenomai.org
>  > Subject: Re: MSI support in Xenomai
>  >
>  > On 2011-03-21 13:48, krishna m wrote:
>  > > > Date: Thu, 17 Mar 2011 09:30:37 +0100
>  > > > From: jan.kiszka@domain.hid
>  > > > To: gilles.chanteperdrix@xenomai.org; krishnamurthyjs@domain.hid
>  > > > CC: xenomai@xenomai.org
>  > > > Subject: Re: MSI support in Xenomai
>  > > >
>  > > > On 2011-03-16 14:26, Gilles Chanteperdrix wrote:
>  > > > > krishna m wrote:
>  > > > >> Hi All, I wanted to know if the latest Xenomai [Version
>  > > > >> xenomai-2.5.6] supports MSI interrupts. I am using the adeos Patch
>  > > > >> [version adeos-ipipe-2.6.37-x86-2.9-00] and corresponding Linux
>  > > > >> kernel [version: linux-2.6.37]. I have read in the Xenomai FAQ that
>  > > > >> MSI is not supported by the ipipe patch just wanted to know if the
>  > > > >> latest Xenomai and Ipipe supports MSI.
>  > > > >
>  > > > > No.
>  > > >
>  > > > Strictly spoken, but it works in practice. See
>  > > >
>  > > > http://thread.gmane.org/gmane.linux.real-time.xenomai.users/12135
>  > > >
>  > > > Jan
>  > > >
>  > > > --
>  > > > Siemens AG, Corporate Technology, CT T DE IT 1
>  > > > Corporate Competence Center Embedded Linux
>  > >
>  > > Hi Jan,
>  > >
>  > > Thanks for the reply. I got the following info from you post and i had few
>  > > questions related to this post:
>  > >
>  > >
>  > >
>  > > >> - 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)
>  > >
>  > > my question is are you mentioninig here that i must not be doing
>  > > pci_enable_msi() and pci_disable_msi() inside the RTDM driver ? if not then
>  > > where should these calls be done ?
>  >
>  > pci_enable/disable_msi are initialization services that only need to be
>  > executed over Linux context - also in RTDM drivers.
>  >
>  > >
>  > > Right now i have ported my standerd linux driver for the PCIe card to RTDM
>  > > drvier. This driver uses MSI. I am not enabeling or disabling MSI or IRQ any
>  > > where in the driver while processing [i.e. in ISR or read/write]. I am 
> enabeling
>  > > MSI in the PCI Probe and disabeling it in the PCI remove functions. The 
> problem
>  > > i am facing is as soon as i get the First MSI interrupt the kernel oops and i
>  > > get the following dump:
>  > >
>  > > |Mar 21 21:08:34 barch kernel: BUG: unable to handle kernel paging request 
> at 7f45402d
>  > > Mar 21 21:08:34 barch kernel: Oops: 0000 [#1] PREEMPT SMP
>  > > |
>  > >
>  >
>  > We would need the full backtrace to have at least a chance to help.
>  >
>  > >
>  > > [note: The normal linux driver works with out any problem].
>  > >
>  > > Please let me know your thoughts. Also is there an example PCIe RTDM driver
>  > > using MSI that i can refer to understand more about this topic ?
>  >
>  > Check RTnet's IGB driver. It works with MSI-X interrupts on x86.
>  >
>  > Jan
>  >
>  > --
>  > Siemens AG, Corporate Technology, CT T DE IT 1
>  > Corporate Competence Center Embedded Linux
> 
> Hi Jan,
> Thanks again for the reply. Here is the full backtrace:
> 
> Mar 22 21:12:47 localhost kernel: test_dev: Probe for device function=0
> Mar 22 21:12:47 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10

Here you get IRQ 10...

> Mar 22 21:12:47 localhost kernel: pci_bar = 0xfe000000
> Mar 22 21:12:47 localhost kernel: Xenomai: RTDM: RT open handler is deprecated, 
> driver requires update.
> Mar 22 21:12:47 localhost kernel: Xenomai: RTDM: RT close handler is deprecated, 
> driver requires update.

[ These messages also have a meaning, though unrelated to the crash. ]

> Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned to the 
> device.

...but here IRQ 16 is assigned. Broken output or a real inconsistency?

Also, where is the MSI? You should see log messages about MSI/MSI-X IRQ
number assignment when properly enabling the support at PCI level.

Jan

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


  reply	other threads:[~2011-03-22 16:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 13:20 [Xenomai-core] MSI support in Xenomai krishna m
2011-03-16 13:26 ` Gilles Chanteperdrix
2011-03-17  8:30   ` Jan Kiszka
2011-03-21 12:48     ` krishna m
2011-03-22 12:13       ` Jan Kiszka
2011-03-22 15:55         ` krishna m
2011-03-22 16:51           ` Jan Kiszka [this message]
2011-03-22 17:03             ` Gilles Chanteperdrix
2011-03-22 18:20               ` krishna m
2011-03-25 12:21                 ` krishna m
2011-03-29 13:07                   ` krishna m
2011-03-29 13:47                     ` Gilles Chanteperdrix

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=4D88D39D.907@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=krishnamurthyjs@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.