> Date: Tue, 22 Mar 2011 13:13:16 +0100
> From: jan.kis...@siemens.com
> To: krishnamurth...@hotmail.com
> CC: gilles.chanteperd...@xenomai.org; xenomai-core@gna.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.kis...@siemens.com
> > > To: gilles.chanteperd...@xenomai.org; krishnamurth...@hotmail.com
> > > CC: xenomai-core@gna.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 

                                          
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to