* [Xenomai-core] MSI support in Xenomai @ 2011-03-16 13:20 krishna m 2011-03-16 13:26 ` Gilles Chanteperdrix 0 siblings, 1 reply; 12+ messages in thread From: krishna m @ 2011-03-16 13:20 UTC (permalink / raw) To: xenomai [-- Attachment #1: Type: text/plain, Size: 399 bytes --] 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. thanks, Krishna [-- Attachment #2: Type: text/html, Size: 606 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 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 0 siblings, 1 reply; 12+ messages in thread From: Gilles Chanteperdrix @ 2011-03-16 13:26 UTC (permalink / raw) To: krishna m; +Cc: xenomai 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. -- Gilles. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-16 13:26 ` Gilles Chanteperdrix @ 2011-03-17 8:30 ` Jan Kiszka 2011-03-21 12:48 ` krishna m 0 siblings, 1 reply; 12+ messages in thread From: Jan Kiszka @ 2011-03-17 8:30 UTC (permalink / raw) To: Gilles Chanteperdrix, krishna m; +Cc: 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-17 8:30 ` Jan Kiszka @ 2011-03-21 12:48 ` krishna m 2011-03-22 12:13 ` Jan Kiszka 0 siblings, 1 reply; 12+ messages in thread From: krishna m @ 2011-03-21 12:48 UTC (permalink / raw) To: jan.kiszka, gilles.chanteperdrix, jan.kiszka; +Cc: xenomai [-- Attachment #1: Type: text/plain, Size: 2262 bytes --] > 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 ? 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 [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 ? thanks, krishna [-- Attachment #2: Type: text/html, Size: 2822 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-21 12:48 ` krishna m @ 2011-03-22 12:13 ` Jan Kiszka 2011-03-22 15:55 ` krishna m 0 siblings, 1 reply; 12+ messages in thread From: Jan Kiszka @ 2011-03-22 12:13 UTC (permalink / raw) To: krishna m; +Cc: xenomai@xenomai.org 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-22 12:13 ` Jan Kiszka @ 2011-03-22 15:55 ` krishna m 2011-03-22 16:51 ` Jan Kiszka 0 siblings, 1 reply; 12+ messages in thread From: krishna m @ 2011-03-22 15:55 UTC (permalink / raw) To: jan.kiszka; +Cc: xenomai [-- 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 --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-22 15:55 ` krishna m @ 2011-03-22 16:51 ` Jan Kiszka 2011-03-22 17:03 ` Gilles Chanteperdrix 0 siblings, 1 reply; 12+ messages in thread From: Jan Kiszka @ 2011-03-22 16:51 UTC (permalink / raw) To: krishna m; +Cc: xenomai@xenomai.org 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-22 16:51 ` Jan Kiszka @ 2011-03-22 17:03 ` Gilles Chanteperdrix 2011-03-22 18:20 ` krishna m 0 siblings, 1 reply; 12+ messages in thread From: Gilles Chanteperdrix @ 2011-03-22 17:03 UTC (permalink / raw) To: Jan Kiszka; +Cc: xenomai@xenomai.org Jan Kiszka wrote: > On 2011-03-22 16:55, krishna m wrote: >> 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. Maybe pci_enable_msi was called after request_irq ? -- Gilles. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-22 17:03 ` Gilles Chanteperdrix @ 2011-03-22 18:20 ` krishna m 2011-03-25 12:21 ` krishna m 0 siblings, 1 reply; 12+ messages in thread From: krishna m @ 2011-03-22 18:20 UTC (permalink / raw) To: gilles.chanteperdrix, jan.kiszka; +Cc: xenomai [-- Attachment #1: Type: text/plain, Size: 3938 bytes --] > Date: Tue, 22 Mar 2011 18:03:43 +0100 > From: gilles.chanteperdrix@xenomai.org > To: jan.kiszka@domain.hid > CC: krishnamurthyjs@domain.hid xenomai@xenomai.org > Subject: Re: MSI support in Xenomai > > Jan Kiszka wrote: > > On 2011-03-22 16:55, krishna m wrote: > > >> 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. > > Maybe pci_enable_msi was called after request_irq ? > > > -- > Gilles. Just check my code: i do enable MSI (pci_enable_msi) before rtdm_irq_request pasted the code below part of my PCI probe function in the device driver: ...... rtdm_dev = kmalloc(sizeof(struct rtdm_device), GFP_KERNEL); if(!rtdm_dev) { printk(KERN_WARNING "RUBICON: kmalloc failed\n"); ret = -ENOMEM; //Insufficient storage space is available. goto fail_pci; } //copy the structure to the new memory memcpy(rtdm_dev, &rubicon_rtdm_driver, sizeof(struct rtdm_device)); //create filename snprintf(rtdm_dev->device_name, RTDM_MAX_DEVNAME_LEN, "rtser%d", 0 /*i*/); rtdm_dev->device_id = 0; //i; //define two other members of the rtdm_device structure rtdm_dev->proc_name = rtdm_dev->device_name; ret = rtdm_dev_register(rtdm_dev); if(ret < 0) { printk(KERN_WARNING"RUBICON: cannot register device\n"); goto fail_pci; } g_rubicon_context.xen_device = rtdm_dev; ret = pci_enable_msi(dev); if(ret) { printk("RUBICON: Enabling MSI failed wuth error code: 0x%x\n", ret); goto fail_pci; } g_rubicon_context.irq = dev->irq; /* save the allocated IRQ */ g_rubicon_context.dev = dev; /* Save the PCI queue h/w device ctx */ dev_set_drvdata(dev,(void *) &(g_rubicon_context)); /* request the irq for the device */ ret = rtdm_irq_request(&g_rubicon_context.irq_handle, g_rubicon_context.irq, rubicon_irq_handler, RTDM_IRQTYPE_SHARED, "rubicon", (void *)&g_rubicon_context); .... >From IRQ number perspective: Mar 22 21:12:47 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10 >>>> is the print from the Kernel PCI Probe and Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned >>>>>> is my Print after enabling MSI and registering for irq. I get the similar print with the Plain Linux kernel with the IRQ being assigned MSI enabled is irq 20. [Below i have pasted the kernel log of plain linux kernel]. I have tested the MSI interrupts and they work fine. Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=0 Mar 22 23:47:49 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10 Mar 22 23:47:49 localhost kernel: pci_bar = 0xfe000000 Mar 22 23:47:49 localhost kernel: test_dev: IRQ 20 successfully assigned to the device. Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=1 Mar 22 23:47:49 localhost kernel: test_dev: Successfully added test_dev Device Driver. thanks -krishna [-- Attachment #2: Type: text/html, Size: 6489 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-22 18:20 ` krishna m @ 2011-03-25 12:21 ` krishna m 2011-03-29 13:07 ` krishna m 0 siblings, 1 reply; 12+ messages in thread From: krishna m @ 2011-03-25 12:21 UTC (permalink / raw) To: gilles.chanteperdrix, jan.kiszka; +Cc: xenomai [-- Attachment #1: Type: text/plain, Size: 5043 bytes --] From: krishnamurthyjs@domain.hid To: gilles.chanteperdrix@xenomai.org jan.kiszka@domain.hid Date: Tue, 22 Mar 2011 23:50:27 +0530 CC: xenomai@xenomai.org Subject: Re: [Xenomai-core] MSI support in Xenomai > Date: Tue, 22 Mar 2011 18:03:43 +0100 > From: gilles.chanteperdrix@xenomai.org > To: jan.kiszka@domain.hid > CC: krishnamurthyjs@domain.hid xenomai@xenomai.org > Subject: Re: MSI support in Xenomai > > Jan Kiszka wrote: > > On 2011-03-22 16:55, krishna m wrote: > > >> 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. > > Maybe pci_enable_msi was called after request_irq ? > > > -- > Gilles. Just check my code: i do enable MSI (pci_enable_msi) before rtdm_irq_request pasted the code below part of my PCI probe function in the device driver: ...... rtdm_dev = kmalloc(sizeof(struct rtdm_device), GFP_KERNEL); if(!rtdm_dev) { printk(KERN_WARNING "RUBICON: kmalloc failed\n"); ret = -ENOMEM; //Insufficient storage space is available. goto fail_pci; } //copy the structure to the new memory memcpy(rtdm_dev, &rubicon_rtdm_driver, sizeof(struct rtdm_device)); //create filename snprintf(rtdm_dev->device_name, RTDM_MAX_DEVNAME_LEN, "rtser%d", 0 /*i*/); rtdm_dev->device_id = 0; //i; //define two other members of the rtdm_device structure rtdm_dev->proc_name = rtdm_dev->device_name; ret = rtdm_dev_register(rtdm_dev); if(ret < 0) { printk(KERN_WARNING"RUBICON: cannot register device\n"); goto fail_pci; } g_rubicon_context.xen_device = rtdm_dev; ret = pci_enable_msi(dev); if(ret) { printk("RUBICON: Enabling MSI failed wuth error code: 0x%x\n", ret); goto fail_pci; } g_rubicon_context.irq = dev->irq; /* save the allocated IRQ */ g_rubicon_context.dev = dev; /* Save the PCI queue h/w device ctx */ dev_set_drvdata(dev,(void *) &(g_rubicon_context)); /* request the irq for the device */ ret = rtdm_irq_request(&g_rubicon_context.irq_handle, g_rubicon_context.irq, rubicon_irq_handler, RTDM_IRQTYPE_SHARED, "rubicon", (void *)&g_rubicon_context); .... >From IRQ number perspective: Mar 22 21:12:47 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10 >>>> is the print from the Kernel PCI Probe and Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned >>>>>> is my Print after enabling MSI and registering for irq. I get the similar print with the Plain Linux kernel with the IRQ being assigned MSI enabled is irq 20. [Below i have pasted the kernel log of plain linux kernel]. I have tested the MSI interrupts and they work fine. Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=0 Mar 22 23:47:49 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10 Mar 22 23:47:49 localhost kernel: pci_bar = 0xfe000000 Mar 22 23:47:49 localhost kernel: test_dev: IRQ 20 successfully assigned to the device. Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=1 Mar 22 23:47:49 localhost kernel: test_dev: Successfully added test_dev Device Driver. Just wanted to add 3 more questions: 1. Which versions of Linux, Adeos patch and xenomai are tested for stable MSI functionality ? Please let me know. 2. I am using the Xenomai Version linux-2.6.37, xenomai-2.5.6 and adeos-ipipe-2.6.37-x86-2.9-00. Is this combination fine ? 3. I looked at the /proc/interrupts and with out xenomai loaded [i.e. default linux kernel] I see my card beaing assigned MSI-EDGE interrupt and with xenomai kernel i don't see the entry in the /proc/interrupts but in /proc/xenomai/irq i see this entry IRQ CPU0 16: 0 test_drv 521: 0 [IPI] 524: 869467 [timer] 525: 0 [critical sync] 546: 0 [virtual] thanks -krishna _______________________________________________ Xenomai-core mailing list Xenomai-core@domain.hid https://mail.gna.org/listinfo/xenomai-core [-- Attachment #2: Type: text/html, Size: 8957 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-25 12:21 ` krishna m @ 2011-03-29 13:07 ` krishna m 2011-03-29 13:47 ` Gilles Chanteperdrix 0 siblings, 1 reply; 12+ messages in thread From: krishna m @ 2011-03-29 13:07 UTC (permalink / raw) To: gilles.chanteperdrix, jan.kiszka; +Cc: xenomai [-- Attachment #1: Type: text/plain, Size: 5369 bytes --] rom: krishnamurthyjs@domain.hid To: gilles.chanteperdrix@xenomai.org jan.kiszka@domain.hid CC: xenomai@xenomai.org Subject: RE: [Xenomai-core] MSI support in Xenomai Date: Fri, 25 Mar 2011 17:51:06 +0530 From: krishnamurthyjs@domain.hid To: gilles.chanteperdrix@xenomai.org jan.kiszka@domain.hid Date: Tue, 22 Mar 2011 23:50:27 +0530 CC: xenomai@xenomai.org Subject: Re: [Xenomai-core] MSI support in Xenomai > Date: Tue, 22 Mar 2011 18:03:43 +0100 > From: gilles.chanteperdrix@xenomai.org > To: jan.kiszka@domain.hid > CC: krishnamurthyjs@domain.hid xenomai@xenomai.org > Subject: Re: MSI support in Xenomai > > Jan Kiszka wrote: > > On 2011-03-22 16:55, krishna m wrote: > > >> 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. > > Maybe pci_enable_msi was called after request_irq ? > > > -- > Gilles. Just check my code: i do enable MSI (pci_enable_msi) before rtdm_irq_request pasted the code below part of my PCI probe function in the device driver: ...... rtdm_dev = kmalloc(sizeof(struct rtdm_device), GFP_KERNEL); if(!rtdm_dev) { printk(KERN_WARNING "RUBICON: kmalloc failed\n"); ret = -ENOMEM; //Insufficient storage space is available. goto fail_pci; } //copy the structure to the new memory memcpy(rtdm_dev, &rubicon_rtdm_driver, sizeof(struct rtdm_device)); //create filename snprintf(rtdm_dev->device_name, RTDM_MAX_DEVNAME_LEN, "rtser%d", 0 /*i*/); rtdm_dev->device_id = 0; //i; //define two other members of the rtdm_device structure rtdm_dev->proc_name = rtdm_dev->device_name; ret = rtdm_dev_register(rtdm_dev); if(ret < 0) { printk(KERN_WARNING"RUBICON: cannot register device\n"); goto fail_pci; } g_rubicon_context.xen_device = rtdm_dev; ret = pci_enable_msi(dev); if(ret) { printk("RUBICON: Enabling MSI failed wuth error code: 0x%x\n", ret); goto fail_pci; } g_rubicon_context.irq = dev->irq; /* save the allocated IRQ */ g_rubicon_context.dev = dev; /* Save the PCI queue h/w device ctx */ dev_set_drvdata(dev,(void *) &(g_rubicon_context)); /* request the irq for the device */ ret = rtdm_irq_request(&g_rubicon_context.irq_handle, g_rubicon_context.irq, rubicon_irq_handler, RTDM_IRQTYPE_SHARED, "rubicon", (void *)&g_rubicon_context); .... >From IRQ number perspective: Mar 22 21:12:47 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10 >>>> is the print from the Kernel PCI Probe and Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned >>>>>> is my Print after enabling MSI and registering for irq. I get the similar print with the Plain Linux kernel with the IRQ being assigned MSI enabled is irq 20. [Below i have pasted the kernel log of plain linux kernel]. I have tested the MSI interrupts and they work fine. Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=0 Mar 22 23:47:49 localhost kernel: test_dev 0000:15:00.0: found PCI INT A -> IRQ 10 Mar 22 23:47:49 localhost kernel: pci_bar = 0xfe000000 Mar 22 23:47:49 localhost kernel: test_dev: IRQ 20 successfully assigned to the device. Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=1 Mar 22 23:47:49 localhost kernel: test_dev: Successfully added test_dev Device Driver. Just wanted to add 3 more questions: 1. Which versions of Linux, Adeos patch and xenomai are tested for stable MSI functionality ? Please let me know. 2. I am using the Xenomai Version linux-2.6.37, xenomai-2.5.6 and adeos-ipipe-2.6.37-x86-2.9-00. Is this combination fine ? 3. I looked at the /proc/interrupts and with out xenomai loaded [i.e. default linux kernel] I see my card beaing assigned MSI-EDGE interrupt and with xenomai kernel i don't see the entry in the /proc/interrupts but in /proc/xenomai/irq i see this entry IRQ CPU0 16: 0 test_drv 521: 0 [IPI] 524: 869467 [timer] 525: 0 [critical sync] 546: 0 [virtual] Hi Jan and Chanteperdrix, Any thoughts or inputs on my updates of MSI not working ? Thanks and Regards, Krishna _______________________________________________ Xenomai-core mailing list Xenomai-core@domain.hid https://mail.gna.org/listinfo/xenomai-core [-- Attachment #2: Type: text/html, Size: 9683 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xenomai-core] MSI support in Xenomai 2011-03-29 13:07 ` krishna m @ 2011-03-29 13:47 ` Gilles Chanteperdrix 0 siblings, 0 replies; 12+ messages in thread From: Gilles Chanteperdrix @ 2011-03-29 13:47 UTC (permalink / raw) To: krishna m; +Cc: jan.kiszka, xenomai krishna m wrote: > Just wanted to add 3 more questions: > 1. Which versions of Linux, Adeos patch and xenomai are tested for stable MSI functionality ? Please let me know. > 2. I am using the Xenomai Version linux-2.6.37, xenomai-2.5.6 and adeos-ipipe-2.6.37-x86-2.9-00. Is this combination fine ? > 3. I looked at the /proc/interrupts and with out xenomai loaded [i.e. default linux kernel] I see my card beaing assigned MSI-EDGE interrupt and with xenomai kernel i don't see the entry in the /proc/interrupts but in /proc/xenomai/irq i see this entry > IRQ CPU0 > 16: 0 test_drv > 521: 0 [IPI] > 524: 869467 [timer] > 525: 0 [critical sync] > 546: 0 [virtual] > > Hi Jan and Chanteperdrix, > Any thoughts or inputs on my updates of MSI not working ? Ok. Since you are asking me directly I am going to answer: my point of view is, as I already told you, that MSI are not supported, so still from my point of view the answer to question 1 is: "none" Question 2 is yes, it is fine, but since MSI is not supported, it is not supposed to work. Answer to question 3 is that /proc/interrupts shows the interrupts registered with request_irq whereas /proc/xenomai/irq shows the interrupts which have been registered by xnintr_init, which rtdm_request_irq uses. So, this is not the same code, the two files do not have the same layout. The reason why I did not answer is that Jan probably has a different point of view for question 1, so, I let him answer you. But as far as I know, Jan asked you some questions, in answer to your last post, to which you did not answer. -- Gilles. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-03-29 13:47 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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.