All of lore.kernel.org
 help / color / mirror / Atom feed
From: krishna m <krishnamurthyjs@domain.hid>
To: jan.kiszka@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] MSI support in Xenomai
Date: Tue, 22 Mar 2011 21:25:45 +0530	[thread overview]
Message-ID: <COL122-W1673FD60DDA60D713554EBDB40@domain.hid> (raw)
In-Reply-To: <4D88925C.3040609@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 6458 bytes --]


> 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
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.
Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned to the device.
Mar 22 21:12:47 localhost kernel: test_dev: Probe for device function=1
Mar 22 21:12:47 localhost kernel: test_dev: Successfully added test_dev Device Driver.
Mar 22 21:13:58 localhost kernel: BUG: unable to handle kernel paging request at d84050c0
Mar 22 21:13:58 localhost kernel: IP: [<c0468f84>] __ipipe_set_irq_pending+0x36/0x49
Mar 22 21:13:58 localhost kernel: *pde = 00000000 
Mar 22 21:13:58 localhost kernel: Oops: 0002 [#1] PREEMPT SMP 
Mar 22 21:13:58 localhost kernel: last sysfs file: /sys/devices/pci0000:00/0000:00:1a.0/0000:1f:00.0/0000:20:05.0/0000:2d:00.0/class
Mar 22 21:13:58 localhost kernel: Modules linked in: test_dev autofs4 hidp l2cap crc16 bluetooth sunrpc ip6t_REJECT xt_tcpudp ip6table_filter ip6_tables x_tables ipv6 snd soundcore sata_sil24 libata sd_mod scsi_mod ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: snd_page_alloc]
Mar 22 21:13:58 localhost kernel: 
Mar 22 21:13:58 localhost kernel: Pid: 2414, comm: ptg Not tainted 2.6.37_xenomai-2.5.6 #2 To be filled by O.E.M./To be filled by O.E.M.
Mar 22 21:13:58 localhost kernel: EIP: 0060:[<c0468f84>] EFLAGS: 00010207 CPU: 0
Mar 22 21:13:58 localhost kernel: EIP is at __ipipe_set_irq_pending+0x36/0x49
Mar 22 21:13:58 localhost kernel: EAX: 07ffffff EBX: ffffffff ECX: d74050c0 EDX: c08bc6c0
Mar 22 21:13:58 localhost kernel: ESI: c08bc640 EDI: ffffffc0 EBP: c08bc644 ESP: d69a9f8c
Mar 22 21:13:58 localhost kernel:  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Mar 22 21:13:58 localhost kernel: Process ptg (pid: 2414, ti=d69a8000 task=d6b2a920 task.ti=d69a8000)
Mar 22 21:13:58 localhost kernel: I-pipe domain Linux
Mar 22 21:13:58 localhost kernel: Stack:
Mar 22 21:13:58 localhost kernel:  ffffffff c0416272 d69a9fb4 00000000 c088f180 00000000 00000001 00000001
Mar 22 21:13:58 localhost kernel:  bfa2e138 c0402c69 00000000 00000000 88000000 00000001 00000001 bfa2e138
Mar 22 21:13:58 localhost kernel:  b781e000 0000007b 0000007b 00000000 00000000 ffffffd7 0804b20a 00000073
Mar 22 21:13:58 localhost kernel: Call Trace:
Mar 22 21:13:58 localhost kernel:  [<c0416272>] ? __ipipe_handle_irq+0xf4/0x212
Mar 22 21:13:58 localhost kernel:  [<c0402c69>] ? common_interrupt+0x29/0x38
Mar 22 21:13:58 localhost kernel: Code: e0 b3 82 c0 01 d1 69 10 a0 09 00 00 01 d1 9c 5a 89 da c1 e2 06 8d 94 02 c0 00 00 00 8b 02 a8 20 75 0f 0f ab 59 08 89 d8 c1 e8 05 <0f> ab 41 04 eb 04 0f ab 59 50 ff 84 99 98 00 00 00 5b c3 57 56 
Mar 22 21:13:58 localhost kernel: EIP: [<c0468f84>] __ipipe_set_irq_pending+0x36/0x49 SS:ESP 0068:d69a9f8c
Mar 22 21:13:58 localhost kernel: CR2: 00000000d84050c0
Mar 22 21:13:58 localhost kernel: ---[ end trace 872caaf8551a0ced ]---
 
Please let me know your inputs.
 
thanks,
krishna 

  		 	   		  

[-- Attachment #2: Type: text/html, Size: 7575 bytes --]

  reply	other threads:[~2011-03-22 15:55 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 [this message]
2011-03-22 16:51           ` Jan Kiszka
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=COL122-W1673FD60DDA60D713554EBDB40@domain.hid \
    --to=krishnamurthyjs@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.