All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
@ 2009-11-22 19:35 Ettore Pedretti
  2009-11-22 22:41 ` Alexis Berlemont
       [not found] ` <200911222337.02840.alexis.berlemont@domain.hid>
  0 siblings, 2 replies; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-22 19:35 UTC (permalink / raw)
  To: xenomai

Hello,

I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
the comedi drivers for Xenomai for a NI PCI-6711 function generator
board.

When I try to use the test program cmd_write (or cmd-read) I obtain
the following:

fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
cmd_write: basic descriptor retrieved
	 subdevices count = 0
	 read subdevice index = 0
	 write subdevice index = 0
cmd_write: a4l_get_desc failed (ret=-22)
*** glibc detected *** cmd_write: free(): invalid next size (fast):
0x0804d008 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7e52624]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
cmd_write[0x804927c]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
cmd_write[0x8048b01]
======= Memory map: ========
08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
b7c00000-b7c21000 rw-p 00000000 00:00 0
b7c21000-b7d00000 ---p 00000000 00:00 0
b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
b7de3000-b7de4000 rw-p 00000000 00:00 0
b7de4000-b7f39000 r-xp 00000000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
b7f39000-b7f3a000 r--p 00155000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
b7f3a000-b7f3c000 rw-p 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
b7f3c000-b7f3f000 rw-p 00000000 00:00 0
b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
/lib/i686/cmov/libpthread-2.7.so
b7f54000-b7f56000 rw-p 00014000 08:01 6144264
/lib/i686/cmov/libpthread-2.7.so
b7f56000-b7f58000 rw-p 00000000 00:00 0
b7f58000-b7f5a000 r-xp 00000000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
b7f5a000-b7f5b000 rw-p 00001000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
b7f5b000-b7f5c000 rw-p 00000000 00:00 0
b7f5c000-b7f63000 r-xp 00000000 08:01 10808119   /usr/lib/libnative.so.3.0.0
b7f63000-b7f64000 rw-p 00006000 08:01 10808119   /usr/lib/libnative.so.3.0.0
b7f64000-b7f67000 r-xp 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
b7f67000-b7f68000 rw-p 00002000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
b7f69000-b7f6a000 rw-p 00000000 00:00 0
b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
b7f6d000-b7f6f000 rw-p 00000000 00:00 0
b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
Aborted

This is probably because the device /dev/analogy0 does not exist.

This is the output of uname -a

Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
i686 GNU/Linux

And these are the relevant entries in dmesg

dmesg:

I-pipe 2.4-06: pipeline enabled.
I-pipe: Domain Xenomai registered.

Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
Xenomai: starting native API services.
Analogy: MITE: Available NI device IDs: 0x1880

result of lspci for the relevant board:

04:01.0 Class ff00: National Instruments PCI-6711

And lsmod:

Module                  Size  Used by
xeno_native           105088  0
analogy_ni_pcimio      15644  0
analogy_ni_mio         44860  1 analogy_ni_pcimio
analogy_ni_tio         24956  1 analogy_ni_mio
analogy_8255            3900  1 analogy_ni_mio
analogy_ni_mite        10140  3 analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio
xeno_analogy           40220  5
analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mite
xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
astropci               10944  0
ext3                  109636  1
jbd                    43920  1 ext3
mbcache                 6272  1 ext3
ide_pci_generic         3712  0
ide_core               74204  1 ide_pci_generic
ata_piix               15748  2
sata_mv                26448  0
e1000                 114208  0
libata                142156  2 ata_piix,sata_mv
unix                   22992  10


According to this post:
http://www.mail-archive.com/xenomai@xenomai.org

>The analogy driver "a4l_pcimio" will be registered with your last
>insmod (analogy_ni_pcimio). You can check that by typing "cat
>/proc/analogy/drivers", you will see only one entry: a4l_pcimio.

fangorn:~# cat /proc/analogy/drivers
--  Analogy drivers --

| idx | driver name
|  00 | analogy_ni_pcimio
|  01 | analogy_8255

There are two entries and the drivers are not attached:

fangorn:~# cat /proc/analogy/devices
--  Analogy devices --

| idx | status | driver
|  00 | Unused | No driver
|  01 | Unused | No driver
|  02 | Unused | No driver
|  03 | Unused | No driver
|  04 | Unused | No driver
|  05 | Unused | No driver
|  06 | Unused | No driver
|  07 | Unused | No driver
|  08 | Unused | No driver
|  09 | Unused | No driver

I'm aware of the name change of the drivers:
http://www.mail-archive.com/xenomai-git@xenomai.org

>- a4l_pcimio becomes analogy_ni_pcimio
>- 8255 becomes analogy_8255.
>Consequently, the command line to attach these drivers has
>changed. Starting from now, we have to type:
>- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)

This is what happens when I try to attach the driver to de device:

fangorn:~# analogy_config analogy0 analogy_ni_pcimio

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:Oops: 0000 [#1] PREEMPT SMP

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
task.ti=f64cc000)

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:I-pipe domain Linux

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:Stack:

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:Call Trace:

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
SS:ESP 0068:f64cddc8

Message from syslogd@domain.hid at Nov 21 23:22:37 ...
 kernel:CR2: 0000000000000004


relevant dmeg:

a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
mite 0000:04:01.0: setting latency timer to 64
a4l: MITE: 0xd0801000 mapped to f8e26000
a4l: DAQ: 0xd0800000 mapped to f8e2a000
a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
BUG: unable to handle kernel NULL pointer dereference at 00000004
IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
e1000 libata unix [last unloaded: scsi_wait_scan]

Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0 task.ti=f64cc000)
I-pipe domain Linux
Stack:
 f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc f8a0ea5d
<0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14 f8c2c118 00000001
<0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf 00000001 f8c31e60 00000030
Call Trace:
 [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
 [<c105abf7>] ? xnintr_enable+0xb/0xd
 [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
 [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
 [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
 [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
 [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
 [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
 [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
 [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
 [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
 [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
 [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
 [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
 [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
 [<c10699ae>] ? losyscall_event+0xa9/0x190
 [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
 [<c1069905>] ? losyscall_event+0x0/0x190
 [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
 [<c1002cfd>] ? system_call+0x2d/0x4f
Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP 0068:f64cddc8
CR2: 0000000000000004
---[ end trace c887d49bb5e86cf4 ]---

Can anyone help?

Best regards
Ettore Pedretti


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-22 19:35 [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?) Ettore Pedretti
@ 2009-11-22 22:41 ` Alexis Berlemont
       [not found] ` <200911222337.02840.alexis.berlemont@domain.hid>
  1 sibling, 0 replies; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-22 22:41 UTC (permalink / raw)
  To: xenomai

Hi,

On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
> Hello,
> 
> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
> the comedi drivers for Xenomai for a NI PCI-6711 function generator
> board.
> 
> When I try to use the test program cmd_write (or cmd-read) I obtain
> the following:
> 
> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
> cmd_write: basic descriptor retrieved
>        subdevices count = 0
>        read subdevice index = 0
>        write subdevice index = 0
> cmd_write: a4l_get_desc failed (ret=-22)
> *** glibc detected *** cmd_write: free(): invalid next size (fast):
> 0x0804d008 ***
> ======= Backtrace: =========
> /lib/i686/cmov/libc.so.6[0xb7e52624]
> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
> cmd_write[0x804927c]
> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
> cmd_write[0x8048b01]
> ======= Memory map: ========
> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
> b7c00000-b7c21000 rw-p 00000000 00:00 0
> b7c21000-b7d00000 ---p 00000000 00:00 0
> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
> b7de3000-b7de4000 rw-p 00000000 00:00 0
> b7de4000-b7f39000 r-xp 00000000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> b7f39000-b7f3a000 r--p 00155000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> b7f3a000-b7f3c000 rw-p 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
> /lib/i686/cmov/libpthread-2.7.so
> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
> /lib/i686/cmov/libpthread-2.7.so
> b7f56000-b7f58000 rw-p 00000000 00:00 0
> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
> b7f5a000-b7f5b000 rw-p 00001000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
> b7f5b000-b7f5c000 rw-p 00000000 00:00 0
> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119  
>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01 10808119
>    /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp 00000000 08:01
>  10808112   /usr/lib/libanalogy.so.1.0.0 b7f67000-b7f68000 rw-p 00002000
>  08:01 10808112   /usr/lib/libanalogy.so.1.0.0 b7f69000-b7f6a000 rw-p
>  00000000 00:00 0
> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> Aborted
> 
> This is probably because the device /dev/analogy0 does not exist.
> 
> This is the output of uname -a
> 
> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
> i686 GNU/Linux
> 
> And these are the relevant entries in dmesg
> 
> dmesg:
> 
> I-pipe 2.4-06: pipeline enabled.
> I-pipe: Domain Xenomai registered.
> 
> Xenomai: hal/i386 started.
> Xenomai: scheduling class idle registered.
> Xenomai: scheduling class rt registered.
> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
> Xenomai: SMI-enabled chipset found
> Xenomai: SMI workaround enabled
> Xenomai: starting RTDM services.
> Xenomai: starting native API services.
> Analogy: MITE: Available NI device IDs: 0x1880
> 
> result of lspci for the relevant board:
> 
> 04:01.0 Class ff00: National Instruments PCI-6711
> 
> And lsmod:
> 
> Module                  Size  Used by
> xeno_native           105088  0
> analogy_ni_pcimio      15644  0
> analogy_ni_mio         44860  1 analogy_ni_pcimio
> analogy_ni_tio         24956  1 analogy_ni_mio
> analogy_8255            3900  1 analogy_ni_mio
> analogy_ni_mite        10140  3
>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy          
>  40220  5
> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mit
> e xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
> astropci               10944  0
> ext3                  109636  1
> jbd                    43920  1 ext3
> mbcache                 6272  1 ext3
> ide_pci_generic         3712  0
> ide_core               74204  1 ide_pci_generic
> ata_piix               15748  2
> sata_mv                26448  0
> e1000                 114208  0
> libata                142156  2 ata_piix,sata_mv
> unix                   22992  10
> 
> 
> According to this post:
> http://www.mail-archive.com/xenomai@xenomai.org
> 
> >The analogy driver "a4l_pcimio" will be registered with your last
> >insmod (analogy_ni_pcimio). You can check that by typing "cat
> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
> 
> fangorn:~# cat /proc/analogy/drivers
> --  Analogy drivers --
> 
> | idx | driver name
> |  00 | analogy_ni_pcimio
> |  01 | analogy_8255
> 
> There are two entries and the drivers are not attached:
> 
> fangorn:~# cat /proc/analogy/devices
> --  Analogy devices --
> 
> | idx | status | driver
> |  00 | Unused | No driver
> |  01 | Unused | No driver
> |  02 | Unused | No driver
> |  03 | Unused | No driver
> |  04 | Unused | No driver
> |  05 | Unused | No driver
> |  06 | Unused | No driver
> |  07 | Unused | No driver
> |  08 | Unused | No driver
> |  09 | Unused | No driver
> 
> I'm aware of the name change of the drivers:
> http://www.mail-archive.com/xenomai-git@xenomai.org
> 
> >- a4l_pcimio becomes analogy_ni_pcimio
> >- 8255 becomes analogy_8255.
> >Consequently, the command line to attach these drivers has
> >changed. Starting from now, we have to type:
> >- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)
> 
> This is what happens when I try to attach the driver to de device:
> 
> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:Oops: 0000 [#1] PREEMPT SMP
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:last sysfs file:
>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> task.ti=f64cc000)
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:I-pipe domain Linux
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:Stack:
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:Call Trace:
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> SS:ESP 0068:f64cddc8
> 
> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>  kernel:CR2: 0000000000000004
> 
> 
> relevant dmeg:
> 
> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> mite 0000:04:01.0: setting latency timer to 64
> a4l: MITE: 0xd0801000 mapped to f8e26000
> a4l: DAQ: 0xd0800000 mapped to f8e2a000
> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins =
>  2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> BUG: unable to handle kernel NULL pointer dereference at 00000004
> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> *pde = 00000000
> Oops: 0000 [#1] PREEMPT SMP
> last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
> e1000 libata unix [last unloaded: scsi_wait_scan]
> 
> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>  task.ti=f64cc000) I-pipe domain Linux
> Stack:
>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc f8a0ea5d
> <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14 f8c2c118 00000001
> <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf 00000001 f8c31e60 00000030
> Call Trace:
>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>  [<c1069905>] ? losyscall_event+0x0/0x190
>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>  [<c1002cfd>] ? system_call+0x2d/0x4f
> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>  0068:f64cddc8 CR2: 0000000000000004
> ---[ end trace c887d49bb5e86cf4 ]---

Thanks for such a great report.

I keep two things in mind: 
- cmd_write's error handling path is not buggy (that was already in my todo 
list). I will fix that as soon as possible. 

- according to the call-stack dump you made, the irq handler registering seems 
to be the source of the trouble. What strikes me is that the oops occurred 
very low (unmask_IO_APIC_irq: we are no more in the analogy layer). 

In order to be sure that the problem is located in analogy, it would be great 
to test that calling rtdm_request_irq(... , 48, ...) does not trigger the bug.

Here is a little test module you could try to insmod. If you do not want to 
bother finding out how to compile it, you can replace the code of an existing 
rtdm driver (for example: xenomai/ksrc/drivers/testing/irqbench.c) with the 
source below.

Another interesting test would be to disable CONFIG_X86_IO_APIC in your kernel 
configuration (in "Processor type and features", disable the SMP option and 
disable "IO APIC" under "Local APIC").

#include <linux/version.h>
#include <linux/module.h>
#include <linux/ioport.h>

#include <rtdm/rtdm_driver.h>


int test_handler(rtdm_irq_t *irq_handle)
{

        rtdm_printk("irq_test: INTERRUPT!\n");

        return RTDM_IRQ_HANDLED;
}

static rtdm_irq_t handle;

static int __init __test_init(void)
{

        int err;

        rtdm_printk("irq_test: before rtdm_irq_request\n");

        err = rtdm_irq_request(&handle, 48, test_handler, 0, "test_irq", 
NULL);

        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n", err);      

        rtdm_printk("irq_test: before rtdm_irq_enable\n");

        err = rtdm_irq_enable(&handle);

        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n", err);


        return err;
}

static void __exit __test_exit(void)
{

        rtdm_irq_free(&handle);

}

module_init(__test_init);
module_exit(__test_exit);


> Can anyone help?
> 
> Best regards
> Ettore Pedretti
> 

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
       [not found] ` <200911222337.02840.alexis.berlemont@domain.hid>
@ 2009-11-23  8:28   ` Ettore Pedretti
  2009-11-23 12:24     ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-23  8:28 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

Hi,

I have compiled the module using this makefile:

prefix := $(shell /usr/bin/xeno-config --prefix)
obj-m   := irqTest.o

ifeq ($(prefix),)
$(error Please add <xeno-install>/bin to your PATH variable)
endif

KDIR    := /lib/modules/$(shell uname -r)/build
PWD     := $(shell pwd)
EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/


all: default

default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

install:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install

clean:
        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions

The module seems to compiles fine:

make -C /lib/modules/2.6.31.1/build
SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
make[1]: Entering directory `/usr/src/linux-2.6.31.1'
  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
make[1]: Leaving directory `/usr/src/linux-2.6.31.1'

To make sure module dependencies are in place I modprobe irqbench
(probably not necessary).

modprobe xeno_irqbench

All the loaded modules:

fangorn:~# lsmod
Module                  Size  Used by
xeno_irqbench           5152  0
xeno_native            83296  0
analogy_ni_pcimio      15676  0
analogy_ni_mio         41596  1 analogy_ni_pcimio
analogy_ni_tio         21724  1 analogy_ni_mio
analogy_8255            4060  1 analogy_ni_mio
analogy_ni_mite         9980  3 analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio
xeno_analogy           38876  5
analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mite
xeno_rtdm              24244  3 xeno_irqbench,analogy_ni_mio,xeno_analogy
astropci               10968  0
ext3                  112900  1
jbd                    44016  1 ext3
mbcache                 6652  1 ext3
ide_pci_generic         3712  0
ide_core               79388  1 ide_pci_generic
e1000                 118204  0
ata_piix               15968  2
sata_mv                27632  0
libata                151468  2 ata_piix,sata_mv
unix                   24460  10


When I insert the module it complains about missing symbols:

insmod irqTest.ko

insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module

dmesg:

irqTest: module license 'unspecified' taints kernel.
Disabling lock debugging due to kernel taint
irqTest: Unknown symbol xnintr_enable
irqTest: Unknown symbol xnintr_detach

What am I doing wrong?

BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same problem.

Cheers
Ettore




2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
> Hi,
>
> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>> Hello,
>>
>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
>> the comedi drivers for Xenomai for a NI PCI-6711 function generator
>> board.
>>
>> When I try to use the test program cmd_write (or cmd-read) I obtain
>> the following:
>>
>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>> cmd_write: basic descriptor retrieved
>>        subdevices count = 0
>>        read subdevice index = 0
>>        write subdevice index = 0
>> cmd_write: a4l_get_desc failed (ret=-22)
>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>> 0x0804d008 ***
>> ======= Backtrace: =========
>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>> cmd_write[0x804927c]
>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>> cmd_write[0x8048b01]
>> ======= Memory map: ========
>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>> b7c21000-b7d00000 ---p 00000000 00:00 0
>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>> b7f39000-b7f3a000 r--p 00155000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>> b7f3a000-b7f3c000 rw-p 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>> /lib/i686/cmov/libpthread-2.7.so
>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>> /lib/i686/cmov/libpthread-2.7.so
>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
>> b7f5a000-b7f5b000 rw-p 00001000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
>> b7f5b000-b7f5c000 rw-p 00000000 00:00 0
>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01 10808119
>>    /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp 00000000 08:01
>>  10808112   /usr/lib/libanalogy.so.1.0.0 b7f67000-b7f68000 rw-p 00002000
>>  08:01 10808112   /usr/lib/libanalogy.so.1.0.0 b7f69000-b7f6a000 rw-p
>>  00000000 00:00 0
>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>> Aborted
>>
>> This is probably because the device /dev/analogy0 does not exist.
>>
>> This is the output of uname -a
>>
>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>> i686 GNU/Linux
>>
>> And these are the relevant entries in dmesg
>>
>> dmesg:
>>
>> I-pipe 2.4-06: pipeline enabled.
>> I-pipe: Domain Xenomai registered.
>>
>> Xenomai: hal/i386 started.
>> Xenomai: scheduling class idle registered.
>> Xenomai: scheduling class rt registered.
>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
>> Xenomai: SMI-enabled chipset found
>> Xenomai: SMI workaround enabled
>> Xenomai: starting RTDM services.
>> Xenomai: starting native API services.
>> Analogy: MITE: Available NI device IDs: 0x1880
>>
>> result of lspci for the relevant board:
>>
>> 04:01.0 Class ff00: National Instruments PCI-6711
>>
>> And lsmod:
>>
>> Module                  Size  Used by
>> xeno_native           105088  0
>> analogy_ni_pcimio      15644  0
>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>> analogy_ni_tio         24956  1 analogy_ni_mio
>> analogy_8255            3900  1 analogy_ni_mio
>> analogy_ni_mite        10140  3
>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>  40220  5
>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mit
>> e xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
>> astropci               10944  0
>> ext3                  109636  1
>> jbd                    43920  1 ext3
>> mbcache                 6272  1 ext3
>> ide_pci_generic         3712  0
>> ide_core               74204  1 ide_pci_generic
>> ata_piix               15748  2
>> sata_mv                26448  0
>> e1000                 114208  0
>> libata                142156  2 ata_piix,sata_mv
>> unix                   22992  10
>>
>>
>> According to this post:
>> http://www.mail-archive.com/xenomai@xenomai.org
>>
>> >The analogy driver "a4l_pcimio" will be registered with your last
>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>
>> fangorn:~# cat /proc/analogy/drivers
>> --  Analogy drivers --
>>
>> | idx | driver name
>> |  00 | analogy_ni_pcimio
>> |  01 | analogy_8255
>>
>> There are two entries and the drivers are not attached:
>>
>> fangorn:~# cat /proc/analogy/devices
>> --  Analogy devices --
>>
>> | idx | status | driver
>> |  00 | Unused | No driver
>> |  01 | Unused | No driver
>> |  02 | Unused | No driver
>> |  03 | Unused | No driver
>> |  04 | Unused | No driver
>> |  05 | Unused | No driver
>> |  06 | Unused | No driver
>> |  07 | Unused | No driver
>> |  08 | Unused | No driver
>> |  09 | Unused | No driver
>>
>> I'm aware of the name change of the drivers:
>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>
>> >- a4l_pcimio becomes analogy_ni_pcimio
>> >- 8255 becomes analogy_8255.
>> >Consequently, the command line to attach these drivers has
>> >changed. Starting from now, we have to type:
>> >- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)
>>
>> This is what happens when I try to attach the driver to de device:
>>
>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:last sysfs file:
>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>> task.ti=f64cc000)
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:I-pipe domain Linux
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:Stack:
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:Call Trace:
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> SS:ESP 0068:f64cddc8
>>
>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>  kernel:CR2: 0000000000000004
>>
>>
>> relevant dmeg:
>>
>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>> mite 0000:04:01.0: setting latency timer to 64
>> a4l: MITE: 0xd0801000 mapped to f8e26000
>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins =
>>  2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> *pde = 00000000
>> Oops: 0000 [#1] PREEMPT SMP
>> last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>> Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>
>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>  task.ti=f64cc000) I-pipe domain Linux
>> Stack:
>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc f8a0ea5d
>> <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14 f8c2c118 00000001
>> <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf 00000001 f8c31e60 00000030
>> Call Trace:
>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>  0068:f64cddc8 CR2: 0000000000000004
>> ---[ end trace c887d49bb5e86cf4 ]---
>
> Thanks for such a great report.
>
> I keep two things in mind:
> - cmd_write's error handling path is not buggy (that was already in my todo
> list). I will fix that as soon as possible.
>
> - according to the call-stack dump you made, the irq handler registering seems
> to be the source of the trouble. What strikes me is that the oops occurred
> very low (unmask_IO_APIC_irq: we are no more in the analogy layer).
>
> In order to be sure that the problem is located in analogy, it would be great
> to test that calling rtdm_request_irq(... , 48, ...) does not trigger the bug.
>
> Here is a little test module you could try to insmod. If you do not want to
> bother finding out how to compile it, you can replace the code of an existing
> rtdm driver (for example: xenomai/ksrc/drivers/testing/irqbench.c) with the
> source below.
>
> Another interesting test would be to disable CONFIG_X86_IO_APIC in your kernel
> configuration (in "Processor type and features", disable the SMP option and
> disable "IO APIC" under "Local APIC").
>
> #include <linux/version.h>
> #include <linux/module.h>
> #include <linux/ioport.h>
>
> #include <rtdm/rtdm_driver.h>
>
>
> int test_handler(rtdm_irq_t *irq_handle)
> {
>
>        rtdm_printk("irq_test: INTERRUPT!\n");
>
>        return RTDM_IRQ_HANDLED;
> }
>
> static rtdm_irq_t handle;
>
> static int __init __test_init(void)
> {
>
>        int err;
>
>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>
>        err = rtdm_irq_request(&handle, 48, test_handler, 0, "test_irq", NULL);
>
>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n", err);
>
>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>
>        err = rtdm_irq_enable(&handle);
>
>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n", err);
>
>
>        return err;
> }
>
> static void __exit __test_exit(void)
> {
>
>        rtdm_irq_free(&handle);
>
> }
>
> module_init(__test_init);
> module_exit(__test_exit);
>
>
>> Can anyone help?
>>
>> Best regards
>> Ettore Pedretti
>>
>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44 1334 461669, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-23  8:28   ` Ettore Pedretti
@ 2009-11-23 12:24     ` Alexis Berlemont
  2009-11-23 17:26       ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-23 12:24 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid> wrote:
> Hi,
>
> I have compiled the module using this makefile:
>
> prefix := $(shell /usr/bin/xeno-config --prefix)
> obj-m   := irqTest.o
>
> ifeq ($(prefix),)
> $(error Please add <xeno-install>/bin to your PATH variable)
> endif
>
> KDIR    := /lib/modules/$(shell uname -r)/build
> PWD     := $(shell pwd)
> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>
>
> all: default
>
> default:
>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>
> install:
>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>
> clean:
>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>
> The module seems to compiles fine:
>
> make -C /lib/modules/2.6.31.1/build
> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>  Building modules, stage 2.
>  MODPOST 1 modules
>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>
> To make sure module dependencies are in place I modprobe irqbench
> (probably not necessary).
>
> modprobe xeno_irqbench
>
> All the loaded modules:
>
> fangorn:~# lsmod
> Module                  Size  Used by
> xeno_irqbench           5152  0
> xeno_native            83296  0
> analogy_ni_pcimio      15676  0
> analogy_ni_mio         41596  1 analogy_ni_pcimio
> analogy_ni_tio         21724  1 analogy_ni_mio
> analogy_8255            4060  1 analogy_ni_mio
> analogy_ni_mite         9980  3 analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio
> xeno_analogy           38876  5
> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mite
> xeno_rtdm              24244  3 xeno_irqbench,analogy_ni_mio,xeno_analogy
> astropci               10968  0
> ext3                  112900  1
> jbd                    44016  1 ext3
> mbcache                 6652  1 ext3
> ide_pci_generic         3712  0
> ide_core               79388  1 ide_pci_generic
> e1000                 118204  0
> ata_piix               15968  2
> sata_mv                27632  0
> libata                151468  2 ata_piix,sata_mv
> unix                   24460  10
>
>
> When I insert the module it complains about missing symbols:
>
> insmod irqTest.ko
>
> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>
> dmesg:
>
> irqTest: module license 'unspecified' taints kernel.
> Disabling lock debugging due to kernel taint
> irqTest: Unknown symbol xnintr_enable
> irqTest: Unknown symbol xnintr_detach
>
> What am I doing wrong?

It's me who did wrong. I just tested the compilation inside the kernel.

xnintr_* symbols are only exported for GPL compliant modules. So,
could you add the following line in the test module:
MODULE_LICENSE("GPL");

With that, the insmod operation should work.

>
> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same problem.

Could you send the call-stack dump ? Maybe, that will unveil a clue.

> Cheers
> Ettore
>
>
>
>
> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>> Hi,
>>
>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>> Hello,
>>>
>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
>>> the comedi drivers for Xenomai for a NI PCI-6711 function generator
>>> board.
>>>
>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>> the following:
>>>
>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>> cmd_write: basic descriptor retrieved
>>>        subdevices count = 0
>>>        read subdevice index = 0
>>>        write subdevice index = 0
>>> cmd_write: a4l_get_desc failed (ret=-22)
>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>> 0x0804d008 ***
>>> ======= Backtrace: =========
>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>> cmd_write[0x804927c]
>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>> cmd_write[0x8048b01]
>>> ======= Memory map: ========
>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>> b7f39000-b7f3a000 r--p 00155000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>> b7f3a000-b7f3c000 rw-p 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>> /lib/i686/cmov/libpthread-2.7.so
>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>> /lib/i686/cmov/libpthread-2.7.so
>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
>>> b7f5a000-b7f5b000 rw-p 00001000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
>>> b7f5b000-b7f5c000 rw-p 00000000 00:00 0
>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01 10808119
>>>    /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp 00000000 08:01
>>>  10808112   /usr/lib/libanalogy.so.1.0.0 b7f67000-b7f68000 rw-p 00002000
>>>  08:01 10808112   /usr/lib/libanalogy.so.1.0.0 b7f69000-b7f6a000 rw-p
>>>  00000000 00:00 0
>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>> Aborted
>>>
>>> This is probably because the device /dev/analogy0 does not exist.
>>>
>>> This is the output of uname -a
>>>
>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>> i686 GNU/Linux
>>>
>>> And these are the relevant entries in dmesg
>>>
>>> dmesg:
>>>
>>> I-pipe 2.4-06: pipeline enabled.
>>> I-pipe: Domain Xenomai registered.
>>>
>>> Xenomai: hal/i386 started.
>>> Xenomai: scheduling class idle registered.
>>> Xenomai: scheduling class rt registered.
>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
>>> Xenomai: SMI-enabled chipset found
>>> Xenomai: SMI workaround enabled
>>> Xenomai: starting RTDM services.
>>> Xenomai: starting native API services.
>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>
>>> result of lspci for the relevant board:
>>>
>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>
>>> And lsmod:
>>>
>>> Module                  Size  Used by
>>> xeno_native           105088  0
>>> analogy_ni_pcimio      15644  0
>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>> analogy_8255            3900  1 analogy_ni_mio
>>> analogy_ni_mite        10140  3
>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>  40220  5
>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mit
>>> e xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
>>> astropci               10944  0
>>> ext3                  109636  1
>>> jbd                    43920  1 ext3
>>> mbcache                 6272  1 ext3
>>> ide_pci_generic         3712  0
>>> ide_core               74204  1 ide_pci_generic
>>> ata_piix               15748  2
>>> sata_mv                26448  0
>>> e1000                 114208  0
>>> libata                142156  2 ata_piix,sata_mv
>>> unix                   22992  10
>>>
>>>
>>> According to this post:
>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>
>>> >The analogy driver "a4l_pcimio" will be registered with your last
>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>>
>>> fangorn:~# cat /proc/analogy/drivers
>>> --  Analogy drivers --
>>>
>>> | idx | driver name
>>> |  00 | analogy_ni_pcimio
>>> |  01 | analogy_8255
>>>
>>> There are two entries and the drivers are not attached:
>>>
>>> fangorn:~# cat /proc/analogy/devices
>>> --  Analogy devices --
>>>
>>> | idx | status | driver
>>> |  00 | Unused | No driver
>>> |  01 | Unused | No driver
>>> |  02 | Unused | No driver
>>> |  03 | Unused | No driver
>>> |  04 | Unused | No driver
>>> |  05 | Unused | No driver
>>> |  06 | Unused | No driver
>>> |  07 | Unused | No driver
>>> |  08 | Unused | No driver
>>> |  09 | Unused | No driver
>>>
>>> I'm aware of the name change of the drivers:
>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>
>>> >- a4l_pcimio becomes analogy_ni_pcimio
>>> >- 8255 becomes analogy_8255.
>>> >Consequently, the command line to attach these drivers has
>>> >changed. Starting from now, we have to type:
>>> >- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)
>>>
>>> This is what happens when I try to attach the driver to de device:
>>>
>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:last sysfs file:
>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>> task.ti=f64cc000)
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:I-pipe domain Linux
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:Stack:
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:Call Trace:
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> SS:ESP 0068:f64cddc8
>>>
>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>  kernel:CR2: 0000000000000004
>>>
>>>
>>> relevant dmeg:
>>>
>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>> mite 0000:04:01.0: setting latency timer to 64
>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins =
>>>  2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> *pde = 00000000
>>> Oops: 0000 [#1] PREEMPT SMP
>>> last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>> Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>
>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>  task.ti=f64cc000) I-pipe domain Linux
>>> Stack:
>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc f8a0ea5d
>>> <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14 f8c2c118 00000001
>>> <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf 00000001 f8c31e60 00000030
>>> Call Trace:
>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
>>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
>>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>  0068:f64cddc8 CR2: 0000000000000004
>>> ---[ end trace c887d49bb5e86cf4 ]---
>>
>> Thanks for such a great report.
>>
>> I keep two things in mind:
>> - cmd_write's error handling path is not buggy (that was already in my todo
>> list). I will fix that as soon as possible.
>>
>> - according to the call-stack dump you made, the irq handler registering seems
>> to be the source of the trouble. What strikes me is that the oops occurred
>> very low (unmask_IO_APIC_irq: we are no more in the analogy layer).
>>
>> In order to be sure that the problem is located in analogy, it would be great
>> to test that calling rtdm_request_irq(... , 48, ...) does not trigger the bug.
>>
>> Here is a little test module you could try to insmod. If you do not want to
>> bother finding out how to compile it, you can replace the code of an existing
>> rtdm driver (for example: xenomai/ksrc/drivers/testing/irqbench.c) with the
>> source below.
>>
>> Another interesting test would be to disable CONFIG_X86_IO_APIC in your kernel
>> configuration (in "Processor type and features", disable the SMP option and
>> disable "IO APIC" under "Local APIC").
>>
>> #include <linux/version.h>
>> #include <linux/module.h>
>> #include <linux/ioport.h>
>>
>> #include <rtdm/rtdm_driver.h>
>>
>>
>> int test_handler(rtdm_irq_t *irq_handle)
>> {
>>
>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>
>>        return RTDM_IRQ_HANDLED;
>> }
>>
>> static rtdm_irq_t handle;
>>
>> static int __init __test_init(void)
>> {
>>
>>        int err;
>>
>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>
>>        err = rtdm_irq_request(&handle, 48, test_handler, 0, "test_irq", NULL);
>>
>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n", err);
>>
>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>
>>        err = rtdm_irq_enable(&handle);
>>
>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n", err);
>>
>>
>>        return err;
>> }
>>
>> static void __exit __test_exit(void)
>> {
>>
>>        rtdm_irq_free(&handle);
>>
>> }
>>
>> module_init(__test_init);
>> module_exit(__test_exit);
>>
>>
>>> Can anyone help?
>>>
>>> Best regards
>>> Ettore Pedretti
>>>
>>


Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-23 12:24     ` Alexis Berlemont
@ 2009-11-23 17:26       ` Ettore Pedretti
  2009-11-23 22:10         ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-23 17:26 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

Hi,

It is finally working. here is the dmesg after I insert a module:

irq_test: before rtdm_irq_request
irq_test: after rtdm_irq_request (err = -22)
irq_test: before rtdm_irq_enable
irq_test: after rtdm_irq_enable (err = -22)

Attached are a complete call-stack dump and my present kernel configuration.

Cheers
Ettore


2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> Hi,
>
> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid> wrote:
>> Hi,
>>
>> I have compiled the module using this makefile:
>>
>> prefix := $(shell /usr/bin/xeno-config --prefix)
>> obj-m   := irqTest.o
>>
>> ifeq ($(prefix),)
>> $(error Please add <xeno-install>/bin to your PATH variable)
>> endif
>>
>> KDIR    := /lib/modules/$(shell uname -r)/build
>> PWD     := $(shell pwd)
>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>
>>
>> all: default
>>
>> default:
>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>
>> install:
>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>
>> clean:
>>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>
>> The module seems to compiles fine:
>>
>> make -C /lib/modules/2.6.31.1/build
>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>  Building modules, stage 2.
>>  MODPOST 1 modules
>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>
>> To make sure module dependencies are in place I modprobe irqbench
>> (probably not necessary).
>>
>> modprobe xeno_irqbench
>>
>> All the loaded modules:
>>
>> fangorn:~# lsmod
>> Module                  Size  Used by
>> xeno_irqbench           5152  0
>> xeno_native            83296  0
>> analogy_ni_pcimio      15676  0
>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>> analogy_ni_tio         21724  1 analogy_ni_mio
>> analogy_8255            4060  1 analogy_ni_mio
>> analogy_ni_mite         9980  3 analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio
>> xeno_analogy           38876  5
>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mite
>> xeno_rtdm              24244  3 xeno_irqbench,analogy_ni_mio,xeno_analogy
>> astropci               10968  0
>> ext3                  112900  1
>> jbd                    44016  1 ext3
>> mbcache                 6652  1 ext3
>> ide_pci_generic         3712  0
>> ide_core               79388  1 ide_pci_generic
>> e1000                 118204  0
>> ata_piix               15968  2
>> sata_mv                27632  0
>> libata                151468  2 ata_piix,sata_mv
>> unix                   24460  10
>>
>>
>> When I insert the module it complains about missing symbols:
>>
>> insmod irqTest.ko
>>
>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>
>> dmesg:
>>
>> irqTest: module license 'unspecified' taints kernel.
>> Disabling lock debugging due to kernel taint
>> irqTest: Unknown symbol xnintr_enable
>> irqTest: Unknown symbol xnintr_detach
>>
>> What am I doing wrong?
>
> It's me who did wrong. I just tested the compilation inside the kernel.
>
> xnintr_* symbols are only exported for GPL compliant modules. So,
> could you add the following line in the test module:
> MODULE_LICENSE("GPL");
>
> With that, the insmod operation should work.
>
>>
>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same problem.
>
> Could you send the call-stack dump ? Maybe, that will unveil a clue.
>
>> Cheers
>> Ettore
>>
>>
>>
>>
>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>> Hi,
>>>
>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>> Hello,
>>>>
>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
>>>> the comedi drivers for Xenomai for a NI PCI-6711 function generator
>>>> board.
>>>>
>>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>>> the following:
>>>>
>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>> cmd_write: basic descriptor retrieved
>>>>        subdevices count = 0
>>>>        read subdevice index = 0
>>>>        write subdevice index = 0
>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>>> 0x0804d008 ***
>>>> ======= Backtrace: =========
>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>> cmd_write[0x804927c]
>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>> cmd_write[0x8048b01]
>>>> ======= Memory map: ========
>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>> b7f39000-b7f3a000 r--p 00155000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>> b7f3a000-b7f3c000 rw-p 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>> /lib/i686/cmov/libpthread-2.7.so
>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>> /lib/i686/cmov/libpthread-2.7.so
>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
>>>> b7f5a000-b7f5b000 rw-p 00001000 08:01 10808118   /usr/lib/librtdm.so.1.0.0
>>>> b7f5b000-b7f5c000 rw-p 00000000 00:00 0
>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01 10808119
>>>>    /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp 00000000 08:01
>>>>  10808112   /usr/lib/libanalogy.so.1.0.0 b7f67000-b7f68000 rw-p 00002000
>>>>  08:01 10808112   /usr/lib/libanalogy.so.1.0.0 b7f69000-b7f6a000 rw-p
>>>>  00000000 00:00 0
>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>> Aborted
>>>>
>>>> This is probably because the device /dev/analogy0 does not exist.
>>>>
>>>> This is the output of uname -a
>>>>
>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>>> i686 GNU/Linux
>>>>
>>>> And these are the relevant entries in dmesg
>>>>
>>>> dmesg:
>>>>
>>>> I-pipe 2.4-06: pipeline enabled.
>>>> I-pipe: Domain Xenomai registered.
>>>>
>>>> Xenomai: hal/i386 started.
>>>> Xenomai: scheduling class idle registered.
>>>> Xenomai: scheduling class rt registered.
>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
>>>> Xenomai: SMI-enabled chipset found
>>>> Xenomai: SMI workaround enabled
>>>> Xenomai: starting RTDM services.
>>>> Xenomai: starting native API services.
>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>
>>>> result of lspci for the relevant board:
>>>>
>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>
>>>> And lsmod:
>>>>
>>>> Module                  Size  Used by
>>>> xeno_native           105088  0
>>>> analogy_ni_pcimio      15644  0
>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>> analogy_8255            3900  1 analogy_ni_mio
>>>> analogy_ni_mite        10140  3
>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>  40220  5
>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_mit
>>>> e xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
>>>> astropci               10944  0
>>>> ext3                  109636  1
>>>> jbd                    43920  1 ext3
>>>> mbcache                 6272  1 ext3
>>>> ide_pci_generic         3712  0
>>>> ide_core               74204  1 ide_pci_generic
>>>> ata_piix               15748  2
>>>> sata_mv                26448  0
>>>> e1000                 114208  0
>>>> libata                142156  2 ata_piix,sata_mv
>>>> unix                   22992  10
>>>>
>>>>
>>>> According to this post:
>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>
>>>> >The analogy driver "a4l_pcimio" will be registered with your last
>>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>>>
>>>> fangorn:~# cat /proc/analogy/drivers
>>>> --  Analogy drivers --
>>>>
>>>> | idx | driver name
>>>> |  00 | analogy_ni_pcimio
>>>> |  01 | analogy_8255
>>>>
>>>> There are two entries and the drivers are not attached:
>>>>
>>>> fangorn:~# cat /proc/analogy/devices
>>>> --  Analogy devices --
>>>>
>>>> | idx | status | driver
>>>> |  00 | Unused | No driver
>>>> |  01 | Unused | No driver
>>>> |  02 | Unused | No driver
>>>> |  03 | Unused | No driver
>>>> |  04 | Unused | No driver
>>>> |  05 | Unused | No driver
>>>> |  06 | Unused | No driver
>>>> |  07 | Unused | No driver
>>>> |  08 | Unused | No driver
>>>> |  09 | Unused | No driver
>>>>
>>>> I'm aware of the name change of the drivers:
>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>
>>>> >- a4l_pcimio becomes analogy_ni_pcimio
>>>> >- 8255 becomes analogy_8255.
>>>> >Consequently, the command line to attach these drivers has
>>>> >changed. Starting from now, we have to type:
>>>> >- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)
>>>>
>>>> This is what happens when I try to attach the driver to de device:
>>>>
>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:last sysfs file:
>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>> task.ti=f64cc000)
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:I-pipe domain Linux
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:Stack:
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:Call Trace:
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>> SS:ESP 0068:f64cddc8
>>>>
>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>  kernel:CR2: 0000000000000004
>>>>
>>>>
>>>> relevant dmeg:
>>>>
>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>> mite 0000:04:01.0: setting latency timer to 64
>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins =
>>>>  2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>> *pde = 00000000
>>>> Oops: 0000 [#1] PREEMPT SMP
>>>> last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>> Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>
>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>> Stack:
>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc f8a0ea5d
>>>> <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14 f8c2c118 00000001
>>>> <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf 00000001 f8c31e60 00000030
>>>> Call Trace:
>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
>>>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
>>>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>>  0068:f64cddc8 CR2: 0000000000000004
>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>
>>> Thanks for such a great report.
>>>
>>> I keep two things in mind:
>>> - cmd_write's error handling path is not buggy (that was already in my todo
>>> list). I will fix that as soon as possible.
>>>
>>> - according to the call-stack dump you made, the irq handler registering seems
>>> to be the source of the trouble. What strikes me is that the oops occurred
>>> very low (unmask_IO_APIC_irq: we are no more in the analogy layer).
>>>
>>> In order to be sure that the problem is located in analogy, it would be great
>>> to test that calling rtdm_request_irq(... , 48, ...) does not trigger the bug.
>>>
>>> Here is a little test module you could try to insmod. If you do not want to
>>> bother finding out how to compile it, you can replace the code of an existing
>>> rtdm driver (for example: xenomai/ksrc/drivers/testing/irqbench.c) with the
>>> source below.
>>>
>>> Another interesting test would be to disable CONFIG_X86_IO_APIC in your kernel
>>> configuration (in "Processor type and features", disable the SMP option and
>>> disable "IO APIC" under "Local APIC").
>>>
>>> #include <linux/version.h>
>>> #include <linux/module.h>
>>> #include <linux/ioport.h>
>>>
>>> #include <rtdm/rtdm_driver.h>
>>>
>>>
>>> int test_handler(rtdm_irq_t *irq_handle)
>>> {
>>>
>>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>>
>>>        return RTDM_IRQ_HANDLED;
>>> }
>>>
>>> static rtdm_irq_t handle;
>>>
>>> static int __init __test_init(void)
>>> {
>>>
>>>        int err;
>>>
>>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>
>>>        err = rtdm_irq_request(&handle, 48, test_handler, 0, "test_irq", NULL);
>>>
>>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n", err);
>>>
>>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>
>>>        err = rtdm_irq_enable(&handle);
>>>
>>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n", err);
>>>
>>>
>>>        return err;
>>> }
>>>
>>> static void __exit __test_exit(void)
>>> {
>>>
>>>        rtdm_irq_free(&handle);
>>>
>>> }
>>>
>>> module_init(__test_init);
>>> module_exit(__test_exit);
>>>
>>>
>>>> Can anyone help?
>>>>
>>>> Best regards
>>>> Ettore Pedretti
>>>>
>>>
>
>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44 1334 461669, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532

[-- Attachment #2: dmesg --]
[-- Type: application/octet-stream, Size: 46665 bytes --]

Linux version 2.6.31.1 (root@fangorn) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 PREEMPT Sun Nov 22 23:24:43 PST 2009
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009a800 (usable)
 BIOS-e820: 000000000009a800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 00000000bff70000 (usable)
 BIOS-e820: 00000000bff70000 - 00000000bff77000 (ACPI data)
 BIOS-e820: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ff800000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fffffc00 - 0000000100000000 (reserved)
user-defined physical RAM map:
 user: 0000000000000000 - 000000000009a800 (usable)
 user: 000000000009a800 - 00000000000a0000 (reserved)
 user: 00000000000e4000 - 0000000000100000 (reserved)
 user: 0000000000100000 - 0000000040000000 (usable)
 user: 00000000bff70000 - 00000000bff77000 (ACPI data)
 user: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 user: 00000000bff80000 - 00000000c0000000 (reserved)
 user: 00000000e0000000 - 00000000f0000000 (reserved)
 user: 00000000fec00000 - 00000000fec10000 (reserved)
 user: 00000000fee00000 - 00000000fee01000 (reserved)
 user: 00000000ff800000 - 00000000ffc00000 (reserved)
 user: 00000000fffffc00 - 0000000100000000 (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0x40000 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-C7FFF write-protect
  C8000-DFFFF uncachable
  E0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000 mask F80000000 write-back
  1 base 080000000 mask FC0000000 write-back
  2 base 0BFF80000 mask FFFF80000 uncachable
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
Warning only 895MB will be used.
Use a HIGHMEM enabled kernel.
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000037fe4000
 0000000000 - 0000400000 page 4k
 0000400000 - 0037c00000 page 2M
 0037c00000 - 0037fe4000 page 4k
kernel direct mapping tables up to 37fe4000 @ 10000-15000
RAMDISK: 37e13000 - 37fef2b6
Allocated new RAMDISK: 00100000 - 002dc2b6
Move RAMDISK from 0000000037e13000 - 0000000037fef2b5 to 00100000 - 002dc2b5
895MB LOWMEM available.
  mapped low ram: 0 - 37fe4000
  low ram: 0 - 37fe4000
  node 0 low ram: 00000000 - 37fe4000
  node 0 bootmap 00011000 - 00018000
(7 early reservations) ==> bootmem [0000000000 - 0037fe4000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0001000000 - 00012bfc54]    TEXT DATA BSS ==> [0001000000 - 00012bfc54]
  #2 [000009a800 - 0000100000]    BIOS reserved ==> [000009a800 - 0000100000]
  #3 [00012c0000 - 00012c6170]              BRK ==> [00012c0000 - 00012c6170]
  #4 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #5 [0000100000 - 00002dc2b6]      NEW RAMDISK ==> [0000100000 - 00002dc2b6]
  #6 [0000011000 - 0000018000]          BOOTMAP ==> [0000011000 - 0000018000]
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00037fe4
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x00000100 -> 0x00037fe4
On node 0 totalpages: 229230
free_area_init_node: node 0, pgdat c125dee0, node_mem_map c12c7200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3946 pages, LIFO batch:0
  Normal zone: 1760 pages used for memmap
  Normal zone: 223492 pages, LIFO batch:31
Allocating PCI resources starting at 40000000 (gap: 40000000:7ff70000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227438
Kernel command line: root=UUID=a52cbb7c-6dc6-42cc-8080-031868242eba ro noht mem=2048M memmap=1024M                
PID hash table entries: 4096 (order: 12, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 904112k/917392k available (1890k kernel code, 12720k reserved, 539k data, 216k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffe6000 - 0xfffff000   ( 100 kB)
    vmalloc : 0xf87e4000 - 0xfffe4000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xf7fe4000   ( 895 MB)
      .init : 0xc1260000 - 0xc1296000   ( 216 kB)
      .data : 0xc11d892a - 0xc125f898   ( 539 kB)
      .text : 0xc1000000 - 0xc11d892a   (1890 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
NR_IRQS:16
Fast TSC calibration using PIT
Detected 3000.139 MHz processor.
I-pipe 2.4-06: pipeline enabled.
Console: colour VGA+ 80x25
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 6000.27 BogoMIPS (lpj=3000139)
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
mce: CPU supports 4 MCE banks
CPU: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd870, last bus=6
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:04.0: PME# supported from D0 D3hot D3cold
pci 0000:00:04.0: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x1840-0x185f]
pci 0000:00:1d.1: reg 20 io port: [0x1860-0x187f]
pci 0000:00:1d.2: reg 20 io port: [0x1880-0x189f]
pci 0000:00:1d.3: reg 20 io port: [0x18a0-0x18bf]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xd0000000-0xd00003ff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 1180-11bf claimed by ICH4 GPIO
pci 0000:00:1f.2: reg 10 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 14 io port: [0x00-0x03]
pci 0000:00:1f.2: reg 18 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 1c io port: [0x00-0x03]
pci 0000:00:1f.2: reg 20 io port: [0x18f0-0x18ff]
pci 0000:00:1f.3: reg 20 io port: [0x1100-0x111f]
pci 0000:00:1f.5: reg 10 io port: [0x1400-0x14ff]
pci 0000:00:1f.5: reg 14 io port: [0x1800-0x183f]
pci 0000:00:1f.5: reg 18 32bit mmio: [0xd0000c00-0xd0000dff]
pci 0000:00:1f.5: reg 1c 32bit mmio: [0xd0000800-0xd00008ff]
pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1f.5: PME# disabled
pci 0000:02:00.0: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.1: reg 10 32bit mmio: [0xd0100000-0xd0100fff]
pci 0000:02:00.2: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.2: PME# supported from D0 D3hot D3cold
pci 0000:02:00.2: PME# disabled
pci 0000:02:00.3: reg 10 32bit mmio: [0xd0101000-0xd0101fff]
pci 0000:00:03.0: bridge io port: [0x2000-0x3fff]
pci 0000:00:03.0: bridge 32bit mmio: [0xd0100000-0xd08fffff]
pci 0000:03:03.0: reg 10 64bit mmio: [0xd0200000-0xd02fffff]
pci 0000:03:03.0: reg 18 io port: [0x2000-0x20ff]
pci 0000:02:00.0: bridge io port: [0x2000-0x2fff]
pci 0000:02:00.0: bridge 32bit mmio: [0xd0200000-0xd07fffff]
pci 0000:04:01.0: reg 10 32bit mmio: [0xd0801000-0xd0801fff]
pci 0000:04:01.0: reg 14 32bit mmio: [0xd0800000-0xd0800fff]
pci 0000:04:02.0: reg 10 64bit mmio: [0xd0820000-0xd083ffff]
pci 0000:04:02.0: reg 20 io port: [0x3000-0x303f]
pci 0000:04:02.0: PME# supported from D0 D3hot D3cold
pci 0000:04:02.0: PME# disabled
pci 0000:04:02.1: reg 10 64bit mmio: [0xd0840000-0xd085ffff]
pci 0000:04:02.1: reg 20 io port: [0x3040-0x307f]
pci 0000:04:02.1: PME# supported from D0 D3hot D3cold
pci 0000:04:02.1: PME# disabled
pci 0000:02:00.2: bridge io port: [0x3000-0x3fff]
pci 0000:02:00.2: bridge 32bit mmio: [0xd0800000-0xd08fffff]
pci 0000:05:00.0: reg 10 32bit mmio: [0xd8000000-0xdfffffff]
pci 0000:05:00.0: reg 14 io port: [0x4000-0x40ff]
pci 0000:05:00.0: reg 18 32bit mmio: [0xd0900000-0xd090ffff]
pci 0000:05:00.0: reg 30 32bit mmio: [0x000000-0x01ffff]
pci 0000:05:00.0: supports D1 D2
pci 0000:05:00.1: reg 10 32bit mmio: [0xd0910000-0xd091ffff]
pci 0000:05:00.1: supports D1 D2
pci 0000:00:04.0: bridge io port: [0x4000-0x4fff]
pci 0000:00:04.0: bridge 32bit mmio: [0xd0900000-0xd09fffff]
pci 0000:00:04.0: bridge 64bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:06:02.0: reg 10 32bit mmio: [0xd0a00000-0xd0a0ffff]
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge 32bit mmio: [0xd0a00000-0xd0afffff]
pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:24d0]
PCI: setting IRQ 10 as level-triggered
pci 0000:00:1f.2: found PCI INT A -> IRQ 10
pci 0000:00:1f.2: sharing IRQ 10 with 0000:00:1d.2
pci 0000:00:1f.2: sharing IRQ 10 with 0000:04:02.0
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:02:00.0: PCI bridge, secondary bus 0000:03
pci 0000:02:00.0:   IO window: 0x2000-0x2fff
pci 0000:02:00.0:   MEM window: 0xd0200000-0xd07fffff
pci 0000:02:00.0:   PREFETCH window: disabled
pci 0000:02:00.2: PCI bridge, secondary bus 0000:04
pci 0000:02:00.2:   IO window: 0x3000-0x3fff
pci 0000:02:00.2:   MEM window: 0xd0800000-0xd08fffff
pci 0000:02:00.2:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x2000-0x3fff
pci 0000:00:03.0:   MEM window: 0xd0100000-0xd08fffff
pci 0000:00:03.0:   PREFETCH window: disabled
pci 0000:00:04.0: PCI bridge, secondary bus 0000:05
pci 0000:00:04.0:   IO window: 0x4000-0x4fff
pci 0000:00:04.0:   MEM window: 0xd0900000-0xd09fffff
pci 0000:00:04.0:   PREFETCH window: 0x000000d8000000-0x000000dfffffff
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
pci 0000:00:1e.0:   IO window: disabled
pci 0000:00:1e.0:   MEM window: 0xd0a00000-0xd0afffff
pci 0000:00:1e.0:   PREFETCH window: disabled
PCI: setting IRQ 5 as level-triggered
pci 0000:00:02.0: found PCI INT A -> IRQ 5
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:03.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:04.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:1d.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:1d.3
pci 0000:00:02.0: sharing IRQ 5 with 0000:03:03.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:04:01.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:05:00.0
pci 0000:00:02.0: setting latency timer to 64
pci 0000:00:03.0: found PCI INT A -> IRQ 5
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:02.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:04.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:1d.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:1d.3
pci 0000:00:03.0: sharing IRQ 5 with 0000:03:03.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:04:01.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:05:00.0
pci 0000:00:03.0: setting latency timer to 64
pci 0000:02:00.0: setting latency timer to 64
pci 0000:02:00.2: setting latency timer to 64
pci 0000:00:04.0: found PCI INT A -> IRQ 5
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:02.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:03.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:1d.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:1d.3
pci 0000:00:04.0: sharing IRQ 5 with 0000:03:03.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:04:01.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:05:00.0
pci 0000:00:04.0: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:02: resource 0 io:  [0x2000-0x3fff]
pci_bus 0000:02: resource 1 mem: [0xd0100000-0xd08fffff]
pci_bus 0000:03: resource 0 io:  [0x2000-0x2fff]
pci_bus 0000:03: resource 1 mem: [0xd0200000-0xd07fffff]
pci_bus 0000:04: resource 0 io:  [0x3000-0x3fff]
pci_bus 0000:04: resource 1 mem: [0xd0800000-0xd08fffff]
pci_bus 0000:05: resource 0 io:  [0x4000-0x4fff]
pci_bus 0000:05: resource 1 mem: [0xd0900000-0xd09fffff]
pci_bus 0000:05: resource 2 pref mem [0xd8000000-0xdfffffff]
pci_bus 0000:06: resource 1 mem: [0xd0a00000-0xd0afffff]
pci_bus 0000:06: resource 3 io:  [0x00-0xffff]
pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Unpacking initramfs...
Freeing initrd memory: 1904k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
audit: initializing netlink socket (disabled)
type=2000 audit(1258995162.094:1): initialized
I-pipe: Domain Xenomai registered.
Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
msgmni has been set to 1769
io scheduler noop registered
io scheduler deadline registered (default)
pci 0000:05:00.0: Boot video device
pcieport-driver 0000:00:02.0: setting latency timer to 64
pcieport-driver 0000:00:03.0: setting latency timer to 64
pcieport-driver 0000:00:04.0: setting latency timer to 64
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Freeing unused kernel memory: 216k freed
input: AT Translated Set 2 keyboard as /class/input/input0
NET: Registered protocol family 1
Clocksource tsc unstable (delta = -289563990 ns)
Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e1000 0000:04:02.0: found PCI INT A -> IRQ 10
e1000 0000:04:02.0: sharing IRQ 10 with 0000:00:1d.2
e1000 0000:04:02.0: sharing IRQ 10 with 0000:00:1f.2
libata version 3.00 loaded.
ata_piix 0000:00:1f.2: version 2.13
ata_piix 0000:00:1f.2: found PCI INT A -> IRQ 10
ata_piix 0000:00:1f.2: sharing IRQ 10 with 0000:00:1d.2
ata_piix 0000:00:1f.2: sharing IRQ 10 with 0000:04:02.0
ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
ata_piix 0000:00:1f.2: setting latency timer to 64
sata_mv 0000:03:03.0: version 1.28
sata_mv 0000:03:03.0: found PCI INT A -> IRQ 5
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:02.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:03.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:04.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:1d.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:1d.3
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:04:01.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:05:00.0
sata_mv 0000:03:03.0: Gen-II 32 slots 8 ports SCSI mode IRQ via INTx
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x18f0 irq 14
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18f8 irq 15
scsi2 : sata_mv
scsi3 : sata_mv
scsi4 : sata_mv
scsi5 : sata_mv
scsi6 : sata_mv
scsi7 : sata_mv
scsi8 : sata_mv
scsi9 : sata_mv
ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 5
ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 5
ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 5
ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 5
ata7: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0232000 irq 5
ata8: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0234000 irq 5
ata9: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0236000 irq 5
ata10: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0238000 irq 5
ata2.00: ATA-7: HDT722525DLA380, V44OA96A, max UDMA/133
ata2.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: ATAPI: SONY    DVD RW DW-Q30A, YYS2, max UDMA/66
ata1.00: limited to UDMA/33 due to 40-wire cable
ata1.00: configured for UDMA/33
ata2.01: ATA-8: ST31000333AS, CC1H, max UDMA/133
ata2.01: 1953525168 sectors, multi 16: LBA48 NCQ (depth 0/32)
scsi 0:0:0:0: CD-ROM            SONY     DVD RW DW-Q30A   YYS2 PQ: 0 ANSI: 5
ata2.00: configured for UDMA/133
ata3: SATA link down (SStatus 0 SControl 300)
input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
ata2.01: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      HDT722525DLA380  V44O PQ: 0 ANSI: 5
scsi 1:0:1:0: Direct-Access     ATA      ST31000333AS     CC1H PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda:
sd 1:0:1:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 1:0:1:0: [sdb] Write Protect is off
sd 1:0:1:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sda1 sda2 < sdb1 sdb2 sdb3 sdb4
sd 1:0:1:0: [sdb] Attached SCSI disk
 sda5 >
sd 1:0:0:0: [sda] Attached SCSI disk
e1000: 0000:04:02.0: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b6
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
PCI: setting IRQ 11 as level-triggered
e1000 0000:04:02.1: found PCI INT B -> IRQ 11
e1000 0000:04:02.1: sharing IRQ 11 with 0000:00:1d.1
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: WDC WD1001FALS-00J7B1, 05.00K05, max UDMA/133
ata4.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 3:0:0:0: Direct-Access     ATA      WDC WD1001FALS-0 05.0 PQ: 0 ANSI: 5
sd 3:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdc: sdc1 sdc2 sdc3
sd 3:0:0:0: [sdc] Attached SCSI disk
e1000: 0000:04:02.1: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b7
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-8: ST32000542AS, CC34, max UDMA/133
ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
scsi 4:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
sd 4:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdd: sdd1
sd 4:0:0:0: [sdd] Attached SCSI disk
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata6.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133
scsi 5:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 5:0:0:0: [sde] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 5:0:0:0: [sde] Write Protect is off
sd 5:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde: sde1 sde2 sde3
sd 5:0:0:0: [sde] Attached SCSI disk
ata7: SATA link down (SStatus 0 SControl 300)
ata8: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata8.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata8.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata8.00: configured for UDMA/133
scsi 7:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 7:0:0:0: [sdf] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 7:0:0:0: [sdf] Write Protect is off
sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdf: sdf1 sdf2 sdf3
sd 7:0:0:0: [sdf] Attached SCSI disk
ata9: SATA link down (SStatus 0 SControl 300)
ata10: SATA link down (SStatus 0 SControl 300)
Uniform Multi-Platform E-IDE driver
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with writeback data mode.
udevd version 125 started
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
(astropci_init): +-------------------------------+
(astropci_init): |   ASTROPCI - Initialization   |
(astropci_init): +-------------------------------+
(astropci_probe): looking for ARC PCI boards ...
astropci 0000:06:02.0: found PCI INT A -> IRQ 10
(astropci_probe): ISR name: astropci0 device num: 0
IRQ 10/astropci0: IRQF_DISABLED is not guaranteed on shared IRQs
(astropci_probe): Successfully probed device 0, has_irq: 1, irq 10, func 16
(astropci_probe): finished looking for ARC PCI boards
Analogy: MITE: Available NI device IDs: 0x1880
Adding 2650684k swap on /dev/sda5.  Priority:-1 extents:1 across:2650684k 
EXT3 FS on sda1, internal journal
Xenomai: starting native API services.
e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
warning: `ntpd' uses 32-bit capabilities (legacy support in use)
Linux version 2.6.31.1 (root@fangorn) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 PREEMPT Sun Nov 22 23:24:43 PST 2009
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009a800 (usable)
 BIOS-e820: 000000000009a800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 00000000bff70000 (usable)
 BIOS-e820: 00000000bff70000 - 00000000bff77000 (ACPI data)
 BIOS-e820: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ff800000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fffffc00 - 0000000100000000 (reserved)
user-defined physical RAM map:
 user: 0000000000000000 - 000000000009a800 (usable)
 user: 000000000009a800 - 00000000000a0000 (reserved)
 user: 00000000000e4000 - 0000000000100000 (reserved)
 user: 0000000000100000 - 0000000040000000 (usable)
 user: 00000000bff70000 - 00000000bff77000 (ACPI data)
 user: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 user: 00000000bff80000 - 00000000c0000000 (reserved)
 user: 00000000e0000000 - 00000000f0000000 (reserved)
 user: 00000000fec00000 - 00000000fec10000 (reserved)
 user: 00000000fee00000 - 00000000fee01000 (reserved)
 user: 00000000ff800000 - 00000000ffc00000 (reserved)
 user: 00000000fffffc00 - 0000000100000000 (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0x40000 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-C7FFF write-protect
  C8000-DFFFF uncachable
  E0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000 mask F80000000 write-back
  1 base 080000000 mask FC0000000 write-back
  2 base 0BFF80000 mask FFFF80000 uncachable
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
Warning only 895MB will be used.
Use a HIGHMEM enabled kernel.
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000037fe4000
 0000000000 - 0000400000 page 4k
 0000400000 - 0037c00000 page 2M
 0037c00000 - 0037fe4000 page 4k
kernel direct mapping tables up to 37fe4000 @ 10000-15000
RAMDISK: 37e13000 - 37fef2b6
Allocated new RAMDISK: 00100000 - 002dc2b6
Move RAMDISK from 0000000037e13000 - 0000000037fef2b5 to 00100000 - 002dc2b5
895MB LOWMEM available.
  mapped low ram: 0 - 37fe4000
  low ram: 0 - 37fe4000
  node 0 low ram: 00000000 - 37fe4000
  node 0 bootmap 00011000 - 00018000
(7 early reservations) ==> bootmem [0000000000 - 0037fe4000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0001000000 - 00012bfc54]    TEXT DATA BSS ==> [0001000000 - 00012bfc54]
  #2 [000009a800 - 0000100000]    BIOS reserved ==> [000009a800 - 0000100000]
  #3 [00012c0000 - 00012c6170]              BRK ==> [00012c0000 - 00012c6170]
  #4 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #5 [0000100000 - 00002dc2b6]      NEW RAMDISK ==> [0000100000 - 00002dc2b6]
  #6 [0000011000 - 0000018000]          BOOTMAP ==> [0000011000 - 0000018000]
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00037fe4
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x00000100 -> 0x00037fe4
On node 0 totalpages: 229230
free_area_init_node: node 0, pgdat c125dee0, node_mem_map c12c7200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3946 pages, LIFO batch:0
  Normal zone: 1760 pages used for memmap
  Normal zone: 223492 pages, LIFO batch:31
Allocating PCI resources starting at 40000000 (gap: 40000000:7ff70000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227438
Kernel command line: root=UUID=a52cbb7c-6dc6-42cc-8080-031868242eba ro noht mem=2048M memmap=1024M                
PID hash table entries: 4096 (order: 12, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 904112k/917392k available (1890k kernel code, 12720k reserved, 539k data, 216k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffe6000 - 0xfffff000   ( 100 kB)
    vmalloc : 0xf87e4000 - 0xfffe4000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xf7fe4000   ( 895 MB)
      .init : 0xc1260000 - 0xc1296000   ( 216 kB)
      .data : 0xc11d892a - 0xc125f898   ( 539 kB)
      .text : 0xc1000000 - 0xc11d892a   (1890 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
NR_IRQS:16
Fast TSC calibration using PIT
Detected 3000.139 MHz processor.
I-pipe 2.4-06: pipeline enabled.
Console: colour VGA+ 80x25
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 6000.27 BogoMIPS (lpj=3000139)
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
mce: CPU supports 4 MCE banks
CPU: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd870, last bus=6
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:04.0: PME# supported from D0 D3hot D3cold
pci 0000:00:04.0: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x1840-0x185f]
pci 0000:00:1d.1: reg 20 io port: [0x1860-0x187f]
pci 0000:00:1d.2: reg 20 io port: [0x1880-0x189f]
pci 0000:00:1d.3: reg 20 io port: [0x18a0-0x18bf]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xd0000000-0xd00003ff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 1180-11bf claimed by ICH4 GPIO
pci 0000:00:1f.2: reg 10 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 14 io port: [0x00-0x03]
pci 0000:00:1f.2: reg 18 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 1c io port: [0x00-0x03]
pci 0000:00:1f.2: reg 20 io port: [0x18f0-0x18ff]
pci 0000:00:1f.3: reg 20 io port: [0x1100-0x111f]
pci 0000:00:1f.5: reg 10 io port: [0x1400-0x14ff]
pci 0000:00:1f.5: reg 14 io port: [0x1800-0x183f]
pci 0000:00:1f.5: reg 18 32bit mmio: [0xd0000c00-0xd0000dff]
pci 0000:00:1f.5: reg 1c 32bit mmio: [0xd0000800-0xd00008ff]
pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1f.5: PME# disabled
pci 0000:02:00.0: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.1: reg 10 32bit mmio: [0xd0100000-0xd0100fff]
pci 0000:02:00.2: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.2: PME# supported from D0 D3hot D3cold
pci 0000:02:00.2: PME# disabled
pci 0000:02:00.3: reg 10 32bit mmio: [0xd0101000-0xd0101fff]
pci 0000:00:03.0: bridge io port: [0x2000-0x3fff]
pci 0000:00:03.0: bridge 32bit mmio: [0xd0100000-0xd08fffff]
pci 0000:03:03.0: reg 10 64bit mmio: [0xd0200000-0xd02fffff]
pci 0000:03:03.0: reg 18 io port: [0x2000-0x20ff]
pci 0000:02:00.0: bridge io port: [0x2000-0x2fff]
pci 0000:02:00.0: bridge 32bit mmio: [0xd0200000-0xd07fffff]
pci 0000:04:01.0: reg 10 32bit mmio: [0xd0801000-0xd0801fff]
pci 0000:04:01.0: reg 14 32bit mmio: [0xd0800000-0xd0800fff]
pci 0000:04:02.0: reg 10 64bit mmio: [0xd0820000-0xd083ffff]
pci 0000:04:02.0: reg 20 io port: [0x3000-0x303f]
pci 0000:04:02.0: PME# supported from D0 D3hot D3cold
pci 0000:04:02.0: PME# disabled
pci 0000:04:02.1: reg 10 64bit mmio: [0xd0840000-0xd085ffff]
pci 0000:04:02.1: reg 20 io port: [0x3040-0x307f]
pci 0000:04:02.1: PME# supported from D0 D3hot D3cold
pci 0000:04:02.1: PME# disabled
pci 0000:02:00.2: bridge io port: [0x3000-0x3fff]
pci 0000:02:00.2: bridge 32bit mmio: [0xd0800000-0xd08fffff]
pci 0000:05:00.0: reg 10 32bit mmio: [0xd8000000-0xdfffffff]
pci 0000:05:00.0: reg 14 io port: [0x4000-0x40ff]
pci 0000:05:00.0: reg 18 32bit mmio: [0xd0900000-0xd090ffff]
pci 0000:05:00.0: reg 30 32bit mmio: [0x000000-0x01ffff]
pci 0000:05:00.0: supports D1 D2
pci 0000:05:00.1: reg 10 32bit mmio: [0xd0910000-0xd091ffff]
pci 0000:05:00.1: supports D1 D2
pci 0000:00:04.0: bridge io port: [0x4000-0x4fff]
pci 0000:00:04.0: bridge 32bit mmio: [0xd0900000-0xd09fffff]
pci 0000:00:04.0: bridge 64bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:06:02.0: reg 10 32bit mmio: [0xd0a00000-0xd0a0ffff]
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge 32bit mmio: [0xd0a00000-0xd0afffff]
pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:24d0]
PCI: setting IRQ 10 as level-triggered
pci 0000:00:1f.2: found PCI INT A -> IRQ 10
pci 0000:00:1f.2: sharing IRQ 10 with 0000:00:1d.2
pci 0000:00:1f.2: sharing IRQ 10 with 0000:04:02.0
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:02:00.0: PCI bridge, secondary bus 0000:03
pci 0000:02:00.0:   IO window: 0x2000-0x2fff
pci 0000:02:00.0:   MEM window: 0xd0200000-0xd07fffff
pci 0000:02:00.0:   PREFETCH window: disabled
pci 0000:02:00.2: PCI bridge, secondary bus 0000:04
pci 0000:02:00.2:   IO window: 0x3000-0x3fff
pci 0000:02:00.2:   MEM window: 0xd0800000-0xd08fffff
pci 0000:02:00.2:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x2000-0x3fff
pci 0000:00:03.0:   MEM window: 0xd0100000-0xd08fffff
pci 0000:00:03.0:   PREFETCH window: disabled
pci 0000:00:04.0: PCI bridge, secondary bus 0000:05
pci 0000:00:04.0:   IO window: 0x4000-0x4fff
pci 0000:00:04.0:   MEM window: 0xd0900000-0xd09fffff
pci 0000:00:04.0:   PREFETCH window: 0x000000d8000000-0x000000dfffffff
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
pci 0000:00:1e.0:   IO window: disabled
pci 0000:00:1e.0:   MEM window: 0xd0a00000-0xd0afffff
pci 0000:00:1e.0:   PREFETCH window: disabled
PCI: setting IRQ 5 as level-triggered
pci 0000:00:02.0: found PCI INT A -> IRQ 5
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:03.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:04.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:1d.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:00:1d.3
pci 0000:00:02.0: sharing IRQ 5 with 0000:03:03.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:04:01.0
pci 0000:00:02.0: sharing IRQ 5 with 0000:05:00.0
pci 0000:00:02.0: setting latency timer to 64
pci 0000:00:03.0: found PCI INT A -> IRQ 5
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:02.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:04.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:1d.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:00:1d.3
pci 0000:00:03.0: sharing IRQ 5 with 0000:03:03.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:04:01.0
pci 0000:00:03.0: sharing IRQ 5 with 0000:05:00.0
pci 0000:00:03.0: setting latency timer to 64
pci 0000:02:00.0: setting latency timer to 64
pci 0000:02:00.2: setting latency timer to 64
pci 0000:00:04.0: found PCI INT A -> IRQ 5
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:02.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:03.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:1d.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:00:1d.3
pci 0000:00:04.0: sharing IRQ 5 with 0000:03:03.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:04:01.0
pci 0000:00:04.0: sharing IRQ 5 with 0000:05:00.0
pci 0000:00:04.0: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:02: resource 0 io:  [0x2000-0x3fff]
pci_bus 0000:02: resource 1 mem: [0xd0100000-0xd08fffff]
pci_bus 0000:03: resource 0 io:  [0x2000-0x2fff]
pci_bus 0000:03: resource 1 mem: [0xd0200000-0xd07fffff]
pci_bus 0000:04: resource 0 io:  [0x3000-0x3fff]
pci_bus 0000:04: resource 1 mem: [0xd0800000-0xd08fffff]
pci_bus 0000:05: resource 0 io:  [0x4000-0x4fff]
pci_bus 0000:05: resource 1 mem: [0xd0900000-0xd09fffff]
pci_bus 0000:05: resource 2 pref mem [0xd8000000-0xdfffffff]
pci_bus 0000:06: resource 1 mem: [0xd0a00000-0xd0afffff]
pci_bus 0000:06: resource 3 io:  [0x00-0xffff]
pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Unpacking initramfs...
Freeing initrd memory: 1904k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
audit: initializing netlink socket (disabled)
type=2000 audit(1258995162.094:1): initialized
I-pipe: Domain Xenomai registered.
Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
msgmni has been set to 1769
io scheduler noop registered
io scheduler deadline registered (default)
pci 0000:05:00.0: Boot video device
pcieport-driver 0000:00:02.0: setting latency timer to 64
pcieport-driver 0000:00:03.0: setting latency timer to 64
pcieport-driver 0000:00:04.0: setting latency timer to 64
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Freeing unused kernel memory: 216k freed
input: AT Translated Set 2 keyboard as /class/input/input0
NET: Registered protocol family 1
Clocksource tsc unstable (delta = -289563990 ns)
Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e1000 0000:04:02.0: found PCI INT A -> IRQ 10
e1000 0000:04:02.0: sharing IRQ 10 with 0000:00:1d.2
e1000 0000:04:02.0: sharing IRQ 10 with 0000:00:1f.2
libata version 3.00 loaded.
ata_piix 0000:00:1f.2: version 2.13
ata_piix 0000:00:1f.2: found PCI INT A -> IRQ 10
ata_piix 0000:00:1f.2: sharing IRQ 10 with 0000:00:1d.2
ata_piix 0000:00:1f.2: sharing IRQ 10 with 0000:04:02.0
ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
ata_piix 0000:00:1f.2: setting latency timer to 64
sata_mv 0000:03:03.0: version 1.28
sata_mv 0000:03:03.0: found PCI INT A -> IRQ 5
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:02.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:03.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:04.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:1d.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:00:1d.3
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:04:01.0
sata_mv 0000:03:03.0: sharing IRQ 5 with 0000:05:00.0
sata_mv 0000:03:03.0: Gen-II 32 slots 8 ports SCSI mode IRQ via INTx
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x18f0 irq 14
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18f8 irq 15
scsi2 : sata_mv
scsi3 : sata_mv
scsi4 : sata_mv
scsi5 : sata_mv
scsi6 : sata_mv
scsi7 : sata_mv
scsi8 : sata_mv
scsi9 : sata_mv
ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 5
ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 5
ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 5
ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 5
ata7: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0232000 irq 5
ata8: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0234000 irq 5
ata9: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0236000 irq 5
ata10: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0238000 irq 5
ata2.00: ATA-7: HDT722525DLA380, V44OA96A, max UDMA/133
ata2.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: ATAPI: SONY    DVD RW DW-Q30A, YYS2, max UDMA/66
ata1.00: limited to UDMA/33 due to 40-wire cable
ata1.00: configured for UDMA/33
ata2.01: ATA-8: ST31000333AS, CC1H, max UDMA/133
ata2.01: 1953525168 sectors, multi 16: LBA48 NCQ (depth 0/32)
scsi 0:0:0:0: CD-ROM            SONY     DVD RW DW-Q30A   YYS2 PQ: 0 ANSI: 5
ata2.00: configured for UDMA/133
ata3: SATA link down (SStatus 0 SControl 300)
input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
ata2.01: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      HDT722525DLA380  V44O PQ: 0 ANSI: 5
scsi 1:0:1:0: Direct-Access     ATA      ST31000333AS     CC1H PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda:
sd 1:0:1:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 1:0:1:0: [sdb] Write Protect is off
sd 1:0:1:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sda1 sda2 < sdb1 sdb2 sdb3 sdb4
sd 1:0:1:0: [sdb] Attached SCSI disk
 sda5 >
sd 1:0:0:0: [sda] Attached SCSI disk
e1000: 0000:04:02.0: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b6
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
PCI: setting IRQ 11 as level-triggered
e1000 0000:04:02.1: found PCI INT B -> IRQ 11
e1000 0000:04:02.1: sharing IRQ 11 with 0000:00:1d.1
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: WDC WD1001FALS-00J7B1, 05.00K05, max UDMA/133
ata4.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 3:0:0:0: Direct-Access     ATA      WDC WD1001FALS-0 05.0 PQ: 0 ANSI: 5
sd 3:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdc: sdc1 sdc2 sdc3
sd 3:0:0:0: [sdc] Attached SCSI disk
e1000: 0000:04:02.1: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b7
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-8: ST32000542AS, CC34, max UDMA/133
ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
scsi 4:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
sd 4:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdd: sdd1
sd 4:0:0:0: [sdd] Attached SCSI disk
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata6.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133
scsi 5:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 5:0:0:0: [sde] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 5:0:0:0: [sde] Write Protect is off
sd 5:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde: sde1 sde2 sde3
sd 5:0:0:0: [sde] Attached SCSI disk
ata7: SATA link down (SStatus 0 SControl 300)
ata8: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata8.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata8.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata8.00: configured for UDMA/133
scsi 7:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 7:0:0:0: [sdf] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 7:0:0:0: [sdf] Write Protect is off
sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdf: sdf1 sdf2 sdf3
sd 7:0:0:0: [sdf] Attached SCSI disk
ata9: SATA link down (SStatus 0 SControl 300)
ata10: SATA link down (SStatus 0 SControl 300)
Uniform Multi-Platform E-IDE driver
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with writeback data mode.
udevd version 125 started
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
(astropci_init): +-------------------------------+
(astropci_init): |   ASTROPCI - Initialization   |
(astropci_init): +-------------------------------+
(astropci_probe): looking for ARC PCI boards ...
astropci 0000:06:02.0: found PCI INT A -> IRQ 10
(astropci_probe): ISR name: astropci0 device num: 0
IRQ 10/astropci0: IRQF_DISABLED is not guaranteed on shared IRQs
(astropci_probe): Successfully probed device 0, has_irq: 1, irq 10, func 16
(astropci_probe): finished looking for ARC PCI boards
Analogy: MITE: Available NI device IDs: 0x1880
Adding 2650684k swap on /dev/sda5.  Priority:-1 extents:1 across:2650684k 
EXT3 FS on sda1, internal journal
Xenomai: starting native API services.
e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
warning: `ntpd' uses 32-bit capabilities (legacy support in use)

after irq_test:
irq_test: before rtdm_irq_request
irq_test: after rtdm_irq_request (err = -22)
irq_test: before rtdm_irq_enable
irq_test: after rtdm_irq_enable (err = -22)

after analogy_config analogy0 analogy_ni_pcimio:

a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: found PCI INT A -> IRQ 5
mite 0000:04:01.0: sharing IRQ 5 with 0000:00:02.0
mite 0000:04:01.0: sharing IRQ 5 with 0000:00:03.0
mite 0000:04:01.0: sharing IRQ 5 with 0000:00:04.0
mite 0000:04:01.0: sharing IRQ 5 with 0000:00:1d.0
mite 0000:04:01.0: sharing IRQ 5 with 0000:00:1d.3
mite 0000:04:01.0: sharing IRQ 5 with 0000:03:03.0
mite 0000:04:01.0: sharing IRQ 5 with 0000:05:00.0
mite 0000:04:01.0: setting latency timer to 64
a4l: MITE: 0xd0801000 mapped to f8eec000 
a4l: DAQ: 0xd0800000 mapped to f8ef0000
a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
a4l: analogy_ni_pcimio: pcimio_attach: found irq 5
BUG: unable to handle kernel NULL pointer dereference at 00000004
IP: [<f8d4664b>] ni_E_init+0x22b/0xdf4 [analogy_ni_mio]
*pde = 00000000 
Oops: 0000 [#1] PREEMPT 
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy astropci xeno_rtdm ext3 jbd mbcache ide_pci_generic ide_core sata_mv ata_piix e1000 libata unix [last unloaded: scsi_wait_scan]

Pid: 3553, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
EIP: 0060:[<f8d4664b>] EFLAGS: 00010202 CPU: 0
EIP is at ni_E_init+0x22b/0xdf4 [analogy_ni_mio]
EAX: 00000000 EBX: f8ade280 ECX: f8d00328 EDX: 00000001
ESI: f8d00320 EDI: c0c003a0 EBP: f6aa7e40 ESP: f6aa7de4
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process analogy_config (pid: 3553, ti=f6aa6000 task=f7820720 task.ti=f6aa6000)
I-pipe domain Linux
Stack:
 c116536f f6aa7df0 c105775b f6aa7e0c 00000000 f8cfa220 00000000 00000001
<0> f8d00350 f8d00320 f6aa7e24 f8cfa5b3 00000001 f8cfd231 f8d00344 00000001
<0> f6aa7e40 f8cfb22e 00000001 f8d00320 00000005 c0c00380 c0c003a0 f6aa7e74
Call Trace:
 [<c116536f>] ? rthal_irq_enable+0x2f/0x40
 [<c105775b>] ? xnintr_enable+0xb/0x10
 [<f8cfa220>] ? a4l_handle_irq+0x0/0x20 [xeno_analogy]
 [<f8cfa5b3>] ? __a4l_request_irq+0x33/0x40 [xeno_analogy]
 [<f8cfb22e>] ? a4l_request_irq+0x6e/0x90 [xeno_analogy]
 [<f8d55e65>] ? pcimio_attach+0x4e5/0x600 [analogy_ni_pcimio]
 [<f8cf9280>] ? a4l_assign_driver+0x60/0x140 [xeno_analogy]
 [<f8cf958d>] ? a4l_device_attach+0x5d/0x80 [xeno_analogy]
 [<f8cf9847>] ? a4l_ioctl_devcfg+0x57/0x100 [xeno_analogy]
 [<f8cfb8e7>] ? a4l_rt_ioctl+0x37/0x40 [xeno_analogy]
 [<f8aca39c>] ? __rt_dev_ioctl+0xdc/0xf0 [xeno_rtdm]
 [<f8acc1db>] ? sys_rtdm_open+0x6b/0x80 [xeno_rtdm]
 [<f8acc118>] ? sys_rtdm_ioctl+0x28/0x30 [xeno_rtdm]
 [<c106348e>] ? losyscall_event+0xae/0x1a0
 [<c1053ff7>] ? __ipipe_dispatch_event+0xa7/0x1b0
 [<c10633e0>] ? losyscall_event+0x0/0x1a0
 [<c1011ead>] ? __ipipe_syscall_root+0x3d/0xd0
 [<c1002e1d>] ? system_call+0x2d/0x4f
Code: 38 40 5f d4 f8 89 da 89 f0 e8 82 40 fb ff 89 c2 83 f8 01 0f 85 3e fe ff ff 8b 46 74 8b 00 f6 40 3c 06 0f 84 c5 00 00 00 8b 46 14 <8b> 40 04 89 45 c0 8b 40 14 8b 40 04 85 c0 0f 84 ae 00 00 00 31 
EIP: [<f8d4664b>] ni_E_init+0x22b/0xdf4 [analogy_ni_mio] SS:ESP 0068:f6aa7de4
CR2: 0000000000000004
---[ end trace 5b999a04356eb4e6 ]---

[-- Attachment #3: kernel_config --]
[-- Type: application/octet-stream, Size: 39759 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.31.1
# Sun Nov 22 23:10:27 2009
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_32_LAZY_GS=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y

#
# RCU Subsystem
#
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=15
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
# CONFIG_GROUP_SCHED is not set
# CONFIG_CGROUPS is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_COUNTERS=y

#
# Performance Counters
#
# CONFIG_PERF_COUNTERS is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_API_DEBUG=y

#
# GCOV-based kernel profiling
#
# CONFIG_SLOW_WORK is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_BLOCK=y
CONFIG_LBDAF=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"

#
# Real-time sub-system
#
CONFIG_XENOMAI=y
CONFIG_XENO_GENERIC_STACKPOOL=y
CONFIG_XENO_FASTSYNCH=y
CONFIG_XENO_OPT_NUCLEUS=y
CONFIG_XENO_OPT_PERVASIVE=y
CONFIG_XENO_OPT_PRIOCPL=y
CONFIG_XENO_OPT_PIPELINE_HEAD=y
# CONFIG_XENO_OPT_SCHED_CLASSES is not set
CONFIG_XENO_OPT_PIPE=y
CONFIG_XENO_OPT_PIPE_NRDEV=32
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512
CONFIG_XENO_OPT_SYS_HEAPSZ=2048
CONFIG_XENO_OPT_SYS_STACKPOOLSZ=32
CONFIG_XENO_OPT_SEM_HEAPSZ=12
CONFIG_XENO_OPT_GLOBAL_SEM_HEAPSZ=12
CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
# CONFIG_XENO_OPT_SHIRQ is not set
CONFIG_XENO_OPT_SELECT=y

#
# Timing
#
# CONFIG_XENO_OPT_TIMING_PERIODIC is not set
CONFIG_XENO_OPT_TIMING_VIRTICK=1000
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0

#
# Scalability
#
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set
# CONFIG_XENO_OPT_TIMER_WHEEL is not set

#
# Machine
#
CONFIG_XENO_HW_FPU=y

#
# NMI watchdog
#

#
# SMI workaround
#
# CONFIG_XENO_HW_SMI_DETECT_DISABLE is not set
CONFIG_XENO_HW_SMI_DETECT=y
CONFIG_XENO_HW_SMI_WORKAROUND=y
CONFIG_XENO_HW_SMI_ALL=y

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=m
CONFIG_XENO_OPT_NATIVE_PERIOD=0
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=65536
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_BUFFER=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
CONFIG_XENO_OPT_NATIVE_INTR=y
CONFIG_XENO_SKIN_POSIX=m
CONFIG_XENO_OPT_POSIX_PERIOD=0
# CONFIG_XENO_OPT_POSIX_SHM is not set
# CONFIG_XENO_OPT_POSIX_INTR is not set
# CONFIG_XENO_OPT_POSIX_SELECT is not set
CONFIG_XENO_OPT_DEBUG_POSIX=y
# CONFIG_XENO_SKIN_PSOS is not set
# CONFIG_XENO_SKIN_UITRON is not set
# CONFIG_XENO_SKIN_VRTX is not set
# CONFIG_XENO_SKIN_VXWORKS is not set
# CONFIG_XENO_SKIN_RTAI is not set
# CONFIG_XENO_OPT_NOWARN_DEPRECATED is not set
CONFIG_XENO_SKIN_RTDM=m
CONFIG_XENO_OPT_RTDM_PERIOD=0
CONFIG_XENO_OPT_RTDM_FILDES=128
CONFIG_XENO_OPT_RTDM_SELECT=y

#
# Drivers
#

#
# Serial drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set

#
# Testing drivers
#
CONFIG_XENO_KLATENCY_MODULE=m
CONFIG_XENO_DRIVERS_TIMERBENCH=m
# CONFIG_XENO_DRIVERS_KLATENCY is not set
CONFIG_XENO_DRIVERS_IRQBENCH=m
CONFIG_XENO_DRIVERS_SWITCHTEST=m

#
# CAN drivers
#
# CONFIG_XENO_DRIVERS_CAN is not set

#
# ANALOGY drivers
#
CONFIG_XENO_DRIVERS_ANALOGY=m
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=0
# CONFIG_XENO_DRIVERS_ANALOGY_FAKE is not set
# CONFIG_XENO_DRIVERS_ANALOGY_LOOP is not set
CONFIG_XENO_DRIVERS_ANALOGY_8255=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_MITE=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_TIO=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_MIO=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_PCIMIO=m

#
# Real-time IPC drivers
#
# CONFIG_XENO_DRIVERS_RTIPC is not set
# CONFIG_FREEZER is not set

#
# Processor type and features
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_SMP is not set
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_RDC321X is not set
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_MEMTEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
CONFIG_MCORE2=y
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CPU=y
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_CYRIX_32=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_CPU_SUP_UMC_32=y
# CONFIG_X86_DS is not set
# CONFIG_HPET_TIMER is not set
CONFIG_DMI=y
# CONFIG_IOMMU_HELPER is not set
# CONFIG_IOMMU_API is not set
CONFIG_NR_CPUS=1
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_IPIPE=y
CONFIG_IPIPE_DOMAINS=4
CONFIG_IPIPE_COMPAT=y
CONFIG_IPIPE_DELAYED_ATOMICSW=y
# CONFIG_IPIPE_UNMASKED_CONTEXT_SWITCH is not set
# CONFIG_X86_UP_APIC is not set
CONFIG_X86_MCE=y
# CONFIG_X86_OLD_MCE is not set
CONFIG_X86_NEW_MCE=y
# CONFIG_X86_ANCIENT_MCE is not set
# CONFIG_X86_MCE_INJECT is not set
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_X86_CPU_DEBUG is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_X86_PAE is not set
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW_64K=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
# CONFIG_X86_PAT is not set
CONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
# CONFIG_SCHED_HRTICK is not set
# CONFIG_KEXEC is not set
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
CONFIG_COMPAT_VDSO=y
# CONFIG_CMDLINE_BOOL is not set

#
# Power management and ACPI options
#
# CONFIG_PM is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
# CONFIG_CPU_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
# CONFIG_PCI_GOOLPC is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
# CONFIG_PCIE_ECRC is not set
# CONFIG_PCIEAER_INJECT is not set
# CONFIG_PCIEASPM is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_STUB is not set
# CONFIG_PCI_IOV is not set
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
# CONFIG_OLPC is not set
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_HAVE_AOUT=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y
CONFIG_HAVE_ATOMIC_IOMAP=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=m
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_XFRM_MODE_BEET=m
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
# CONFIG_NF_CONNTRACK is not set
# CONFIG_NETFILTER_XTABLES is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV4 is not set
CONFIG_IP_NF_QUEUE=y
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
# CONFIG_BLK_DEV is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=m

#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_XFER_MODE=y
CONFIG_IDE_TIMINGS=y
CONFIG_IDE_ATAPI=y
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_IDE_GD=m
CONFIG_IDE_GD_ATA=y
# CONFIG_IDE_GD_ATAPI is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_PLATFORM is not set
CONFIG_BLK_DEV_CMD640=m
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=m
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_RZ1000=m
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_CS5536 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8172 is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
# CONFIG_BLK_DEV_IDEDMA is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_SATA_PMP=y
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
# CONFIG_SATA_SVW is not set
CONFIG_ATA_PIIX=m
CONFIG_SATA_MV=m
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_SCH is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#

#
# You can enable one or both FireWire driver stacks.
#

#
# See the help texts for more information.
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_ETHOC is not set
# CONFIG_DNET is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
CONFIG_8139TOO=m
CONFIG_8139TOO_PIO=y
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SMSC9420 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_KS8842 is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NET_POCKET is not set
# CONFIG_ATL2 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=m
# CONFIG_E1000E is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_DEVKMEM=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=m
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=m
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_CHARDEV is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_SIMTEC is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set

#
# Graphics adapter I2C/DDC channel drivers
#
# CONFIG_I2C_VOODOO3 is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_STUB is not set
# CONFIG_SCx200_ACB is not set

#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_SPI is not set

#
# PPS support
#
# CONFIG_PPS is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7473 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHER is not set
# CONFIG_SENSORS_FSCPOS is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_AB3100_CORE is not set
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set

#
# Graphics support
#
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
CONFIG_HID_DEBUG=y
# CONFIG_HIDRAW is not set
# CONFIG_HID_PID is not set

#
# Special HID drivers
#
# CONFIG_USB_SUPPORT is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set

#
# TI VLYNQ
#
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_ISCSI_IBFT_FIND is not set

#
# File systems
#
CONFIG_EXT2_FS=m
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
# CONFIG_EXT4_FS is not set
CONFIG_JBD=m
CONFIG_FS_MBCACHE=m
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
# CONFIG_FUSE_FS is not set

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
# CONFIG_DLM is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_UNUSED_SYMBOLS=y
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
# CONFIG_IPIPE_DEBUG is not set
# CONFIG_DEBUG_KERNEL is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FTRACE_SYSCALLS=y
CONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_STRICT_DEVMEM is not set
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_4KSTACKS is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_IOMMU_STRESS is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_OPTIMIZE_INLINING is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
# CONFIG_CRYPTO_FIPS is not set
CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_ALGAPI2=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_HASH2=m
# CONFIG_CRYPTO_MANAGER is not set
# CONFIG_CRYPTO_MANAGER2 is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
# CONFIG_CRYPTO_CBC is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
# CONFIG_VIRTUALIZATION is not set
# CONFIG_BINARY_PRINTF is not set

#
# Library routines
#
CONFIG_BITREVERSE=m
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_FIND_LAST_BIT=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=m
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-23 17:26       ` Ettore Pedretti
@ 2009-11-23 22:10         ` Alexis Berlemont
  2009-11-24 21:34           ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-23 22:10 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
> Hi,
> 
> It is finally working. here is the dmesg after I insert a module:
> 
> irq_test: before rtdm_irq_request
> irq_test: after rtdm_irq_request (err = -22)
> irq_test: before rtdm_irq_enable
> irq_test: after rtdm_irq_enable (err = -22)

rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So, the 
irq 48 turns into the irq 5;

> Attached are a complete call-stack dump and my present kernel
>  configuration.

With the fact that there is still a NULL pointer bug without IO APIC, the bug 
is bound to be located in analogy. There may be some wrong write access on the 
interrupt structure.

I will come back with a patch which dumps the structure's content at various 
locations in the attach code.

> Cheers
> Ettore

> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> > Hi,
> >
> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid> 
wrote:
> >> Hi,
> >>
> >> I have compiled the module using this makefile:
> >>
> >> prefix := $(shell /usr/bin/xeno-config --prefix)
> >> obj-m   := irqTest.o
> >>
> >> ifeq ($(prefix),)
> >> $(error Please add <xeno-install>/bin to your PATH variable)
> >> endif
> >>
> >> KDIR    := /lib/modules/$(shell uname -r)/build
> >> PWD     := $(shell pwd)
> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
> >>
> >>
> >> all: default
> >>
> >> default:
> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> >>
> >> install:
> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
> >>
> >> clean:
> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
> >>
> >> The module seems to compiles fine:
> >>
> >> make -C /lib/modules/2.6.31.1/build
> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
> >>  Building modules, stage 2.
> >>  MODPOST 1 modules
> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
> >>
> >> To make sure module dependencies are in place I modprobe irqbench
> >> (probably not necessary).
> >>
> >> modprobe xeno_irqbench
> >>
> >> All the loaded modules:
> >>
> >> fangorn:~# lsmod
> >> Module                  Size  Used by
> >> xeno_irqbench           5152  0
> >> xeno_native            83296  0
> >> analogy_ni_pcimio      15676  0
> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
> >> analogy_ni_tio         21724  1 analogy_ni_mio
> >> analogy_8255            4060  1 analogy_ni_mio
> >> analogy_ni_mite         9980  3
> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy          
> >> 38876  5
> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_
> >>mite xeno_rtdm              24244  3
> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci               10968
> >>  0
> >> ext3                  112900  1
> >> jbd                    44016  1 ext3
> >> mbcache                 6652  1 ext3
> >> ide_pci_generic         3712  0
> >> ide_core               79388  1 ide_pci_generic
> >> e1000                 118204  0
> >> ata_piix               15968  2
> >> sata_mv                27632  0
> >> libata                151468  2 ata_piix,sata_mv
> >> unix                   24460  10
> >>
> >>
> >> When I insert the module it complains about missing symbols:
> >>
> >> insmod irqTest.ko
> >>
> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
> >>
> >> dmesg:
> >>
> >> irqTest: module license 'unspecified' taints kernel.
> >> Disabling lock debugging due to kernel taint
> >> irqTest: Unknown symbol xnintr_enable
> >> irqTest: Unknown symbol xnintr_detach
> >>
> >> What am I doing wrong?
> >
> > It's me who did wrong. I just tested the compilation inside the kernel.
> >
> > xnintr_* symbols are only exported for GPL compliant modules. So,
> > could you add the following line in the test module:
> > MODULE_LICENSE("GPL");
> >
> > With that, the insmod operation should work.
> >
> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same problem.
> >
> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
> >
> >> Cheers
> >> Ettore
> >>
> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
> >>> Hi,
> >>>
> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
> >>>> Hello,
> >>>>
> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
> >>>> the comedi drivers for Xenomai for a NI PCI-6711 function generator
> >>>> board.
> >>>>
> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
> >>>> the following:
> >>>>
> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
> >>>> cmd_write: basic descriptor retrieved
> >>>>        subdevices count = 0
> >>>>        read subdevice index = 0
> >>>>        write subdevice index = 0
> >>>> cmd_write: a4l_get_desc failed (ret=-22)
> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
> >>>> 0x0804d008 ***
> >>>> ======= Backtrace: =========
> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
> >>>> cmd_write[0x804927c]
> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
> >>>> cmd_write[0x8048b01]
> >>>> ======= Memory map: ========
> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250  
> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p 00156000
> >>>> 08:01 6144250    /lib/i686/cmov/libc-2.7.so b7f3c000-b7f3f000 rw-p
> >>>> 00000000 00:00 0
> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
> >>>> /lib/i686/cmov/libpthread-2.7.so
> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
> >>>> /lib/i686/cmov/libpthread-2.7.so
> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118  
> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p 00000000
> >>>> 00:00 0
> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp 00000000
> >>>> 08:01 10808112   /usr/lib/libanalogy.so.1.0.0 b7f67000-b7f68000 rw-p
> >>>> 00002000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> >>>> Aborted
> >>>>
> >>>> This is probably because the device /dev/analogy0 does not exist.
> >>>>
> >>>> This is the output of uname -a
> >>>>
> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
> >>>> i686 GNU/Linux
> >>>>
> >>>> And these are the relevant entries in dmesg
> >>>>
> >>>> dmesg:
> >>>>
> >>>> I-pipe 2.4-06: pipeline enabled.
> >>>> I-pipe: Domain Xenomai registered.
> >>>>
> >>>> Xenomai: hal/i386 started.
> >>>> Xenomai: scheduling class idle registered.
> >>>> Xenomai: scheduling class rt registered.
> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
> >>>> Xenomai: SMI-enabled chipset found
> >>>> Xenomai: SMI workaround enabled
> >>>> Xenomai: starting RTDM services.
> >>>> Xenomai: starting native API services.
> >>>> Analogy: MITE: Available NI device IDs: 0x1880
> >>>>
> >>>> result of lspci for the relevant board:
> >>>>
> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
> >>>>
> >>>> And lsmod:
> >>>>
> >>>> Module                  Size  Used by
> >>>> xeno_native           105088  0
> >>>> analogy_ni_pcimio      15644  0
> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
> >>>> analogy_8255            3900  1 analogy_ni_mio
> >>>> analogy_ni_mite        10140  3
> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >>>>  40220  5
> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_n
> >>>>i_mit e xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
> >>>> astropci               10944  0
> >>>> ext3                  109636  1
> >>>> jbd                    43920  1 ext3
> >>>> mbcache                 6272  1 ext3
> >>>> ide_pci_generic         3712  0
> >>>> ide_core               74204  1 ide_pci_generic
> >>>> ata_piix               15748  2
> >>>> sata_mv                26448  0
> >>>> e1000                 114208  0
> >>>> libata                142156  2 ata_piix,sata_mv
> >>>> unix                   22992  10
> >>>>
> >>>>
> >>>> According to this post:
> >>>> http://www.mail-archive.com/xenomai@xenomai.org
> >>>>
> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
> >>>>
> >>>> fangorn:~# cat /proc/analogy/drivers
> >>>> --  Analogy drivers --
> >>>>
> >>>> | idx | driver name
> >>>> |  00 | analogy_ni_pcimio
> >>>> |  01 | analogy_8255
> >>>>
> >>>> There are two entries and the drivers are not attached:
> >>>>
> >>>> fangorn:~# cat /proc/analogy/devices
> >>>> --  Analogy devices --
> >>>>
> >>>> | idx | status | driver
> >>>> |  00 | Unused | No driver
> >>>> |  01 | Unused | No driver
> >>>> |  02 | Unused | No driver
> >>>> |  03 | Unused | No driver
> >>>> |  04 | Unused | No driver
> >>>> |  05 | Unused | No driver
> >>>> |  06 | Unused | No driver
> >>>> |  07 | Unused | No driver
> >>>> |  08 | Unused | No driver
> >>>> |  09 | Unused | No driver
> >>>>
> >>>> I'm aware of the name change of the drivers:
> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
> >>>>
> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
> >>>> >- 8255 becomes analogy_8255.
> >>>> >Consequently, the command line to attach these drivers has
> >>>> >changed. Starting from now, we have to type:
> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)
> >>>>
> >>>> This is what happens when I try to attach the driver to de device:
> >>>>
> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:last sysfs file:
> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> >>>> task.ti=f64cc000)
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:I-pipe domain Linux
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:Stack:
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:Call Trace:
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
> >>>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>>> SS:ESP 0068:f64cddc8
> >>>>
> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>  kernel:CR2: 0000000000000004
> >>>>
> >>>>
> >>>> relevant dmeg:
> >>>>
> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> >>>> mite 0000:04:01.0: setting latency timer to 64
> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>>> *pde = 00000000
> >>>> Oops: 0000 [#1] PREEMPT SMP
> >>>> last sysfs file:
> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules linked
> >>>> in: xeno_native analogy_ni_pcimio analogy_ni_mio analogy_ni_tio
> >>>> analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm astropci ext3 jbd
> >>>> mbcache ide_pci_generic ide_core ata_piix sata_mv e1000 libata unix
> >>>> [last unloaded: scsi_wait_scan]
> >>>>
> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> >>>>  task.ti=f64cc000) I-pipe domain Linux
> >>>> Stack:
> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
> >>>> 00000001 f8c31e60 00000030 Call Trace:
> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
> >>>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
> >>>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
> >>>>  0068:f64cddc8 CR2: 0000000000000004
> >>>> ---[ end trace c887d49bb5e86cf4 ]---
> >>>
> >>> Thanks for such a great report.
> >>>
> >>> I keep two things in mind:
> >>> - cmd_write's error handling path is not buggy (that was already in my
> >>> todo list). I will fix that as soon as possible.
> >>>
> >>> - according to the call-stack dump you made, the irq handler
> >>> registering seems to be the source of the trouble. What strikes me is
> >>> that the oops occurred very low (unmask_IO_APIC_irq: we are no more in
> >>> the analogy layer).
> >>>
> >>> In order to be sure that the problem is located in analogy, it would be
> >>> great to test that calling rtdm_request_irq(... , 48, ...) does not
> >>> trigger the bug.
> >>>
> >>> Here is a little test module you could try to insmod. If you do not
> >>> want to bother finding out how to compile it, you can replace the code
> >>> of an existing rtdm driver (for example:
> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
> >>>
> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in your
> >>> kernel configuration (in "Processor type and features", disable the SMP
> >>> option and disable "IO APIC" under "Local APIC").
> >>>
> >>> #include <linux/version.h>
> >>> #include <linux/module.h>
> >>> #include <linux/ioport.h>
> >>>
> >>> #include <rtdm/rtdm_driver.h>
> >>>
> >>>
> >>> int test_handler(rtdm_irq_t *irq_handle)
> >>> {
> >>>
> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
> >>>
> >>>        return RTDM_IRQ_HANDLED;
> >>> }
> >>>
> >>> static rtdm_irq_t handle;
> >>>
> >>> static int __init __test_init(void)
> >>> {
> >>>
> >>>        int err;
> >>>
> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
> >>>
> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0, "test_irq",
> >>> NULL);
> >>>
> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
> >>> err);
> >>>
> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
> >>>
> >>>        err = rtdm_irq_enable(&handle);
> >>>
> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
> >>> err);
> >>>
> >>>
> >>>        return err;
> >>> }
> >>>
> >>> static void __exit __test_exit(void)
> >>> {
> >>>
> >>>        rtdm_irq_free(&handle);
> >>>
> >>> }
> >>>
> >>> module_init(__test_init);
> >>> module_exit(__test_exit);
> >>>
> >>>> Can anyone help?
> >>>>
> >>>> Best regards
> >>>> Ettore Pedretti
> >
> > Alexis.
> 

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-23 22:10         ` Alexis Berlemont
@ 2009-11-24 21:34           ` Ettore Pedretti
  2009-11-24 22:51             ` Alexis Berlemont
  2009-11-24 22:57             ` Alexis Berlemont
  0 siblings, 2 replies; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-24 21:34 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

Hi,

Would it help at this stage if I re-enable IO APIC, run your program
and send you the call-stack dump? I am willing to test your patch on
our hardware as soon as you got one ready, if that can be of help.

Cheers
Ettore

2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> Hi,
>
> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>> Hi,
>>
>> It is finally working. here is the dmesg after I insert a module:
>>
>> irq_test: before rtdm_irq_request
>> irq_test: after rtdm_irq_request (err = -22)
>> irq_test: before rtdm_irq_enable
>> irq_test: after rtdm_irq_enable (err = -22)
>
> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So, the
> irq 48 turns into the irq 5;
>
>> Attached are a complete call-stack dump and my present kernel
>>  configuration.
>
> With the fact that there is still a NULL pointer bug without IO APIC, the bug
> is bound to be located in analogy. There may be some wrong write access on the
> interrupt structure.
>
> I will come back with a patch which dumps the structure's content at various
> locations in the attach code.
>
>> Cheers
>> Ettore
>
>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> > Hi,
>> >
>> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
> wrote:
>> >> Hi,
>> >>
>> >> I have compiled the module using this makefile:
>> >>
>> >> prefix := $(shell /usr/bin/xeno-config --prefix)
>> >> obj-m   := irqTest.o
>> >>
>> >> ifeq ($(prefix),)
>> >> $(error Please add <xeno-install>/bin to your PATH variable)
>> >> endif
>> >>
>> >> KDIR    := /lib/modules/$(shell uname -r)/build
>> >> PWD     := $(shell pwd)
>> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>> >>
>> >>
>> >> all: default
>> >>
>> >> default:
>> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>> >>
>> >> install:
>> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>> >>
>> >> clean:
>> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>> >>
>> >> The module seems to compiles fine:
>> >>
>> >> make -C /lib/modules/2.6.31.1/build
>> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>> >>  Building modules, stage 2.
>> >>  MODPOST 1 modules
>> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>> >>
>> >> To make sure module dependencies are in place I modprobe irqbench
>> >> (probably not necessary).
>> >>
>> >> modprobe xeno_irqbench
>> >>
>> >> All the loaded modules:
>> >>
>> >> fangorn:~# lsmod
>> >> Module                  Size  Used by
>> >> xeno_irqbench           5152  0
>> >> xeno_native            83296  0
>> >> analogy_ni_pcimio      15676  0
>> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
>> >> analogy_ni_tio         21724  1 analogy_ni_mio
>> >> analogy_8255            4060  1 analogy_ni_mio
>> >> analogy_ni_mite         9980  3
>> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>> >> 38876  5
>> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_ni_
>> >>mite xeno_rtdm              24244  3
>> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci               10968
>> >>  0
>> >> ext3                  112900  1
>> >> jbd                    44016  1 ext3
>> >> mbcache                 6652  1 ext3
>> >> ide_pci_generic         3712  0
>> >> ide_core               79388  1 ide_pci_generic
>> >> e1000                 118204  0
>> >> ata_piix               15968  2
>> >> sata_mv                27632  0
>> >> libata                151468  2 ata_piix,sata_mv
>> >> unix                   24460  10
>> >>
>> >>
>> >> When I insert the module it complains about missing symbols:
>> >>
>> >> insmod irqTest.ko
>> >>
>> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>> >>
>> >> dmesg:
>> >>
>> >> irqTest: module license 'unspecified' taints kernel.
>> >> Disabling lock debugging due to kernel taint
>> >> irqTest: Unknown symbol xnintr_enable
>> >> irqTest: Unknown symbol xnintr_detach
>> >>
>> >> What am I doing wrong?
>> >
>> > It's me who did wrong. I just tested the compilation inside the kernel.
>> >
>> > xnintr_* symbols are only exported for GPL compliant modules. So,
>> > could you add the following line in the test module:
>> > MODULE_LICENSE("GPL");
>> >
>> > With that, the insmod operation should work.
>> >
>> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same problem.
>> >
>> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
>> >
>> >> Cheers
>> >> Ettore
>> >>
>> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>> >>> Hi,
>> >>>
>> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>> >>>> Hello,
>> >>>>
>> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to use
>> >>>> the comedi drivers for Xenomai for a NI PCI-6711 function generator
>> >>>> board.
>> >>>>
>> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>> >>>> the following:
>> >>>>
>> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>> >>>> cmd_write: basic descriptor retrieved
>> >>>>        subdevices count = 0
>> >>>>        read subdevice index = 0
>> >>>>        write subdevice index = 0
>> >>>> cmd_write: a4l_get_desc failed (ret=-22)
>> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>> >>>> 0x0804d008 ***
>> >>>> ======= Backtrace: =========
>> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>> >>>> cmd_write[0x804927c]
>> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>> >>>> cmd_write[0x8048b01]
>> >>>> ======= Memory map: ========
>> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p 00156000
>> >>>> 08:01 6144250    /lib/i686/cmov/libc-2.7.so b7f3c000-b7f3f000 rw-p
>> >>>> 00000000 00:00 0
>> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>> >>>> /lib/i686/cmov/libpthread-2.7.so
>> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>> >>>> /lib/i686/cmov/libpthread-2.7.so
>> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p 00000000
>> >>>> 00:00 0
>> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp 00000000
>> >>>> 08:01 10808112   /usr/lib/libanalogy.so.1.0.0 b7f67000-b7f68000 rw-p
>> >>>> 00002000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>> >>>> Aborted
>> >>>>
>> >>>> This is probably because the device /dev/analogy0 does not exist.
>> >>>>
>> >>>> This is the output of uname -a
>> >>>>
>> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>> >>>> i686 GNU/Linux
>> >>>>
>> >>>> And these are the relevant entries in dmesg
>> >>>>
>> >>>> dmesg:
>> >>>>
>> >>>> I-pipe 2.4-06: pipeline enabled.
>> >>>> I-pipe: Domain Xenomai registered.
>> >>>>
>> >>>> Xenomai: hal/i386 started.
>> >>>> Xenomai: scheduling class idle registered.
>> >>>> Xenomai: scheduling class rt registered.
>> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
>> >>>> Xenomai: SMI-enabled chipset found
>> >>>> Xenomai: SMI workaround enabled
>> >>>> Xenomai: starting RTDM services.
>> >>>> Xenomai: starting native API services.
>> >>>> Analogy: MITE: Available NI device IDs: 0x1880
>> >>>>
>> >>>> result of lspci for the relevant board:
>> >>>>
>> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
>> >>>>
>> >>>> And lsmod:
>> >>>>
>> >>>> Module                  Size  Used by
>> >>>> xeno_native           105088  0
>> >>>> analogy_ni_pcimio      15644  0
>> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
>> >>>> analogy_8255            3900  1 analogy_ni_mio
>> >>>> analogy_ni_mite        10140  3
>> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>> >>>>  40220  5
>> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_n
>> >>>>i_mit e xeno_rtdm              28436  2 analogy_ni_mio,xeno_analogy
>> >>>> astropci               10944  0
>> >>>> ext3                  109636  1
>> >>>> jbd                    43920  1 ext3
>> >>>> mbcache                 6272  1 ext3
>> >>>> ide_pci_generic         3712  0
>> >>>> ide_core               74204  1 ide_pci_generic
>> >>>> ata_piix               15748  2
>> >>>> sata_mv                26448  0
>> >>>> e1000                 114208  0
>> >>>> libata                142156  2 ata_piix,sata_mv
>> >>>> unix                   22992  10
>> >>>>
>> >>>>
>> >>>> According to this post:
>> >>>> http://www.mail-archive.com/xenomai@xenomai.org
>> >>>>
>> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
>> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>> >>>>
>> >>>> fangorn:~# cat /proc/analogy/drivers
>> >>>> --  Analogy drivers --
>> >>>>
>> >>>> | idx | driver name
>> >>>> |  00 | analogy_ni_pcimio
>> >>>> |  01 | analogy_8255
>> >>>>
>> >>>> There are two entries and the drivers are not attached:
>> >>>>
>> >>>> fangorn:~# cat /proc/analogy/devices
>> >>>> --  Analogy devices --
>> >>>>
>> >>>> | idx | status | driver
>> >>>> |  00 | Unused | No driver
>> >>>> |  01 | Unused | No driver
>> >>>> |  02 | Unused | No driver
>> >>>> |  03 | Unused | No driver
>> >>>> |  04 | Unused | No driver
>> >>>> |  05 | Unused | No driver
>> >>>> |  06 | Unused | No driver
>> >>>> |  07 | Unused | No driver
>> >>>> |  08 | Unused | No driver
>> >>>> |  09 | Unused | No driver
>> >>>>
>> >>>> I'm aware of the name change of the drivers:
>> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>> >>>>
>> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
>> >>>> >- 8255 becomes analogy_8255.
>> >>>> >Consequently, the command line to attach these drivers has
>> >>>> >changed. Starting from now, we have to type:
>> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of a4l_pcimio)
>> >>>>
>> >>>> This is what happens when I try to attach the driver to de device:
>> >>>>
>> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:last sysfs file:
>> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>> >>>> task.ti=f64cc000)
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:I-pipe domain Linux
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:Stack:
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:Call Trace:
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>> >>>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> >>>> SS:ESP 0068:f64cddc8
>> >>>>
>> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >>>>  kernel:CR2: 0000000000000004
>> >>>>
>> >>>>
>> >>>> relevant dmeg:
>> >>>>
>> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>> >>>> mite 0000:04:01.0: setting latency timer to 64
>> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> >>>> *pde = 00000000
>> >>>> Oops: 0000 [#1] PREEMPT SMP
>> >>>> last sysfs file:
>> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules linked
>> >>>> in: xeno_native analogy_ni_pcimio analogy_ni_mio analogy_ni_tio
>> >>>> analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm astropci ext3 jbd
>> >>>> mbcache ide_pci_generic ide_core ata_piix sata_mv e1000 libata unix
>> >>>> [last unloaded: scsi_wait_scan]
>> >>>>
>> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>> >>>>  task.ti=f64cc000) I-pipe domain Linux
>> >>>> Stack:
>> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>> >>>> 00000001 f8c31e60 00000030 Call Trace:
>> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
>> >>>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
>> >>>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>> >>>>  0068:f64cddc8 CR2: 0000000000000004
>> >>>> ---[ end trace c887d49bb5e86cf4 ]---
>> >>>
>> >>> Thanks for such a great report.
>> >>>
>> >>> I keep two things in mind:
>> >>> - cmd_write's error handling path is not buggy (that was already in my
>> >>> todo list). I will fix that as soon as possible.
>> >>>
>> >>> - according to the call-stack dump you made, the irq handler
>> >>> registering seems to be the source of the trouble. What strikes me is
>> >>> that the oops occurred very low (unmask_IO_APIC_irq: we are no more in
>> >>> the analogy layer).
>> >>>
>> >>> In order to be sure that the problem is located in analogy, it would be
>> >>> great to test that calling rtdm_request_irq(... , 48, ...) does not
>> >>> trigger the bug.
>> >>>
>> >>> Here is a little test module you could try to insmod. If you do not
>> >>> want to bother finding out how to compile it, you can replace the code
>> >>> of an existing rtdm driver (for example:
>> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>> >>>
>> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in your
>> >>> kernel configuration (in "Processor type and features", disable the SMP
>> >>> option and disable "IO APIC" under "Local APIC").
>> >>>
>> >>> #include <linux/version.h>
>> >>> #include <linux/module.h>
>> >>> #include <linux/ioport.h>
>> >>>
>> >>> #include <rtdm/rtdm_driver.h>
>> >>>
>> >>>
>> >>> int test_handler(rtdm_irq_t *irq_handle)
>> >>> {
>> >>>
>> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
>> >>>
>> >>>        return RTDM_IRQ_HANDLED;
>> >>> }
>> >>>
>> >>> static rtdm_irq_t handle;
>> >>>
>> >>> static int __init __test_init(void)
>> >>> {
>> >>>
>> >>>        int err;
>> >>>
>> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>> >>>
>> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0, "test_irq",
>> >>> NULL);
>> >>>
>> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>> >>> err);
>> >>>
>> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>> >>>
>> >>>        err = rtdm_irq_enable(&handle);
>> >>>
>> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>> >>> err);
>> >>>
>> >>>
>> >>>        return err;
>> >>> }
>> >>>
>> >>> static void __exit __test_exit(void)
>> >>> {
>> >>>
>> >>>        rtdm_irq_free(&handle);
>> >>>
>> >>> }
>> >>>
>> >>> module_init(__test_init);
>> >>> module_exit(__test_exit);
>> >>>
>> >>>> Can anyone help?
>> >>>>
>> >>>> Best regards
>> >>>> Ettore Pedretti
>> >
>> > Alexis.
>>
>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44 1334 461669, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-24 21:34           ` Ettore Pedretti
@ 2009-11-24 22:51             ` Alexis Berlemont
  2009-11-24 22:57             ` Alexis Berlemont
  1 sibling, 0 replies; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-24 22:51 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

[-- Attachment #1: Type: Text/Plain, Size: 20183 bytes --]

Hi,

On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
> Hi,
> 
> Would it help at this stage if I re-enable IO APIC, run your program
> and send you the call-stack dump? I am willing to test your patch on
> our hardware as soon as you got one ready, if that can be of help.
> 
> Cheers
> Ettore
> 

Please, find the patch attached (this patch is against the tag v2.5-rc4).

Many thanks for your time.

> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> > Hi,
> >
> > On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
> >> Hi,
> >>
> >> It is finally working. here is the dmesg after I insert a module:
> >>
> >> irq_test: before rtdm_irq_request
> >> irq_test: after rtdm_irq_request (err = -22)
> >> irq_test: before rtdm_irq_enable
> >> irq_test: after rtdm_irq_enable (err = -22)
> >
> > rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
> > the irq 48 turns into the irq 5;
> >
> >> Attached are a complete call-stack dump and my present kernel
> >>  configuration.
> >
> > With the fact that there is still a NULL pointer bug without IO APIC, the
> > bug is bound to be located in analogy. There may be some wrong write
> > access on the interrupt structure.
> >
> > I will come back with a patch which dumps the structure's content at
> > various locations in the attach code.
> >
> >> Cheers
> >> Ettore
> >>
> >> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >> > Hi,
> >> >
> >> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
> >
> > wrote:
> >> >> Hi,
> >> >>
> >> >> I have compiled the module using this makefile:
> >> >>
> >> >> prefix := $(shell /usr/bin/xeno-config --prefix)
> >> >> obj-m   := irqTest.o
> >> >>
> >> >> ifeq ($(prefix),)
> >> >> $(error Please add <xeno-install>/bin to your PATH variable)
> >> >> endif
> >> >>
> >> >> KDIR    := /lib/modules/$(shell uname -r)/build
> >> >> PWD     := $(shell pwd)
> >> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
> >> >>
> >> >>
> >> >> all: default
> >> >>
> >> >> default:
> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> >> >>
> >> >> install:
> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
> >> >>
> >> >> clean:
> >> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
> >> >>
> >> >> The module seems to compiles fine:
> >> >>
> >> >> make -C /lib/modules/2.6.31.1/build
> >> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
> >> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
> >> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
> >> >>  Building modules, stage 2.
> >> >>  MODPOST 1 modules
> >> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
> >> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
> >> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
> >> >>
> >> >> To make sure module dependencies are in place I modprobe irqbench
> >> >> (probably not necessary).
> >> >>
> >> >> modprobe xeno_irqbench
> >> >>
> >> >> All the loaded modules:
> >> >>
> >> >> fangorn:~# lsmod
> >> >> Module                  Size  Used by
> >> >> xeno_irqbench           5152  0
> >> >> xeno_native            83296  0
> >> >> analogy_ni_pcimio      15676  0
> >> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
> >> >> analogy_ni_tio         21724  1 analogy_ni_mio
> >> >> analogy_8255            4060  1 analogy_ni_mio
> >> >> analogy_ni_mite         9980  3
> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >> >> 38876  5
> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
> >> >>ni_ mite xeno_rtdm              24244  3
> >> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci              
> >> >> 10968 0
> >> >> ext3                  112900  1
> >> >> jbd                    44016  1 ext3
> >> >> mbcache                 6652  1 ext3
> >> >> ide_pci_generic         3712  0
> >> >> ide_core               79388  1 ide_pci_generic
> >> >> e1000                 118204  0
> >> >> ata_piix               15968  2
> >> >> sata_mv                27632  0
> >> >> libata                151468  2 ata_piix,sata_mv
> >> >> unix                   24460  10
> >> >>
> >> >>
> >> >> When I insert the module it complains about missing symbols:
> >> >>
> >> >> insmod irqTest.ko
> >> >>
> >> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
> >> >>
> >> >> dmesg:
> >> >>
> >> >> irqTest: module license 'unspecified' taints kernel.
> >> >> Disabling lock debugging due to kernel taint
> >> >> irqTest: Unknown symbol xnintr_enable
> >> >> irqTest: Unknown symbol xnintr_detach
> >> >>
> >> >> What am I doing wrong?
> >> >
> >> > It's me who did wrong. I just tested the compilation inside the
> >> > kernel.
> >> >
> >> > xnintr_* symbols are only exported for GPL compliant modules. So,
> >> > could you add the following line in the test module:
> >> > MODULE_LICENSE("GPL");
> >> >
> >> > With that, the insmod operation should work.
> >> >
> >> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
> >> >> problem.
> >> >
> >> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
> >> >
> >> >> Cheers
> >> >> Ettore
> >> >>
> >> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
> >> >>> Hi,
> >> >>>
> >> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
> >> >>>> Hello,
> >> >>>>
> >> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
> >> >>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
> >> >>>> generator board.
> >> >>>>
> >> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
> >> >>>> the following:
> >> >>>>
> >> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
> >> >>>> cmd_write: basic descriptor retrieved
> >> >>>>        subdevices count = 0
> >> >>>>        read subdevice index = 0
> >> >>>>        write subdevice index = 0
> >> >>>> cmd_write: a4l_get_desc failed (ret=-22)
> >> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
> >> >>>> 0x0804d008 ***
> >> >>>> ======= Backtrace: =========
> >> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
> >> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
> >> >>>> cmd_write[0x804927c]
> >> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
> >> >>>> cmd_write[0x8048b01]
> >> >>>> ======= Memory map: ========
> >> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
> >> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
> >> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
> >> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
> >> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
> >> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
> >> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
> >> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
> >> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
> >> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
> >> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
> >> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
> >> >>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> >> >>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
> >> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
> >> >>>> /lib/i686/cmov/libpthread-2.7.so
> >> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
> >> >>>> /lib/i686/cmov/libpthread-2.7.so
> >> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
> >> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
> >> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
> >> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
> >> >>>> 00000000 00:00 0
> >> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
> >> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
> >> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
> >> >>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
> >> >>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112  
> >> >>>> /usr/lib/libanalogy.so.1.0.0
> >> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
> >> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
> >> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
> >> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
> >> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
> >> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
> >> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> >> >>>> Aborted
> >> >>>>
> >> >>>> This is probably because the device /dev/analogy0 does not exist.
> >> >>>>
> >> >>>> This is the output of uname -a
> >> >>>>
> >> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
> >> >>>> i686 GNU/Linux
> >> >>>>
> >> >>>> And these are the relevant entries in dmesg
> >> >>>>
> >> >>>> dmesg:
> >> >>>>
> >> >>>> I-pipe 2.4-06: pipeline enabled.
> >> >>>> I-pipe: Domain Xenomai registered.
> >> >>>>
> >> >>>> Xenomai: hal/i386 started.
> >> >>>> Xenomai: scheduling class idle registered.
> >> >>>> Xenomai: scheduling class rt registered.
> >> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
> >> >>>> loaded. Xenomai: SMI-enabled chipset found
> >> >>>> Xenomai: SMI workaround enabled
> >> >>>> Xenomai: starting RTDM services.
> >> >>>> Xenomai: starting native API services.
> >> >>>> Analogy: MITE: Available NI device IDs: 0x1880
> >> >>>>
> >> >>>> result of lspci for the relevant board:
> >> >>>>
> >> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
> >> >>>>
> >> >>>> And lsmod:
> >> >>>>
> >> >>>> Module                  Size  Used by
> >> >>>> xeno_native           105088  0
> >> >>>> analogy_ni_pcimio      15644  0
> >> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
> >> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
> >> >>>> analogy_8255            3900  1 analogy_ni_mio
> >> >>>> analogy_ni_mite        10140  3
> >> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >> >>>>  40220  5
> >> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
> >> >>>>y_n i_mit e xeno_rtdm              28436  2
> >> >>>> analogy_ni_mio,xeno_analogy astropci               10944  0
> >> >>>> ext3                  109636  1
> >> >>>> jbd                    43920  1 ext3
> >> >>>> mbcache                 6272  1 ext3
> >> >>>> ide_pci_generic         3712  0
> >> >>>> ide_core               74204  1 ide_pci_generic
> >> >>>> ata_piix               15748  2
> >> >>>> sata_mv                26448  0
> >> >>>> e1000                 114208  0
> >> >>>> libata                142156  2 ata_piix,sata_mv
> >> >>>> unix                   22992  10
> >> >>>>
> >> >>>>
> >> >>>> According to this post:
> >> >>>> http://www.mail-archive.com/xenomai@xenomai.org
> >> >>>>
> >> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
> >> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
> >> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
> >> >>>>
> >> >>>> fangorn:~# cat /proc/analogy/drivers
> >> >>>> --  Analogy drivers --
> >> >>>>
> >> >>>> | idx | driver name
> >> >>>> |  00 | analogy_ni_pcimio
> >> >>>> |  01 | analogy_8255
> >> >>>>
> >> >>>> There are two entries and the drivers are not attached:
> >> >>>>
> >> >>>> fangorn:~# cat /proc/analogy/devices
> >> >>>> --  Analogy devices --
> >> >>>>
> >> >>>> | idx | status | driver
> >> >>>> |  00 | Unused | No driver
> >> >>>> |  01 | Unused | No driver
> >> >>>> |  02 | Unused | No driver
> >> >>>> |  03 | Unused | No driver
> >> >>>> |  04 | Unused | No driver
> >> >>>> |  05 | Unused | No driver
> >> >>>> |  06 | Unused | No driver
> >> >>>> |  07 | Unused | No driver
> >> >>>> |  08 | Unused | No driver
> >> >>>> |  09 | Unused | No driver
> >> >>>>
> >> >>>> I'm aware of the name change of the drivers:
> >> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
> >> >>>>
> >> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
> >> >>>> >- 8255 becomes analogy_8255.
> >> >>>> >Consequently, the command line to attach these drivers has
> >> >>>> >changed. Starting from now, we have to type:
> >> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of
> >> >>>> > a4l_pcimio)
> >> >>>>
> >> >>>> This is what happens when I try to attach the driver to de device:
> >> >>>>
> >> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:last sysfs file:
> >> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
> >> >>>> task=f79013b0 task.ti=f64cc000)
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:I-pipe domain Linux
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Stack:
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Call Trace:
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
> >> >>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
> >> >>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
> >> >>>> 00 31
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >> >>>> SS:ESP 0068:f64cddc8
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:CR2: 0000000000000004
> >> >>>>
> >> >>>>
> >> >>>> relevant dmeg:
> >> >>>>
> >> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> >> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> >> >>>> mite 0000:04:01.0: setting latency timer to 64
> >> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
> >> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
> >> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> >> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
> >> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> >> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
> >> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >> >>>> *pde = 00000000
> >> >>>> Oops: 0000 [#1] PREEMPT SMP
> >> >>>> last sysfs file:
> >> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
> >> >>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
> >> >>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
> >> >>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
> >> >>>> e1000 libata unix [last unloaded: scsi_wait_scan]
> >> >>>>
> >> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> >> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
> >> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
> >> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
> >> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> >> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> >> >>>>  task.ti=f64cc000) I-pipe domain Linux
> >> >>>> Stack:
> >> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
> >> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
> >> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
> >> >>>> 00000001 f8c31e60 00000030 Call Trace:
> >> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
> >> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
> >> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
> >> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
> >> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
> >> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
> >> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
> >> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
> >> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
> >> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
> >> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
> >> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
> >> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
> >> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
> >> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
> >> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
> >> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
> >> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
> >> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
> >> >>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> >> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> >> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
> >> >>>> 0068:f64cddc8 CR2: 0000000000000004
> >> >>>> ---[ end trace c887d49bb5e86cf4 ]---
> >> >>>
> >> >>> Thanks for such a great report.
> >> >>>
> >> >>> I keep two things in mind:
> >> >>> - cmd_write's error handling path is not buggy (that was already in
> >> >>> my todo list). I will fix that as soon as possible.
> >> >>>
> >> >>> - according to the call-stack dump you made, the irq handler
> >> >>> registering seems to be the source of the trouble. What strikes me
> >> >>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
> >> >>> more in the analogy layer).
> >> >>>
> >> >>> In order to be sure that the problem is located in analogy, it would
> >> >>> be great to test that calling rtdm_request_irq(... , 48, ...) does
> >> >>> not trigger the bug.
> >> >>>
> >> >>> Here is a little test module you could try to insmod. If you do not
> >> >>> want to bother finding out how to compile it, you can replace the
> >> >>> code of an existing rtdm driver (for example:
> >> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
> >> >>>
> >> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
> >> >>> your kernel configuration (in "Processor type and features", disable
> >> >>> the SMP option and disable "IO APIC" under "Local APIC").
> >> >>>
> >> >>> #include <linux/version.h>
> >> >>> #include <linux/module.h>
> >> >>> #include <linux/ioport.h>
> >> >>>
> >> >>> #include <rtdm/rtdm_driver.h>
> >> >>>
> >> >>>
> >> >>> int test_handler(rtdm_irq_t *irq_handle)
> >> >>> {
> >> >>>
> >> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
> >> >>>
> >> >>>        return RTDM_IRQ_HANDLED;
> >> >>> }
> >> >>>
> >> >>> static rtdm_irq_t handle;
> >> >>>
> >> >>> static int __init __test_init(void)
> >> >>> {
> >> >>>
> >> >>>        int err;
> >> >>>
> >> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
> >> >>>
> >> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
> >> >>> "test_irq", NULL);
> >> >>>
> >> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
> >> >>> err);
> >> >>>
> >> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
> >> >>>
> >> >>>        err = rtdm_irq_enable(&handle);
> >> >>>
> >> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
> >> >>> err);
> >> >>>
> >> >>>
> >> >>>        return err;
> >> >>> }
> >> >>>
> >> >>> static void __exit __test_exit(void)
> >> >>> {
> >> >>>
> >> >>>        rtdm_irq_free(&handle);
> >> >>>
> >> >>> }
> >> >>>
> >> >>> module_init(__test_init);
> >> >>> module_exit(__test_exit);
> >> >>>
> >> >>>> Can anyone help?
> >> >>>>
> >> >>>> Best regards
> >> >>>> Ettore Pedretti
> >> >
> >> > Alexis.
> >
> > Alexis.
> 
Alexis.

[-- Attachment #2: patch_debug_1.diff --]
[-- Type: text/x-patch, Size: 2580 bytes --]

diff --git a/include/analogy/device.h b/include/analogy/device.h
index 27a3bd0..2a2f7bc 100644
--- a/include/analogy/device.h
+++ b/include/analogy/device.h
@@ -58,6 +58,16 @@ struct a4l_device {
 };
 typedef struct a4l_device a4l_dev_t;
 
+#if 1 /* debug */
+static inline void debug_dump_irq(a4l_dev_t *dev, char *s)
+{
+	a4l_irq_desc_t *dsc = &dev->transfer.irq_desc;
+	rtdm_printk("debug_dump_irq: %s\n", s);
+	rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n", 
+		    dsc->handler, dsc->irq, dsc->cookie);
+}
+#endif /* debug */
+
 #endif /* __KERNEL__ */
 
 /* DEVCFG ioctl argument structure */
diff --git a/ksrc/drivers/analogy/national_instruments/mio_common.c b/ksrc/drivers/analogy/national_instruments/mio_common.c
index d23ee12..6586563 100644
--- a/ksrc/drivers/analogy/national_instruments/mio_common.c
+++ b/ksrc/drivers/analogy/national_instruments/mio_common.c
@@ -4746,6 +4746,10 @@ int ni_E_init(a4l_dev_t *dev)
 		a4l_err(dev, "bug! boardtype.n_aochan > MAX_N_AO_CHAN\n");
 		return -EINVAL;
 	}
+
+#if 1 /* debug */
+	debug_dump_irq(dev, "ni_E_init start");
+#endif /* debug */
 	
 	/* analog input subdevice */
 
@@ -5145,6 +5149,10 @@ int ni_E_init(a4l_dev_t *dev)
 	if(ret != NI_FREQ_OUT_SUBDEV)
 		return ret;
 
+#if 1 /* debug */
+	debug_dump_irq(dev, "ni_E_init before config");
+#endif /* debug */
+
 	/* ai configuration */
 	ni_ai_reset(a4l_get_subd(dev, NI_AI_SUBDEV));
 	if ((boardtype.reg_type & ni_reg_6xxx_mask) == 0) {
@@ -5193,6 +5201,10 @@ int ni_E_init(a4l_dev_t *dev)
 		ni_writeb(0x0, M_Offset_AO_Calibration);
 	}
 
+#if 1 /* debug */
+	debug_dump_irq(dev, "ni_E_init after config");
+#endif /* debug */
+
 	return 0;
 }
 
diff --git a/ksrc/drivers/analogy/national_instruments/pcimio.c b/ksrc/drivers/analogy/national_instruments/pcimio.c
index 2c03112..ef3f58a 100644
--- a/ksrc/drivers/analogy/national_instruments/pcimio.c
+++ b/ksrc/drivers/analogy/national_instruments/pcimio.c
@@ -1532,6 +1532,10 @@ static int pcimio_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
 
 	irq = mite_irq(devpriv->mite);
 
+#if 1 /* debug */
+	debug_dump_irq(dev, "before request");
+#endif /* debug */
+
 	if(irq == 0){
 		a4l_warn(dev, "pcimio_attach: unknown irq (bad)\n\n");
 	}else{
@@ -1543,7 +1547,16 @@ static int pcimio_attach(a4l_dev_t *dev, a4l_lnkdesc_t *arg)
 			a4l_err(dev, "pcimio_attach: irq not available\n");
 	}
 
+#if 1 /* debug */
+	debug_dump_irq(dev, "after request");
+#endif /* debug */
+
 	ret = ni_E_init(dev);
+
+#if 1 /* debug */
+	debug_dump_irq(dev, "after ni_E_init");
+#endif /* debug */
+
 	if(ret < 0)
 		return ret;
 

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-24 21:34           ` Ettore Pedretti
  2009-11-24 22:51             ` Alexis Berlemont
@ 2009-11-24 22:57             ` Alexis Berlemont
  2009-11-26  8:22               ` Ettore Pedretti
  1 sibling, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-24 22:57 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
> Hi,
> 
> Would it help at this stage if I re-enable IO APIC, run your program
> and send you the call-stack dump? I am willing to test your patch on
> our hardware as soon as you got one ready, if that can be of help.

Sorry, I did not answer your question. The bug occurs in both configurations; 
so, do not bother changing your configuration for the moment.

> Cheers
> Ettore
> 
> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> > Hi,
> >
> > On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
> >> Hi,
> >>
> >> It is finally working. here is the dmesg after I insert a module:
> >>
> >> irq_test: before rtdm_irq_request
> >> irq_test: after rtdm_irq_request (err = -22)
> >> irq_test: before rtdm_irq_enable
> >> irq_test: after rtdm_irq_enable (err = -22)
> >
> > rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
> > the irq 48 turns into the irq 5;
> >
> >> Attached are a complete call-stack dump and my present kernel
> >>  configuration.
> >
> > With the fact that there is still a NULL pointer bug without IO APIC, the
> > bug is bound to be located in analogy. There may be some wrong write
> > access on the interrupt structure.
> >
> > I will come back with a patch which dumps the structure's content at
> > various locations in the attach code.
> >
> >> Cheers
> >> Ettore
> >>
> >> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >> > Hi,
> >> >
> >> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
> >
> > wrote:
> >> >> Hi,
> >> >>
> >> >> I have compiled the module using this makefile:
> >> >>
> >> >> prefix := $(shell /usr/bin/xeno-config --prefix)
> >> >> obj-m   := irqTest.o
> >> >>
> >> >> ifeq ($(prefix),)
> >> >> $(error Please add <xeno-install>/bin to your PATH variable)
> >> >> endif
> >> >>
> >> >> KDIR    := /lib/modules/$(shell uname -r)/build
> >> >> PWD     := $(shell pwd)
> >> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
> >> >>
> >> >>
> >> >> all: default
> >> >>
> >> >> default:
> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> >> >>
> >> >> install:
> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
> >> >>
> >> >> clean:
> >> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
> >> >>
> >> >> The module seems to compiles fine:
> >> >>
> >> >> make -C /lib/modules/2.6.31.1/build
> >> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
> >> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
> >> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
> >> >>  Building modules, stage 2.
> >> >>  MODPOST 1 modules
> >> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
> >> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
> >> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
> >> >>
> >> >> To make sure module dependencies are in place I modprobe irqbench
> >> >> (probably not necessary).
> >> >>
> >> >> modprobe xeno_irqbench
> >> >>
> >> >> All the loaded modules:
> >> >>
> >> >> fangorn:~# lsmod
> >> >> Module                  Size  Used by
> >> >> xeno_irqbench           5152  0
> >> >> xeno_native            83296  0
> >> >> analogy_ni_pcimio      15676  0
> >> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
> >> >> analogy_ni_tio         21724  1 analogy_ni_mio
> >> >> analogy_8255            4060  1 analogy_ni_mio
> >> >> analogy_ni_mite         9980  3
> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >> >> 38876  5
> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
> >> >>ni_ mite xeno_rtdm              24244  3
> >> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci              
> >> >> 10968 0
> >> >> ext3                  112900  1
> >> >> jbd                    44016  1 ext3
> >> >> mbcache                 6652  1 ext3
> >> >> ide_pci_generic         3712  0
> >> >> ide_core               79388  1 ide_pci_generic
> >> >> e1000                 118204  0
> >> >> ata_piix               15968  2
> >> >> sata_mv                27632  0
> >> >> libata                151468  2 ata_piix,sata_mv
> >> >> unix                   24460  10
> >> >>
> >> >>
> >> >> When I insert the module it complains about missing symbols:
> >> >>
> >> >> insmod irqTest.ko
> >> >>
> >> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
> >> >>
> >> >> dmesg:
> >> >>
> >> >> irqTest: module license 'unspecified' taints kernel.
> >> >> Disabling lock debugging due to kernel taint
> >> >> irqTest: Unknown symbol xnintr_enable
> >> >> irqTest: Unknown symbol xnintr_detach
> >> >>
> >> >> What am I doing wrong?
> >> >
> >> > It's me who did wrong. I just tested the compilation inside the
> >> > kernel.
> >> >
> >> > xnintr_* symbols are only exported for GPL compliant modules. So,
> >> > could you add the following line in the test module:
> >> > MODULE_LICENSE("GPL");
> >> >
> >> > With that, the insmod operation should work.
> >> >
> >> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
> >> >> problem.
> >> >
> >> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
> >> >
> >> >> Cheers
> >> >> Ettore
> >> >>
> >> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
> >> >>> Hi,
> >> >>>
> >> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
> >> >>>> Hello,
> >> >>>>
> >> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
> >> >>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
> >> >>>> generator board.
> >> >>>>
> >> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
> >> >>>> the following:
> >> >>>>
> >> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
> >> >>>> cmd_write: basic descriptor retrieved
> >> >>>>        subdevices count = 0
> >> >>>>        read subdevice index = 0
> >> >>>>        write subdevice index = 0
> >> >>>> cmd_write: a4l_get_desc failed (ret=-22)
> >> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
> >> >>>> 0x0804d008 ***
> >> >>>> ======= Backtrace: =========
> >> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
> >> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
> >> >>>> cmd_write[0x804927c]
> >> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
> >> >>>> cmd_write[0x8048b01]
> >> >>>> ======= Memory map: ========
> >> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
> >> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
> >> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
> >> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
> >> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
> >> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
> >> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
> >> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
> >> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
> >> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
> >> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
> >> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
> >> >>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> >> >>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
> >> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
> >> >>>> /lib/i686/cmov/libpthread-2.7.so
> >> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
> >> >>>> /lib/i686/cmov/libpthread-2.7.so
> >> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
> >> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
> >> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
> >> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
> >> >>>> 00000000 00:00 0
> >> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
> >> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
> >> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
> >> >>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
> >> >>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112  
> >> >>>> /usr/lib/libanalogy.so.1.0.0
> >> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
> >> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
> >> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
> >> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
> >> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
> >> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
> >> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> >> >>>> Aborted
> >> >>>>
> >> >>>> This is probably because the device /dev/analogy0 does not exist.
> >> >>>>
> >> >>>> This is the output of uname -a
> >> >>>>
> >> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
> >> >>>> i686 GNU/Linux
> >> >>>>
> >> >>>> And these are the relevant entries in dmesg
> >> >>>>
> >> >>>> dmesg:
> >> >>>>
> >> >>>> I-pipe 2.4-06: pipeline enabled.
> >> >>>> I-pipe: Domain Xenomai registered.
> >> >>>>
> >> >>>> Xenomai: hal/i386 started.
> >> >>>> Xenomai: scheduling class idle registered.
> >> >>>> Xenomai: scheduling class rt registered.
> >> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
> >> >>>> loaded. Xenomai: SMI-enabled chipset found
> >> >>>> Xenomai: SMI workaround enabled
> >> >>>> Xenomai: starting RTDM services.
> >> >>>> Xenomai: starting native API services.
> >> >>>> Analogy: MITE: Available NI device IDs: 0x1880
> >> >>>>
> >> >>>> result of lspci for the relevant board:
> >> >>>>
> >> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
> >> >>>>
> >> >>>> And lsmod:
> >> >>>>
> >> >>>> Module                  Size  Used by
> >> >>>> xeno_native           105088  0
> >> >>>> analogy_ni_pcimio      15644  0
> >> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
> >> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
> >> >>>> analogy_8255            3900  1 analogy_ni_mio
> >> >>>> analogy_ni_mite        10140  3
> >> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >> >>>>  40220  5
> >> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
> >> >>>>y_n i_mit e xeno_rtdm              28436  2
> >> >>>> analogy_ni_mio,xeno_analogy astropci               10944  0
> >> >>>> ext3                  109636  1
> >> >>>> jbd                    43920  1 ext3
> >> >>>> mbcache                 6272  1 ext3
> >> >>>> ide_pci_generic         3712  0
> >> >>>> ide_core               74204  1 ide_pci_generic
> >> >>>> ata_piix               15748  2
> >> >>>> sata_mv                26448  0
> >> >>>> e1000                 114208  0
> >> >>>> libata                142156  2 ata_piix,sata_mv
> >> >>>> unix                   22992  10
> >> >>>>
> >> >>>>
> >> >>>> According to this post:
> >> >>>> http://www.mail-archive.com/xenomai@xenomai.org
> >> >>>>
> >> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
> >> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
> >> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
> >> >>>>
> >> >>>> fangorn:~# cat /proc/analogy/drivers
> >> >>>> --  Analogy drivers --
> >> >>>>
> >> >>>> | idx | driver name
> >> >>>> |  00 | analogy_ni_pcimio
> >> >>>> |  01 | analogy_8255
> >> >>>>
> >> >>>> There are two entries and the drivers are not attached:
> >> >>>>
> >> >>>> fangorn:~# cat /proc/analogy/devices
> >> >>>> --  Analogy devices --
> >> >>>>
> >> >>>> | idx | status | driver
> >> >>>> |  00 | Unused | No driver
> >> >>>> |  01 | Unused | No driver
> >> >>>> |  02 | Unused | No driver
> >> >>>> |  03 | Unused | No driver
> >> >>>> |  04 | Unused | No driver
> >> >>>> |  05 | Unused | No driver
> >> >>>> |  06 | Unused | No driver
> >> >>>> |  07 | Unused | No driver
> >> >>>> |  08 | Unused | No driver
> >> >>>> |  09 | Unused | No driver
> >> >>>>
> >> >>>> I'm aware of the name change of the drivers:
> >> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
> >> >>>>
> >> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
> >> >>>> >- 8255 becomes analogy_8255.
> >> >>>> >Consequently, the command line to attach these drivers has
> >> >>>> >changed. Starting from now, we have to type:
> >> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of
> >> >>>> > a4l_pcimio)
> >> >>>>
> >> >>>> This is what happens when I try to attach the driver to de device:
> >> >>>>
> >> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:last sysfs file:
> >> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
> >> >>>> task=f79013b0 task.ti=f64cc000)
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:I-pipe domain Linux
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Stack:
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Call Trace:
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
> >> >>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
> >> >>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
> >> >>>> 00 31
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >> >>>> SS:ESP 0068:f64cddc8
> >> >>>>
> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >> >>>>  kernel:CR2: 0000000000000004
> >> >>>>
> >> >>>>
> >> >>>> relevant dmeg:
> >> >>>>
> >> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> >> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> >> >>>> mite 0000:04:01.0: setting latency timer to 64
> >> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
> >> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
> >> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> >> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
> >> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> >> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
> >> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >> >>>> *pde = 00000000
> >> >>>> Oops: 0000 [#1] PREEMPT SMP
> >> >>>> last sysfs file:
> >> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
> >> >>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
> >> >>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
> >> >>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
> >> >>>> e1000 libata unix [last unloaded: scsi_wait_scan]
> >> >>>>
> >> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> >> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
> >> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
> >> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
> >> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> >> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> >> >>>>  task.ti=f64cc000) I-pipe domain Linux
> >> >>>> Stack:
> >> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
> >> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
> >> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
> >> >>>> 00000001 f8c31e60 00000030 Call Trace:
> >> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
> >> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
> >> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
> >> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
> >> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
> >> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
> >> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
> >> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
> >> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
> >> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
> >> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
> >> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
> >> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
> >> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
> >> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
> >> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
> >> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
> >> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
> >> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
> >> >>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> >> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> >> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
> >> >>>> 0068:f64cddc8 CR2: 0000000000000004
> >> >>>> ---[ end trace c887d49bb5e86cf4 ]---
> >> >>>
> >> >>> Thanks for such a great report.
> >> >>>
> >> >>> I keep two things in mind:
> >> >>> - cmd_write's error handling path is not buggy (that was already in
> >> >>> my todo list). I will fix that as soon as possible.
> >> >>>
> >> >>> - according to the call-stack dump you made, the irq handler
> >> >>> registering seems to be the source of the trouble. What strikes me
> >> >>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
> >> >>> more in the analogy layer).
> >> >>>
> >> >>> In order to be sure that the problem is located in analogy, it would
> >> >>> be great to test that calling rtdm_request_irq(... , 48, ...) does
> >> >>> not trigger the bug.
> >> >>>
> >> >>> Here is a little test module you could try to insmod. If you do not
> >> >>> want to bother finding out how to compile it, you can replace the
> >> >>> code of an existing rtdm driver (for example:
> >> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
> >> >>>
> >> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
> >> >>> your kernel configuration (in "Processor type and features", disable
> >> >>> the SMP option and disable "IO APIC" under "Local APIC").
> >> >>>
> >> >>> #include <linux/version.h>
> >> >>> #include <linux/module.h>
> >> >>> #include <linux/ioport.h>
> >> >>>
> >> >>> #include <rtdm/rtdm_driver.h>
> >> >>>
> >> >>>
> >> >>> int test_handler(rtdm_irq_t *irq_handle)
> >> >>> {
> >> >>>
> >> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
> >> >>>
> >> >>>        return RTDM_IRQ_HANDLED;
> >> >>> }
> >> >>>
> >> >>> static rtdm_irq_t handle;
> >> >>>
> >> >>> static int __init __test_init(void)
> >> >>> {
> >> >>>
> >> >>>        int err;
> >> >>>
> >> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
> >> >>>
> >> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
> >> >>> "test_irq", NULL);
> >> >>>
> >> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
> >> >>> err);
> >> >>>
> >> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
> >> >>>
> >> >>>        err = rtdm_irq_enable(&handle);
> >> >>>
> >> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
> >> >>> err);
> >> >>>
> >> >>>
> >> >>>        return err;
> >> >>> }
> >> >>>
> >> >>> static void __exit __test_exit(void)
> >> >>> {
> >> >>>
> >> >>>        rtdm_irq_free(&handle);
> >> >>>
> >> >>> }
> >> >>>
> >> >>> module_init(__test_init);
> >> >>> module_exit(__test_exit);
> >> >>>
> >> >>>> Can anyone help?
> >> >>>>
> >> >>>> Best regards
> >> >>>> Ettore Pedretti
> >> >
> >> > Alexis.
> >
> > Alexis.
> 


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-24 22:57             ` Alexis Berlemont
@ 2009-11-26  8:22               ` Ettore Pedretti
  2009-11-26  9:34                 ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-26  8:22 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

Hi Alexis,

I applied the patch to my local git repository:

fangorn:/usr/src#
cd xenomai-head/
fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
patch_debug_1.diff
fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
../patch_debug_1.diff:14: trailing whitespace.
       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
warning: 1 line adds whitespace errors.

Then created a debian package:

git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
--git-upstream-branch=origin/master --git-ignore-new

built a new kernel package:

fakeroot make-kpkg --initrd --added-patches xenomai
--revision=ipipeComedi.2.4.06 --config menuconfig binary-arch

and installed the Debian package with dpkg -i

This is what happens when i insert the module into the kernel:

fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
Killed

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:Oops: 0000 [#1] PREEMPT SMP
fangorn:~/control/CHAMP/irqTest#
Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:last sysfs file: /sys/class/net/lo/operstate

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:I-pipe domain Linux

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:Stack:

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:Call Trace:

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:Code:  Bad EIP value.

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18

Message from syslogd@domain.hid at Nov 26 00:09:52 ...
 kernel:CR2: 0000000000000000

dmesg after insmod:

irq_test: before rtdm_irq_request
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<(null)>] (null)
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
scsi_wait_scan]

Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
EIP is at 0x0
EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
I-pipe domain Linux
Stack:
 c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
<0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
<0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
Call Trace:
 [<c1154166>] ? rthal_irq_enable+0x2d/0x31
 [<c105abf7>] ? xnintr_enable+0xb/0xd
 [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
 [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
 [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
 [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
 [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
 [<c1001028>] ? do_one_initcall+0x23/0x183
 [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
 [<c10481e9>] ? sys_init_module+0xad/0x1ec
 [<c1092cc5>] ? sys_close+0x71/0xb5
 [<c1002c25>] ? sysenter_do_call+0x12/0x16
Code:  Bad EIP value.
EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
CR2: 0000000000000000
---[ end trace ac2616367ecf94b2 ]---

I hope this is what you wanted me to try. Please let me know.

Cheers
Ettore


2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>> Hi,
>>
>> Would it help at this stage if I re-enable IO APIC, run your program
>> and send you the call-stack dump? I am willing to test your patch on
>> our hardware as soon as you got one ready, if that can be of help.
>
> Sorry, I did not answer your question. The bug occurs in both configurations;
> so, do not bother changing your configuration for the moment.
>
>> Cheers
>> Ettore
>>
>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> > Hi,
>> >
>> > On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>> >> Hi,
>> >>
>> >> It is finally working. here is the dmesg after I insert a module:
>> >>
>> >> irq_test: before rtdm_irq_request
>> >> irq_test: after rtdm_irq_request (err = -22)
>> >> irq_test: before rtdm_irq_enable
>> >> irq_test: after rtdm_irq_enable (err = -22)
>> >
>> > rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
>> > the irq 48 turns into the irq 5;
>> >
>> >> Attached are a complete call-stack dump and my present kernel
>> >>  configuration.
>> >
>> > With the fact that there is still a NULL pointer bug without IO APIC, the
>> > bug is bound to be located in analogy. There may be some wrong write
>> > access on the interrupt structure.
>> >
>> > I will come back with a patch which dumps the structure's content at
>> > various locations in the attach code.
>> >
>> >> Cheers
>> >> Ettore
>> >>
>> >> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> >> > Hi,
>> >> >
>> >> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
>> >
>> > wrote:
>> >> >> Hi,
>> >> >>
>> >> >> I have compiled the module using this makefile:
>> >> >>
>> >> >> prefix := $(shell /usr/bin/xeno-config --prefix)
>> >> >> obj-m   := irqTest.o
>> >> >>
>> >> >> ifeq ($(prefix),)
>> >> >> $(error Please add <xeno-install>/bin to your PATH variable)
>> >> >> endif
>> >> >>
>> >> >> KDIR    := /lib/modules/$(shell uname -r)/build
>> >> >> PWD     := $(shell pwd)
>> >> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>> >> >>
>> >> >>
>> >> >> all: default
>> >> >>
>> >> >> default:
>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>> >> >>
>> >> >> install:
>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>> >> >>
>> >> >> clean:
>> >> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>> >> >>
>> >> >> The module seems to compiles fine:
>> >> >>
>> >> >> make -C /lib/modules/2.6.31.1/build
>> >> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>> >> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>> >> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>> >> >>  Building modules, stage 2.
>> >> >>  MODPOST 1 modules
>> >> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>> >> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>> >> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>> >> >>
>> >> >> To make sure module dependencies are in place I modprobe irqbench
>> >> >> (probably not necessary).
>> >> >>
>> >> >> modprobe xeno_irqbench
>> >> >>
>> >> >> All the loaded modules:
>> >> >>
>> >> >> fangorn:~# lsmod
>> >> >> Module                  Size  Used by
>> >> >> xeno_irqbench           5152  0
>> >> >> xeno_native            83296  0
>> >> >> analogy_ni_pcimio      15676  0
>> >> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
>> >> >> analogy_ni_tio         21724  1 analogy_ni_mio
>> >> >> analogy_8255            4060  1 analogy_ni_mio
>> >> >> analogy_ni_mite         9980  3
>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>> >> >> 38876  5
>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>> >> >>ni_ mite xeno_rtdm              24244  3
>> >> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>> >> >> 10968 0
>> >> >> ext3                  112900  1
>> >> >> jbd                    44016  1 ext3
>> >> >> mbcache                 6652  1 ext3
>> >> >> ide_pci_generic         3712  0
>> >> >> ide_core               79388  1 ide_pci_generic
>> >> >> e1000                 118204  0
>> >> >> ata_piix               15968  2
>> >> >> sata_mv                27632  0
>> >> >> libata                151468  2 ata_piix,sata_mv
>> >> >> unix                   24460  10
>> >> >>
>> >> >>
>> >> >> When I insert the module it complains about missing symbols:
>> >> >>
>> >> >> insmod irqTest.ko
>> >> >>
>> >> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>> >> >>
>> >> >> dmesg:
>> >> >>
>> >> >> irqTest: module license 'unspecified' taints kernel.
>> >> >> Disabling lock debugging due to kernel taint
>> >> >> irqTest: Unknown symbol xnintr_enable
>> >> >> irqTest: Unknown symbol xnintr_detach
>> >> >>
>> >> >> What am I doing wrong?
>> >> >
>> >> > It's me who did wrong. I just tested the compilation inside the
>> >> > kernel.
>> >> >
>> >> > xnintr_* symbols are only exported for GPL compliant modules. So,
>> >> > could you add the following line in the test module:
>> >> > MODULE_LICENSE("GPL");
>> >> >
>> >> > With that, the insmod operation should work.
>> >> >
>> >> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>> >> >> problem.
>> >> >
>> >> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
>> >> >
>> >> >> Cheers
>> >> >> Ettore
>> >> >>
>> >> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>> >> >>> Hi,
>> >> >>>
>> >> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>> >> >>>> Hello,
>> >> >>>>
>> >> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
>> >> >>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>> >> >>>> generator board.
>> >> >>>>
>> >> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>> >> >>>> the following:
>> >> >>>>
>> >> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>> >> >>>> cmd_write: basic descriptor retrieved
>> >> >>>>        subdevices count = 0
>> >> >>>>        read subdevice index = 0
>> >> >>>>        write subdevice index = 0
>> >> >>>> cmd_write: a4l_get_desc failed (ret=-22)
>> >> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>> >> >>>> 0x0804d008 ***
>> >> >>>> ======= Backtrace: =========
>> >> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>> >> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>> >> >>>> cmd_write[0x804927c]
>> >> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>> >> >>>> cmd_write[0x8048b01]
>> >> >>>> ======= Memory map: ========
>> >> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>> >> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>> >> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>> >> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>> >> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>> >> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>> >> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>> >> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>> >> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>> >> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>> >> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>> >> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>> >> >>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>> >> >>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>> >> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
>> >> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
>> >> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>> >> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>> >> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>> >> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>> >> >>>> 00000000 00:00 0
>> >> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>> >> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>> >> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>> >> >>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>> >> >>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>> >> >>>> /usr/lib/libanalogy.so.1.0.0
>> >> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>> >> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>> >> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>> >> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>> >> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>> >> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>> >> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>> >> >>>> Aborted
>> >> >>>>
>> >> >>>> This is probably because the device /dev/analogy0 does not exist.
>> >> >>>>
>> >> >>>> This is the output of uname -a
>> >> >>>>
>> >> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>> >> >>>> i686 GNU/Linux
>> >> >>>>
>> >> >>>> And these are the relevant entries in dmesg
>> >> >>>>
>> >> >>>> dmesg:
>> >> >>>>
>> >> >>>> I-pipe 2.4-06: pipeline enabled.
>> >> >>>> I-pipe: Domain Xenomai registered.
>> >> >>>>
>> >> >>>> Xenomai: hal/i386 started.
>> >> >>>> Xenomai: scheduling class idle registered.
>> >> >>>> Xenomai: scheduling class rt registered.
>> >> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>> >> >>>> loaded. Xenomai: SMI-enabled chipset found
>> >> >>>> Xenomai: SMI workaround enabled
>> >> >>>> Xenomai: starting RTDM services.
>> >> >>>> Xenomai: starting native API services.
>> >> >>>> Analogy: MITE: Available NI device IDs: 0x1880
>> >> >>>>
>> >> >>>> result of lspci for the relevant board:
>> >> >>>>
>> >> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
>> >> >>>>
>> >> >>>> And lsmod:
>> >> >>>>
>> >> >>>> Module                  Size  Used by
>> >> >>>> xeno_native           105088  0
>> >> >>>> analogy_ni_pcimio      15644  0
>> >> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>> >> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
>> >> >>>> analogy_8255            3900  1 analogy_ni_mio
>> >> >>>> analogy_ni_mite        10140  3
>> >> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>> >> >>>>  40220  5
>> >> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>> >> >>>>y_n i_mit e xeno_rtdm              28436  2
>> >> >>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>> >> >>>> ext3                  109636  1
>> >> >>>> jbd                    43920  1 ext3
>> >> >>>> mbcache                 6272  1 ext3
>> >> >>>> ide_pci_generic         3712  0
>> >> >>>> ide_core               74204  1 ide_pci_generic
>> >> >>>> ata_piix               15748  2
>> >> >>>> sata_mv                26448  0
>> >> >>>> e1000                 114208  0
>> >> >>>> libata                142156  2 ata_piix,sata_mv
>> >> >>>> unix                   22992  10
>> >> >>>>
>> >> >>>>
>> >> >>>> According to this post:
>> >> >>>> http://www.mail-archive.com/xenomai@xenomai.org
>> >> >>>>
>> >> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
>> >> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>> >> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>> >> >>>>
>> >> >>>> fangorn:~# cat /proc/analogy/drivers
>> >> >>>> --  Analogy drivers --
>> >> >>>>
>> >> >>>> | idx | driver name
>> >> >>>> |  00 | analogy_ni_pcimio
>> >> >>>> |  01 | analogy_8255
>> >> >>>>
>> >> >>>> There are two entries and the drivers are not attached:
>> >> >>>>
>> >> >>>> fangorn:~# cat /proc/analogy/devices
>> >> >>>> --  Analogy devices --
>> >> >>>>
>> >> >>>> | idx | status | driver
>> >> >>>> |  00 | Unused | No driver
>> >> >>>> |  01 | Unused | No driver
>> >> >>>> |  02 | Unused | No driver
>> >> >>>> |  03 | Unused | No driver
>> >> >>>> |  04 | Unused | No driver
>> >> >>>> |  05 | Unused | No driver
>> >> >>>> |  06 | Unused | No driver
>> >> >>>> |  07 | Unused | No driver
>> >> >>>> |  08 | Unused | No driver
>> >> >>>> |  09 | Unused | No driver
>> >> >>>>
>> >> >>>> I'm aware of the name change of the drivers:
>> >> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>> >> >>>>
>> >> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
>> >> >>>> >- 8255 becomes analogy_8255.
>> >> >>>> >Consequently, the command line to attach these drivers has
>> >> >>>> >changed. Starting from now, we have to type:
>> >> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of
>> >> >>>> > a4l_pcimio)
>> >> >>>>
>> >> >>>> This is what happens when I try to attach the driver to de device:
>> >> >>>>
>> >> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:last sysfs file:
>> >> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>> >> >>>> task=f79013b0 task.ti=f64cc000)
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:I-pipe domain Linux
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:Stack:
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:Call Trace:
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>> >> >>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>> >> >>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>> >> >>>> 00 31
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> >> >>>> SS:ESP 0068:f64cddc8
>> >> >>>>
>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>> >> >>>>  kernel:CR2: 0000000000000004
>> >> >>>>
>> >> >>>>
>> >> >>>> relevant dmeg:
>> >> >>>>
>> >> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>> >> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>> >> >>>> mite 0000:04:01.0: setting latency timer to 64
>> >> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>> >> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>> >> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>> >> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>> >> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>> >> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>> >> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> >> >>>> *pde = 00000000
>> >> >>>> Oops: 0000 [#1] PREEMPT SMP
>> >> >>>> last sysfs file:
>> >> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>> >> >>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>> >> >>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>> >> >>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>> >> >>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>> >> >>>>
>> >> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>> >> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>> >> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> >> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>> >> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>> >> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>> >> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>> >> >>>>  task.ti=f64cc000) I-pipe domain Linux
>> >> >>>> Stack:
>> >> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>> >> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>> >> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>> >> >>>> 00000001 f8c31e60 00000030 Call Trace:
>> >> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>> >> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>> >> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>> >> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>> >> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>> >> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>> >> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>> >> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>> >> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>> >> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>> >> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>> >> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>> >> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>> >> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>> >> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>> >> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>> >> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>> >> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>> >> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>> >> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>> >> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
>> >> >>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>> >> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>> >> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>> >> >>>> 0068:f64cddc8 CR2: 0000000000000004
>> >> >>>> ---[ end trace c887d49bb5e86cf4 ]---
>> >> >>>
>> >> >>> Thanks for such a great report.
>> >> >>>
>> >> >>> I keep two things in mind:
>> >> >>> - cmd_write's error handling path is not buggy (that was already in
>> >> >>> my todo list). I will fix that as soon as possible.
>> >> >>>
>> >> >>> - according to the call-stack dump you made, the irq handler
>> >> >>> registering seems to be the source of the trouble. What strikes me
>> >> >>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>> >> >>> more in the analogy layer).
>> >> >>>
>> >> >>> In order to be sure that the problem is located in analogy, it would
>> >> >>> be great to test that calling rtdm_request_irq(... , 48, ...) does
>> >> >>> not trigger the bug.
>> >> >>>
>> >> >>> Here is a little test module you could try to insmod. If you do not
>> >> >>> want to bother finding out how to compile it, you can replace the
>> >> >>> code of an existing rtdm driver (for example:
>> >> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>> >> >>>
>> >> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
>> >> >>> your kernel configuration (in "Processor type and features", disable
>> >> >>> the SMP option and disable "IO APIC" under "Local APIC").
>> >> >>>
>> >> >>> #include <linux/version.h>
>> >> >>> #include <linux/module.h>
>> >> >>> #include <linux/ioport.h>
>> >> >>>
>> >> >>> #include <rtdm/rtdm_driver.h>
>> >> >>>
>> >> >>>
>> >> >>> int test_handler(rtdm_irq_t *irq_handle)
>> >> >>> {
>> >> >>>
>> >> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
>> >> >>>
>> >> >>>        return RTDM_IRQ_HANDLED;
>> >> >>> }
>> >> >>>
>> >> >>> static rtdm_irq_t handle;
>> >> >>>
>> >> >>> static int __init __test_init(void)
>> >> >>> {
>> >> >>>
>> >> >>>        int err;
>> >> >>>
>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>> >> >>>
>> >> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
>> >> >>> "test_irq", NULL);
>> >> >>>
>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>> >> >>> err);
>> >> >>>
>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>> >> >>>
>> >> >>>        err = rtdm_irq_enable(&handle);
>> >> >>>
>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>> >> >>> err);
>> >> >>>
>> >> >>>
>> >> >>>        return err;
>> >> >>> }
>> >> >>>
>> >> >>> static void __exit __test_exit(void)
>> >> >>> {
>> >> >>>
>> >> >>>        rtdm_irq_free(&handle);
>> >> >>>
>> >> >>> }
>> >> >>>
>> >> >>> module_init(__test_init);
>> >> >>> module_exit(__test_exit);
>> >> >>>
>> >> >>>> Can anyone help?
>> >> >>>>
>> >> >>>> Best regards
>> >> >>>> Ettore Pedretti
>> >> >
>> >> > Alexis.
>> >
>> > Alexis.
>>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44 1334 461669, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-26  8:22               ` Ettore Pedretti
@ 2009-11-26  9:34                 ` Alexis Berlemont
  2009-11-26 14:22                   ` Philippe Gerum
  2009-11-26 23:38                   ` Ettore Pedretti
  0 siblings, 2 replies; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-26  9:34 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
> Hi Alexis,
>
> I applied the patch to my local git repository:
>
> fangorn:/usr/src#
> cd xenomai-head/
> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> patch_debug_1.diff
> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> ../patch_debug_1.diff:14: trailing whitespace.
>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
> warning: 1 line adds whitespace errors.
>
> Then created a debian package:
>
> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
> --git-upstream-branch=origin/master --git-ignore-new
>
> built a new kernel package:
>
> fakeroot make-kpkg --initrd --added-patches xenomai
> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>
> and installed the Debian package with dpkg -i
>
> This is what happens when i insert the module into the kernel:
>
> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
> Killed
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:Oops: 0000 [#1] PREEMPT SMP
> fangorn:~/control/CHAMP/irqTest#
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:last sysfs file: /sys/class/net/lo/operstate
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:I-pipe domain Linux
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:Stack:
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:Call Trace:
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:Code:  Bad EIP value.
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>
> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>  kernel:CR2: 0000000000000000
>
> dmesg after insmod:
>
> irq_test: before rtdm_irq_request
> BUG: unable to handle kernel NULL pointer dereference at (null)
> IP: [<(null)>] (null)
> *pde = 00000000
> Oops: 0000 [#1] PREEMPT SMP
> last sysfs file: /sys/class/net/lo/operstate
> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
> scsi_wait_scan]
>
> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
> EIP is at 0x0
> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> I-pipe domain Linux
> Stack:
>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
> Call Trace:
>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>  [<c1001028>] ? do_one_initcall+0x23/0x183
>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>  [<c1092cc5>] ? sys_close+0x71/0xb5
>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
> Code:  Bad EIP value.
> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> CR2: 0000000000000000
> ---[ end trace ac2616367ecf94b2 ]---
>
> I hope this is what you wanted me to try. Please let me know.

So if I understand well, you "insmoded" the little test module which
does nothing but calling rtdm_irq_request() and the NULL pointer bug
occured.

This bug occurred before calling analogy_config, you did not tried to
attach the ni_pcimio driver, right ?

If I am right, it seems like the bug is not located in analogy but
between Xenomai's nucleus and Ipipe, which is ... weird.

What is your kernel configuration ? no IO_APIC ?
Which irq did you try to request ? 48 or 5 ?

Which CPU are you using ?

Thank you for your time.

> Cheers
> Ettore
>
>
> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>> Hi,
>>>
>>> Would it help at this stage if I re-enable IO APIC, run your program
>>> and send you the call-stack dump? I am willing to test your patch on
>>> our hardware as soon as you got one ready, if that can be of help.
>>
>> Sorry, I did not answer your question. The bug occurs in both configurations;
>> so, do not bother changing your configuration for the moment.
>>
>>> Cheers
>>> Ettore
>>>
>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>> > Hi,
>>> >
>>> > On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>> >> Hi,
>>> >>
>>> >> It is finally working. here is the dmesg after I insert a module:
>>> >>
>>> >> irq_test: before rtdm_irq_request
>>> >> irq_test: after rtdm_irq_request (err = -22)
>>> >> irq_test: before rtdm_irq_enable
>>> >> irq_test: after rtdm_irq_enable (err = -22)
>>> >
>>> > rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
>>> > the irq 48 turns into the irq 5;
>>> >
>>> >> Attached are a complete call-stack dump and my present kernel
>>> >>  configuration.
>>> >
>>> > With the fact that there is still a NULL pointer bug without IO APIC, the
>>> > bug is bound to be located in analogy. There may be some wrong write
>>> > access on the interrupt structure.
>>> >
>>> > I will come back with a patch which dumps the structure's content at
>>> > various locations in the attach code.
>>> >
>>> >> Cheers
>>> >> Ettore
>>> >>
>>> >> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>> >> > Hi,
>>> >> >
>>> >> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hidk>
>>> >
>>> > wrote:
>>> >> >> Hi,
>>> >> >>
>>> >> >> I have compiled the module using this makefile:
>>> >> >>
>>> >> >> prefix := $(shell /usr/bin/xeno-config --prefix)
>>> >> >> obj-m   := irqTest.o
>>> >> >>
>>> >> >> ifeq ($(prefix),)
>>> >> >> $(error Please add <xeno-install>/bin to your PATH variable)
>>> >> >> endif
>>> >> >>
>>> >> >> KDIR    := /lib/modules/$(shell uname -r)/build
>>> >> >> PWD     := $(shell pwd)
>>> >> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>> >> >>
>>> >> >>
>>> >> >> all: default
>>> >> >>
>>> >> >> default:
>>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>> >> >>
>>> >> >> install:
>>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>> >> >>
>>> >> >> clean:
>>> >> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>> >> >>
>>> >> >> The module seems to compiles fine:
>>> >> >>
>>> >> >> make -C /lib/modules/2.6.31.1/build
>>> >> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>> >> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>> >> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>> >> >>  Building modules, stage 2.
>>> >> >>  MODPOST 1 modules
>>> >> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>> >> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>> >> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>> >> >>
>>> >> >> To make sure module dependencies are in place I modprobe irqbench
>>> >> >> (probably not necessary).
>>> >> >>
>>> >> >> modprobe xeno_irqbench
>>> >> >>
>>> >> >> All the loaded modules:
>>> >> >>
>>> >> >> fangorn:~# lsmod
>>> >> >> Module                  Size  Used by
>>> >> >> xeno_irqbench           5152  0
>>> >> >> xeno_native            83296  0
>>> >> >> analogy_ni_pcimio      15676  0
>>> >> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>> >> >> analogy_ni_tio         21724  1 analogy_ni_mio
>>> >> >> analogy_8255            4060  1 analogy_ni_mio
>>> >> >> analogy_ni_mite         9980  3
>>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>> >> >> 38876  5
>>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>> >> >>ni_ mite xeno_rtdm              24244  3
>>> >> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>> >> >> 10968 0
>>> >> >> ext3                  112900  1
>>> >> >> jbd                    44016  1 ext3
>>> >> >> mbcache                 6652  1 ext3
>>> >> >> ide_pci_generic         3712  0
>>> >> >> ide_core               79388  1 ide_pci_generic
>>> >> >> e1000                 118204  0
>>> >> >> ata_piix               15968  2
>>> >> >> sata_mv                27632  0
>>> >> >> libata                151468  2 ata_piix,sata_mv
>>> >> >> unix                   24460  10
>>> >> >>
>>> >> >>
>>> >> >> When I insert the module it complains about missing symbols:
>>> >> >>
>>> >> >> insmod irqTest.ko
>>> >> >>
>>> >> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>> >> >>
>>> >> >> dmesg:
>>> >> >>
>>> >> >> irqTest: module license 'unspecified' taints kernel.
>>> >> >> Disabling lock debugging due to kernel taint
>>> >> >> irqTest: Unknown symbol xnintr_enable
>>> >> >> irqTest: Unknown symbol xnintr_detach
>>> >> >>
>>> >> >> What am I doing wrong?
>>> >> >
>>> >> > It's me who did wrong. I just tested the compilation inside the
>>> >> > kernel.
>>> >> >
>>> >> > xnintr_* symbols are only exported for GPL compliant modules. So,
>>> >> > could you add the following line in the test module:
>>> >> > MODULE_LICENSE("GPL");
>>> >> >
>>> >> > With that, the insmod operation should work.
>>> >> >
>>> >> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>> >> >> problem.
>>> >> >
>>> >> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
>>> >> >
>>> >> >> Cheers
>>> >> >> Ettore
>>> >> >>
>>> >> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>> >> >>> Hi,
>>> >> >>>
>>> >> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>> >> >>>> Hello,
>>> >> >>>>
>>> >> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
>>> >> >>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>> >> >>>> generator board.
>>> >> >>>>
>>> >> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>> >> >>>> the following:
>>> >> >>>>
>>> >> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>> >> >>>> cmd_write: basic descriptor retrieved
>>> >> >>>>        subdevices count = 0
>>> >> >>>>        read subdevice index = 0
>>> >> >>>>        write subdevice index = 0
>>> >> >>>> cmd_write: a4l_get_desc failed (ret=-22)
>>> >> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>> >> >>>> 0x0804d008 ***
>>> >> >>>> ======= Backtrace: =========
>>> >> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>> >> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>> >> >>>> cmd_write[0x804927c]
>>> >> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>> >> >>>> cmd_write[0x8048b01]
>>> >> >>>> ======= Memory map: ========
>>> >> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>> >> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>> >> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>> >> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>> >> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>> >> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>> >> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>> >> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>> >> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>> >> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>> >> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>>> >> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>> >> >>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>> >> >>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>> >> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
>>> >> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
>>> >> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>> >> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>> >> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>> >> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>> >> >>>> 00000000 00:00 0
>>> >> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>> >> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>>> >> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>> >> >>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>> >> >>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>> >> >>>> /usr/lib/libanalogy.so.1.0.0
>>> >> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>> >> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>> >> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>> >> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>> >> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>> >> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>> >> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>> >> >>>> Aborted
>>> >> >>>>
>>> >> >>>> This is probably because the device /dev/analogy0 does not exist.
>>> >> >>>>
>>> >> >>>> This is the output of uname -a
>>> >> >>>>
>>> >> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>> >> >>>> i686 GNU/Linux
>>> >> >>>>
>>> >> >>>> And these are the relevant entries in dmesg
>>> >> >>>>
>>> >> >>>> dmesg:
>>> >> >>>>
>>> >> >>>> I-pipe 2.4-06: pipeline enabled.
>>> >> >>>> I-pipe: Domain Xenomai registered.
>>> >> >>>>
>>> >> >>>> Xenomai: hal/i386 started.
>>> >> >>>> Xenomai: scheduling class idle registered.
>>> >> >>>> Xenomai: scheduling class rt registered.
>>> >> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>> >> >>>> loaded. Xenomai: SMI-enabled chipset found
>>> >> >>>> Xenomai: SMI workaround enabled
>>> >> >>>> Xenomai: starting RTDM services.
>>> >> >>>> Xenomai: starting native API services.
>>> >> >>>> Analogy: MITE: Available NI device IDs: 0x1880
>>> >> >>>>
>>> >> >>>> result of lspci for the relevant board:
>>> >> >>>>
>>> >> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>> >> >>>>
>>> >> >>>> And lsmod:
>>> >> >>>>
>>> >> >>>> Module                  Size  Used by
>>> >> >>>> xeno_native           105088  0
>>> >> >>>> analogy_ni_pcimio      15644  0
>>> >> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>> >> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>> >> >>>> analogy_8255            3900  1 analogy_ni_mio
>>> >> >>>> analogy_ni_mite        10140  3
>>> >> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>> >> >>>>  40220  5
>>> >> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>> >> >>>>y_n i_mit e xeno_rtdm              28436  2
>>> >> >>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>> >> >>>> ext3                  109636  1
>>> >> >>>> jbd                    43920  1 ext3
>>> >> >>>> mbcache                 6272  1 ext3
>>> >> >>>> ide_pci_generic         3712  0
>>> >> >>>> ide_core               74204  1 ide_pci_generic
>>> >> >>>> ata_piix               15748  2
>>> >> >>>> sata_mv                26448  0
>>> >> >>>> e1000                 114208  0
>>> >> >>>> libata                142156  2 ata_piix,sata_mv
>>> >> >>>> unix                   22992  10
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> According to this post:
>>> >> >>>> http://www.mail-archive.com/xenomai@xenomai.org
>>> >> >>>>
>>> >> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
>>> >> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>>> >> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>> >> >>>>
>>> >> >>>> fangorn:~# cat /proc/analogy/drivers
>>> >> >>>> --  Analogy drivers --
>>> >> >>>>
>>> >> >>>> | idx | driver name
>>> >> >>>> |  00 | analogy_ni_pcimio
>>> >> >>>> |  01 | analogy_8255
>>> >> >>>>
>>> >> >>>> There are two entries and the drivers are not attached:
>>> >> >>>>
>>> >> >>>> fangorn:~# cat /proc/analogy/devices
>>> >> >>>> --  Analogy devices --
>>> >> >>>>
>>> >> >>>> | idx | status | driver
>>> >> >>>> |  00 | Unused | No driver
>>> >> >>>> |  01 | Unused | No driver
>>> >> >>>> |  02 | Unused | No driver
>>> >> >>>> |  03 | Unused | No driver
>>> >> >>>> |  04 | Unused | No driver
>>> >> >>>> |  05 | Unused | No driver
>>> >> >>>> |  06 | Unused | No driver
>>> >> >>>> |  07 | Unused | No driver
>>> >> >>>> |  08 | Unused | No driver
>>> >> >>>> |  09 | Unused | No driver
>>> >> >>>>
>>> >> >>>> I'm aware of the name change of the drivers:
>>> >> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>> >> >>>>
>>> >> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
>>> >> >>>> >- 8255 becomes analogy_8255.
>>> >> >>>> >Consequently, the command line to attach these drivers has
>>> >> >>>> >changed. Starting from now, we have to type:
>>> >> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of
>>> >> >>>> > a4l_pcimio)
>>> >> >>>>
>>> >> >>>> This is what happens when I try to attach the driver to de device:
>>> >> >>>>
>>> >> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:last sysfs file:
>>> >> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>> >> >>>> task=f79013b0 task.ti=f64cc000)
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:I-pipe domain Linux
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:Stack:
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:Call Trace:
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>> >> >>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>> >> >>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>> >> >>>> 00 31
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> >> >>>> SS:ESP 0068:f64cddc8
>>> >> >>>>
>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>> >> >>>>  kernel:CR2: 0000000000000004
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> relevant dmeg:
>>> >> >>>>
>>> >> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>> >> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>> >> >>>> mite 0000:04:01.0: setting latency timer to 64
>>> >> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>> >> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>> >> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>> >> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>>> >> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>> >> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>> >> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> >> >>>> *pde = 00000000
>>> >> >>>> Oops: 0000 [#1] PREEMPT SMP
>>> >> >>>> last sysfs file:
>>> >> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>> >> >>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>> >> >>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>> >> >>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>> >> >>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>> >> >>>>
>>> >> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>> >> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>> >> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> >> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>> >> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>> >> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>> >> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>> >> >>>>  task.ti=f64cc000) I-pipe domain Linux
>>> >> >>>> Stack:
>>> >> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>> >> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>>> >> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>>> >> >>>> 00000001 f8c31e60 00000030 Call Trace:
>>> >> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>> >> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>> >> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>> >> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>> >> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>> >> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>> >> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>> >> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>> >> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>> >> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>> >> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>> >> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>> >> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>> >> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>> >> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>> >> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>> >> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>> >> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>> >> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>> >> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>> >> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
>>> >> >>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>> >> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>> >> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>> >> >>>> 0068:f64cddc8 CR2: 0000000000000004
>>> >> >>>> ---[ end trace c887d49bb5e86cf4 ]---
>>> >> >>>
>>> >> >>> Thanks for such a great report.
>>> >> >>>
>>> >> >>> I keep two things in mind:
>>> >> >>> - cmd_write's error handling path is not buggy (that was already in
>>> >> >>> my todo list). I will fix that as soon as possible.
>>> >> >>>
>>> >> >>> - according to the call-stack dump you made, the irq handler
>>> >> >>> registering seems to be the source of the trouble. What strikes me
>>> >> >>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>> >> >>> more in the analogy layer).
>>> >> >>>
>>> >> >>> In order to be sure that the problem is located in analogy, it would
>>> >> >>> be great to test that calling rtdm_request_irq(... , 48, ...) does
>>> >> >>> not trigger the bug.
>>> >> >>>
>>> >> >>> Here is a little test module you could try to insmod. If you do not
>>> >> >>> want to bother finding out how to compile it, you can replace the
>>> >> >>> code of an existing rtdm driver (for example:
>>> >> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>> >> >>>
>>> >> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
>>> >> >>> your kernel configuration (in "Processor type and features", disable
>>> >> >>> the SMP option and disable "IO APIC" under "Local APIC").
>>> >> >>>
>>> >> >>> #include <linux/version.h>
>>> >> >>> #include <linux/module.h>
>>> >> >>> #include <linux/ioport.h>
>>> >> >>>
>>> >> >>> #include <rtdm/rtdm_driver.h>
>>> >> >>>
>>> >> >>>
>>> >> >>> int test_handler(rtdm_irq_t *irq_handle)
>>> >> >>> {
>>> >> >>>
>>> >> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>> >> >>>
>>> >> >>>        return RTDM_IRQ_HANDLED;
>>> >> >>> }
>>> >> >>>
>>> >> >>> static rtdm_irq_t handle;
>>> >> >>>
>>> >> >>> static int __init __test_init(void)
>>> >> >>> {
>>> >> >>>
>>> >> >>>        int err;
>>> >> >>>
>>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>> >> >>>
>>> >> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>> >> >>> "test_irq", NULL);
>>> >> >>>
>>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>>> >> >>> err);
>>> >> >>>
>>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>> >> >>>
>>> >> >>>        err = rtdm_irq_enable(&handle);
>>> >> >>>
>>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>> >> >>> err);
>>> >> >>>
>>> >> >>>
>>> >> >>>        return err;
>>> >> >>> }
>>> >> >>>
>>> >> >>> static void __exit __test_exit(void)
>>> >> >>> {
>>> >> >>>
>>> >> >>>        rtdm_irq_free(&handle);
>>> >> >>>
>>> >> >>> }
>>> >> >>>
>>> >> >>> module_init(__test_init);
>>> >> >>> module_exit(__test_exit);
>>> >> >>>
>>> >> >>>> Can anyone help?
>>> >> >>>>
>>> >> >>>> Best regards
>>> >> >>>> Ettore Pedretti
>>> >> >
>>> >> > Alexis.
>>> >
>>> > Alexis.
>>>
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>>
>
>
>
> --
> Ettore Pedretti, SUPA
> School of Physics and Astronomy
> University of St Andrews, North Haugh,
> St Andrews, Fife, KY16 9SS, Scotland
> Ph: +44 1334 461669, Fax: +44-1334-463104
> The University of St Andrews is a charity registered in Scotland : No SC013532
>
>
Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-26  9:34                 ` Alexis Berlemont
@ 2009-11-26 14:22                   ` Philippe Gerum
  2009-11-27  0:43                     ` Alexis Berlemont
  2009-11-26 23:38                   ` Ettore Pedretti
  1 sibling, 1 reply; 35+ messages in thread
From: Philippe Gerum @ 2009-11-26 14:22 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

On Thu, 2009-11-26 at 10:34 +0100, Alexis Berlemont wrote:
> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
> > Hi Alexis,
> >
> > I applied the patch to my local git repository:
> >
> > fangorn:/usr/src#
> > cd xenomai-head/
> > fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> > patch_debug_1.diff
> > fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> > ../patch_debug_1.diff:14: trailing whitespace.
> >       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
> > warning: 1 line adds whitespace errors.
> >
> > Then created a debian package:
> >
> > git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
> > --git-upstream-branch=origin/master --git-ignore-new
> >
> > built a new kernel package:
> >
> > fakeroot make-kpkg --initrd --added-patches xenomai
> > --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
> >
> > and installed the Debian package with dpkg -i
> >
> > This is what happens when i insert the module into the kernel:
> >
> > fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
> > Killed
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:Oops: 0000 [#1] PREEMPT SMP
> > fangorn:~/control/CHAMP/irqTest#
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:last sysfs file: /sys/class/net/lo/operstate
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:I-pipe domain Linux
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:Stack:
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:Call Trace:
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:Code:  Bad EIP value.
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> >
> > Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >  kernel:CR2: 0000000000000000
> >
> > dmesg after insmod:
> >
> > irq_test: before rtdm_irq_request
> > BUG: unable to handle kernel NULL pointer dereference at (null)
> > IP: [<(null)>] (null)
> > *pde = 00000000
> > Oops: 0000 [#1] PREEMPT SMP
> > last sysfs file: /sys/class/net/lo/operstate
> > Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
> > analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
> > xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
> > ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
> > scsi_wait_scan]
> >
> > Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
> > EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
> > EIP is at 0x0
> > EAX: 00000030

This is likely IRQ 48, with rthal_irq_enable jumping to address zero.

>  EBX: 00000000 ECX: 00000030 EDX: c1250b80
> > ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
> >  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> > Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> > I-pipe domain Linux
> > Stack:
> >  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
> > <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
> > <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
> > Call Trace:
> >  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
> >  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
> >  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
> >  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
> >  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
> >  [<c1001028>] ? do_one_initcall+0x23/0x183
> >  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
> >  [<c10481e9>] ? sys_init_module+0xad/0x1ec
> >  [<c1092cc5>] ? sys_close+0x71/0xb5
> >  [<c1002c25>] ? sysenter_do_call+0x12/0x16
> > Code:  Bad EIP value.
> > EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> > CR2: 0000000000000000
> > ---[ end trace ac2616367ecf94b2 ]---
> >
> > I hope this is what you wanted me to try. Please let me know.
> 
> So if I understand well, you "insmoded" the little test module which
> does nothing but calling rtdm_irq_request() and the NULL pointer bug
> occured.
> 
> This bug occurred before calling analogy_config, you did not tried to
> attach the ni_pcimio driver, right ?
> 
> If I am right, it seems like the bug is not located in analogy but
> between Xenomai's nucleus and Ipipe, which is ... weird.
> 

The IRQ requested does not seem to have been associated with any chip
controller, which is likely the basic issue.

> What is your kernel configuration ? no IO_APIC ?
> Which irq did you try to request ? 48 or 5 ?
> 
> Which CPU are you using ?
> 

Looks like something being used in x86_32 mode.

> Thank you for your time.
> 
> > Cheers
> > Ettore
> >
> >
> > 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
> >>> Hi,
> >>>
> >>> Would it help at this stage if I re-enable IO APIC, run your program
> >>> and send you the call-stack dump? I am willing to test your patch on
> >>> our hardware as soon as you got one ready, if that can be of help.
> >>
> >> Sorry, I did not answer your question. The bug occurs in both configurations;
> >> so, do not bother changing your configuration for the moment.
> >>
> >>> Cheers
> >>> Ettore
> >>>
> >>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >>> > Hi,
> >>> >
> >>> > On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
> >>> >> Hi,
> >>> >>
> >>> >> It is finally working. here is the dmesg after I insert a module:
> >>> >>
> >>> >> irq_test: before rtdm_irq_request
> >>> >> irq_test: after rtdm_irq_request (err = -22)
> >>> >> irq_test: before rtdm_irq_enable
> >>> >> irq_test: after rtdm_irq_enable (err = -22)
> >>> >
> >>> > rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
> >>> > the irq 48 turns into the irq 5;
> >>> >
> >>> >> Attached are a complete call-stack dump and my present kernel
> >>> >>  configuration.
> >>> >
> >>> > With the fact that there is still a NULL pointer bug without IO APIC, the
> >>> > bug is bound to be located in analogy. There may be some wrong write
> >>> > access on the interrupt structure.
> >>> >
> >>> > I will come back with a patch which dumps the structure's content at
> >>> > various locations in the attach code.
> >>> >
> >>> >> Cheers
> >>> >> Ettore
> >>> >>
> >>> >> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >>> >> > Hi,
> >>> >> >
> >>> >> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
> >>> >
> >>> > wrote:
> >>> >> >> Hi,
> >>> >> >>
> >>> >> >> I have compiled the module using this makefile:
> >>> >> >>
> >>> >> >> prefix := $(shell /usr/bin/xeno-config --prefix)
> >>> >> >> obj-m   := irqTest.o
> >>> >> >>
> >>> >> >> ifeq ($(prefix),)
> >>> >> >> $(error Please add <xeno-install>/bin to your PATH variable)
> >>> >> >> endif
> >>> >> >>
> >>> >> >> KDIR    := /lib/modules/$(shell uname -r)/build
> >>> >> >> PWD     := $(shell pwd)
> >>> >> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
> >>> >> >>
> >>> >> >>
> >>> >> >> all: default
> >>> >> >>
> >>> >> >> default:
> >>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> >>> >> >>
> >>> >> >> install:
> >>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
> >>> >> >>
> >>> >> >> clean:
> >>> >> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
> >>> >> >>
> >>> >> >> The module seems to compiles fine:
> >>> >> >>
> >>> >> >> make -C /lib/modules/2.6.31.1/build
> >>> >> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
> >>> >> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
> >>> >> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
> >>> >> >>  Building modules, stage 2.
> >>> >> >>  MODPOST 1 modules
> >>> >> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
> >>> >> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
> >>> >> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
> >>> >> >>
> >>> >> >> To make sure module dependencies are in place I modprobe irqbench
> >>> >> >> (probably not necessary).
> >>> >> >>
> >>> >> >> modprobe xeno_irqbench
> >>> >> >>
> >>> >> >> All the loaded modules:
> >>> >> >>
> >>> >> >> fangorn:~# lsmod
> >>> >> >> Module                  Size  Used by
> >>> >> >> xeno_irqbench           5152  0
> >>> >> >> xeno_native            83296  0
> >>> >> >> analogy_ni_pcimio      15676  0
> >>> >> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
> >>> >> >> analogy_ni_tio         21724  1 analogy_ni_mio
> >>> >> >> analogy_8255            4060  1 analogy_ni_mio
> >>> >> >> analogy_ni_mite         9980  3
> >>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >>> >> >> 38876  5
> >>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
> >>> >> >>ni_ mite xeno_rtdm              24244  3
> >>> >> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
> >>> >> >> 10968 0
> >>> >> >> ext3                  112900  1
> >>> >> >> jbd                    44016  1 ext3
> >>> >> >> mbcache                 6652  1 ext3
> >>> >> >> ide_pci_generic         3712  0
> >>> >> >> ide_core               79388  1 ide_pci_generic
> >>> >> >> e1000                 118204  0
> >>> >> >> ata_piix               15968  2
> >>> >> >> sata_mv                27632  0
> >>> >> >> libata                151468  2 ata_piix,sata_mv
> >>> >> >> unix                   24460  10
> >>> >> >>
> >>> >> >>
> >>> >> >> When I insert the module it complains about missing symbols:
> >>> >> >>
> >>> >> >> insmod irqTest.ko
> >>> >> >>
> >>> >> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
> >>> >> >>
> >>> >> >> dmesg:
> >>> >> >>
> >>> >> >> irqTest: module license 'unspecified' taints kernel.
> >>> >> >> Disabling lock debugging due to kernel taint
> >>> >> >> irqTest: Unknown symbol xnintr_enable
> >>> >> >> irqTest: Unknown symbol xnintr_detach
> >>> >> >>
> >>> >> >> What am I doing wrong?
> >>> >> >
> >>> >> > It's me who did wrong. I just tested the compilation inside the
> >>> >> > kernel.
> >>> >> >
> >>> >> > xnintr_* symbols are only exported for GPL compliant modules. So,
> >>> >> > could you add the following line in the test module:
> >>> >> > MODULE_LICENSE("GPL");
> >>> >> >
> >>> >> > With that, the insmod operation should work.
> >>> >> >
> >>> >> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
> >>> >> >> problem.
> >>> >> >
> >>> >> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
> >>> >> >
> >>> >> >> Cheers
> >>> >> >> Ettore
> >>> >> >>
> >>> >> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
> >>> >> >>> Hi,
> >>> >> >>>
> >>> >> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
> >>> >> >>>> Hello,
> >>> >> >>>>
> >>> >> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
> >>> >> >>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
> >>> >> >>>> generator board.
> >>> >> >>>>
> >>> >> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
> >>> >> >>>> the following:
> >>> >> >>>>
> >>> >> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
> >>> >> >>>> cmd_write: basic descriptor retrieved
> >>> >> >>>>        subdevices count = 0
> >>> >> >>>>        read subdevice index = 0
> >>> >> >>>>        write subdevice index = 0
> >>> >> >>>> cmd_write: a4l_get_desc failed (ret=-22)
> >>> >> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
> >>> >> >>>> 0x0804d008 ***
> >>> >> >>>> ======= Backtrace: =========
> >>> >> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
> >>> >> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
> >>> >> >>>> cmd_write[0x804927c]
> >>> >> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
> >>> >> >>>> cmd_write[0x8048b01]
> >>> >> >>>> ======= Memory map: ========
> >>> >> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
> >>> >> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
> >>> >> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
> >>> >> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
> >>> >> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
> >>> >> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
> >>> >> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
> >>> >> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
> >>> >> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
> >>> >> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
> >>> >> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
> >>> >> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
> >>> >> >>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> >>> >> >>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
> >>> >> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
> >>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
> >>> >> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
> >>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
> >>> >> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
> >>> >> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
> >>> >> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
> >>> >> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
> >>> >> >>>> 00000000 00:00 0
> >>> >> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
> >>> >> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
> >>> >> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
> >>> >> >>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
> >>> >> >>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
> >>> >> >>>> /usr/lib/libanalogy.so.1.0.0
> >>> >> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
> >>> >> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
> >>> >> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
> >>> >> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
> >>> >> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
> >>> >> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
> >>> >> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> >>> >> >>>> Aborted
> >>> >> >>>>
> >>> >> >>>> This is probably because the device /dev/analogy0 does not exist.
> >>> >> >>>>
> >>> >> >>>> This is the output of uname -a
> >>> >> >>>>
> >>> >> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
> >>> >> >>>> i686 GNU/Linux
> >>> >> >>>>
> >>> >> >>>> And these are the relevant entries in dmesg
> >>> >> >>>>
> >>> >> >>>> dmesg:
> >>> >> >>>>
> >>> >> >>>> I-pipe 2.4-06: pipeline enabled.
> >>> >> >>>> I-pipe: Domain Xenomai registered.
> >>> >> >>>>
> >>> >> >>>> Xenomai: hal/i386 started.
> >>> >> >>>> Xenomai: scheduling class idle registered.
> >>> >> >>>> Xenomai: scheduling class rt registered.
> >>> >> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
> >>> >> >>>> loaded. Xenomai: SMI-enabled chipset found
> >>> >> >>>> Xenomai: SMI workaround enabled
> >>> >> >>>> Xenomai: starting RTDM services.
> >>> >> >>>> Xenomai: starting native API services.
> >>> >> >>>> Analogy: MITE: Available NI device IDs: 0x1880
> >>> >> >>>>
> >>> >> >>>> result of lspci for the relevant board:
> >>> >> >>>>
> >>> >> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
> >>> >> >>>>
> >>> >> >>>> And lsmod:
> >>> >> >>>>
> >>> >> >>>> Module                  Size  Used by
> >>> >> >>>> xeno_native           105088  0
> >>> >> >>>> analogy_ni_pcimio      15644  0
> >>> >> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
> >>> >> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
> >>> >> >>>> analogy_8255            3900  1 analogy_ni_mio
> >>> >> >>>> analogy_ni_mite        10140  3
> >>> >> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >>> >> >>>>  40220  5
> >>> >> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
> >>> >> >>>>y_n i_mit e xeno_rtdm              28436  2
> >>> >> >>>> analogy_ni_mio,xeno_analogy astropci               10944  0
> >>> >> >>>> ext3                  109636  1
> >>> >> >>>> jbd                    43920  1 ext3
> >>> >> >>>> mbcache                 6272  1 ext3
> >>> >> >>>> ide_pci_generic         3712  0
> >>> >> >>>> ide_core               74204  1 ide_pci_generic
> >>> >> >>>> ata_piix               15748  2
> >>> >> >>>> sata_mv                26448  0
> >>> >> >>>> e1000                 114208  0
> >>> >> >>>> libata                142156  2 ata_piix,sata_mv
> >>> >> >>>> unix                   22992  10
> >>> >> >>>>
> >>> >> >>>>
> >>> >> >>>> According to this post:
> >>> >> >>>> http://www.mail-archive.com/xenomai@xenomai.org
> >>> >> >>>>
> >>> >> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
> >>> >> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
> >>> >> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
> >>> >> >>>>
> >>> >> >>>> fangorn:~# cat /proc/analogy/drivers
> >>> >> >>>> --  Analogy drivers --
> >>> >> >>>>
> >>> >> >>>> | idx | driver name
> >>> >> >>>> |  00 | analogy_ni_pcimio
> >>> >> >>>> |  01 | analogy_8255
> >>> >> >>>>
> >>> >> >>>> There are two entries and the drivers are not attached:
> >>> >> >>>>
> >>> >> >>>> fangorn:~# cat /proc/analogy/devices
> >>> >> >>>> --  Analogy devices --
> >>> >> >>>>
> >>> >> >>>> | idx | status | driver
> >>> >> >>>> |  00 | Unused | No driver
> >>> >> >>>> |  01 | Unused | No driver
> >>> >> >>>> |  02 | Unused | No driver
> >>> >> >>>> |  03 | Unused | No driver
> >>> >> >>>> |  04 | Unused | No driver
> >>> >> >>>> |  05 | Unused | No driver
> >>> >> >>>> |  06 | Unused | No driver
> >>> >> >>>> |  07 | Unused | No driver
> >>> >> >>>> |  08 | Unused | No driver
> >>> >> >>>> |  09 | Unused | No driver
> >>> >> >>>>
> >>> >> >>>> I'm aware of the name change of the drivers:
> >>> >> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
> >>> >> >>>>
> >>> >> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
> >>> >> >>>> >- 8255 becomes analogy_8255.
> >>> >> >>>> >Consequently, the command line to attach these drivers has
> >>> >> >>>> >changed. Starting from now, we have to type:
> >>> >> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of
> >>> >> >>>> > a4l_pcimio)
> >>> >> >>>>
> >>> >> >>>> This is what happens when I try to attach the driver to de device:
> >>> >> >>>>
> >>> >> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:last sysfs file:
> >>> >> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
> >>> >> >>>> task=f79013b0 task.ti=f64cc000)
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:I-pipe domain Linux
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:Stack:
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:Call Trace:
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
> >>> >> >>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
> >>> >> >>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
> >>> >> >>>> 00 31
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>> >> >>>> SS:ESP 0068:f64cddc8
> >>> >> >>>>
> >>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>> >> >>>>  kernel:CR2: 0000000000000004
> >>> >> >>>>
> >>> >> >>>>
> >>> >> >>>> relevant dmeg:
> >>> >> >>>>
> >>> >> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> >>> >> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> >>> >> >>>> mite 0000:04:01.0: setting latency timer to 64
> >>> >> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
> >>> >> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
> >>> >> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> >>> >> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
> >>> >> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> >>> >> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
> >>> >> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>> >> >>>> *pde = 00000000
> >>> >> >>>> Oops: 0000 [#1] PREEMPT SMP
> >>> >> >>>> last sysfs file:
> >>> >> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
> >>> >> >>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
> >>> >> >>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
> >>> >> >>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
> >>> >> >>>> e1000 libata unix [last unloaded: scsi_wait_scan]
> >>> >> >>>>
> >>> >> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> >>> >> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
> >>> >> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>> >> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
> >>> >> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
> >>> >> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> >>> >> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> >>> >> >>>>  task.ti=f64cc000) I-pipe domain Linux
> >>> >> >>>> Stack:
> >>> >> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
> >>> >> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
> >>> >> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
> >>> >> >>>> 00000001 f8c31e60 00000030 Call Trace:
> >>> >> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
> >>> >> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >>> >> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >>> >> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
> >>> >> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
> >>> >> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
> >>> >> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
> >>> >> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
> >>> >> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
> >>> >> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
> >>> >> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
> >>> >> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
> >>> >> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
> >>> >> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
> >>> >> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
> >>> >> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
> >>> >> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
> >>> >> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
> >>> >> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
> >>> >> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
> >>> >> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
> >>> >> >>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> >>> >> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> >>> >> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
> >>> >> >>>> 0068:f64cddc8 CR2: 0000000000000004
> >>> >> >>>> ---[ end trace c887d49bb5e86cf4 ]---
> >>> >> >>>
> >>> >> >>> Thanks for such a great report.
> >>> >> >>>
> >>> >> >>> I keep two things in mind:
> >>> >> >>> - cmd_write's error handling path is not buggy (that was already in
> >>> >> >>> my todo list). I will fix that as soon as possible.
> >>> >> >>>
> >>> >> >>> - according to the call-stack dump you made, the irq handler
> >>> >> >>> registering seems to be the source of the trouble. What strikes me
> >>> >> >>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
> >>> >> >>> more in the analogy layer).
> >>> >> >>>
> >>> >> >>> In order to be sure that the problem is located in analogy, it would
> >>> >> >>> be great to test that calling rtdm_request_irq(... , 48, ...) does
> >>> >> >>> not trigger the bug.
> >>> >> >>>
> >>> >> >>> Here is a little test module you could try to insmod. If you do not
> >>> >> >>> want to bother finding out how to compile it, you can replace the
> >>> >> >>> code of an existing rtdm driver (for example:
> >>> >> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
> >>> >> >>>
> >>> >> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
> >>> >> >>> your kernel configuration (in "Processor type and features", disable
> >>> >> >>> the SMP option and disable "IO APIC" under "Local APIC").
> >>> >> >>>
> >>> >> >>> #include <linux/version.h>
> >>> >> >>> #include <linux/module.h>
> >>> >> >>> #include <linux/ioport.h>
> >>> >> >>>
> >>> >> >>> #include <rtdm/rtdm_driver.h>
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> int test_handler(rtdm_irq_t *irq_handle)
> >>> >> >>> {
> >>> >> >>>
> >>> >> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
> >>> >> >>>
> >>> >> >>>        return RTDM_IRQ_HANDLED;
> >>> >> >>> }
> >>> >> >>>
> >>> >> >>> static rtdm_irq_t handle;
> >>> >> >>>
> >>> >> >>> static int __init __test_init(void)
> >>> >> >>> {
> >>> >> >>>
> >>> >> >>>        int err;
> >>> >> >>>
> >>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
> >>> >> >>>
> >>> >> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
> >>> >> >>> "test_irq", NULL);
> >>> >> >>>
> >>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
> >>> >> >>> err);
> >>> >> >>>
> >>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
> >>> >> >>>
> >>> >> >>>        err = rtdm_irq_enable(&handle);
> >>> >> >>>
> >>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
> >>> >> >>> err);
> >>> >> >>>
> >>> >> >>>
> >>> >> >>>        return err;
> >>> >> >>> }
> >>> >> >>>
> >>> >> >>> static void __exit __test_exit(void)
> >>> >> >>> {
> >>> >> >>>
> >>> >> >>>        rtdm_irq_free(&handle);
> >>> >> >>>
> >>> >> >>> }
> >>> >> >>>
> >>> >> >>> module_init(__test_init);
> >>> >> >>> module_exit(__test_exit);
> >>> >> >>>
> >>> >> >>>> Can anyone help?
> >>> >> >>>>
> >>> >> >>>> Best regards
> >>> >> >>>> Ettore Pedretti
> >>> >> >
> >>> >> > Alexis.
> >>> >
> >>> > Alexis.
> >>>
> >>
> >> _______________________________________________
> >> Xenomai-help mailing list
> >> Xenomai-help@domain.hid
> >> https://mail.gna.org/listinfo/xenomai-help
> >>
> >
> >
> >
> > --
> > Ettore Pedretti, SUPA
> > School of Physics and Astronomy
> > University of St Andrews, North Haugh,
> > St Andrews, Fife, KY16 9SS, Scotland
> > Ph: +44 1334 461669, Fax: +44-1334-463104
> > The University of St Andrews is a charity registered in Scotland : No SC013532
> >
> >
> Alexis.
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help


-- 
Philippe.




^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-26  9:34                 ` Alexis Berlemont
  2009-11-26 14:22                   ` Philippe Gerum
@ 2009-11-26 23:38                   ` Ettore Pedretti
  2009-11-27  0:47                     ` Alexis Berlemont
  2009-11-29 23:02                     ` Alexis Berlemont
  1 sibling, 2 replies; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-26 23:38 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
>> Hi Alexis,
>>
>> I applied the patch to my local git repository:
>>
>> fangorn:/usr/src#
>> cd xenomai-head/
>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>> patch_debug_1.diff
>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>> ../patch_debug_1.diff:14: trailing whitespace.
>>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>> warning: 1 line adds whitespace errors.
>>
>> Then created a debian package:
>>
>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>> --git-upstream-branch=origin/master --git-ignore-new
>>
>> built a new kernel package:
>>
>> fakeroot make-kpkg --initrd --added-patches xenomai
>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>
>> and installed the Debian package with dpkg -i
>>
>> This is what happens when i insert the module into the kernel:
>>
>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>> Killed
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>> fangorn:~/control/CHAMP/irqTest#
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:I-pipe domain Linux
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:Stack:
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:Call Trace:
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:Code:  Bad EIP value.
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>
>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>  kernel:CR2: 0000000000000000
>>
>> dmesg after insmod:
>>
>> irq_test: before rtdm_irq_request
>> BUG: unable to handle kernel NULL pointer dereference at (null)
>> IP: [<(null)>] (null)
>> *pde = 00000000
>> Oops: 0000 [#1] PREEMPT SMP
>> last sysfs file: /sys/class/net/lo/operstate
>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>> scsi_wait_scan]
>>
>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>> EIP is at 0x0
>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>> I-pipe domain Linux
>> Stack:
>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
>> Call Trace:
>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>> Code:  Bad EIP value.
>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>> CR2: 0000000000000000
>> ---[ end trace ac2616367ecf94b2 ]---
>>
>> I hope this is what you wanted me to try. Please let me know.
>
> So if I understand well, you "insmoded" the little test module which
> does nothing but calling rtdm_irq_request() and the NULL pointer bug
> occured.

Correct

>
> This bug occurred before calling analogy_config, you did not tried to
> attach the ni_pcimio driver, right ?

I insmod-ed the test module that gave that error dump. I later tried
to attach the driver which causes the usual error. The stack-dumps I
sent are solely related to insmod of test program.

>
> If I am right, it seems like the bug is not located in analogy but
> between Xenomai's nucleus and Ipipe, which is ... weird.
>
> What is your kernel configuration ? no IO_APIC ?

I put back my config to IO_APIC. Should I disable that again?
attached is my kernel configuration (configAnalogy)


> Which irq did you try to request ? 48 or 5 ?

I do not know. do I have to pass parameters to insmod?

This is my /proc/interrupts if that is helpful
           CPU0       CPU1
  0:        222          0   IO-APIC-edge      timer
  1:          0          9   IO-APIC-edge      i8042
  2:          0          0    XT-PIC-XT        cascade
 12:          0        132   IO-APIC-edge      i8042
 14:          0          8   IO-APIC-edge      ata_piix
 15:          0      12358   IO-APIC-edge      ata_piix
 20:          0          0   IO-APIC-fasteoi   astropci0
 28:          0        235   IO-APIC-fasteoi   sata_mv
 54:          0      77950   IO-APIC-fasteoi   eth0
NMI:          0          0   Non-maskable interrupts
LOC:   45365307   45365133   Local timer interrupts
SPU:          0          0   Spurious interrupts
CNT:          0          0   Performance counter interrupts
PND:          0          0   Performance pending work
RES:       2555       2212   Rescheduling interrupts
CAL:         60         58   Function call interrupts
TLB:        419        200   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:        152        152   Machine check polls
ERR:          0
MIS:          0

and my /proc/xenomai/irq

IRQ         CPU0        CPU1
516:           0           0         [IPI]
519:    46161773    46161772         [timer]
520:           0           0         [critical sync]
546:           0           0         [virtual]


>
> Which CPU are you using ?

CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03

As Philippe rightly pointed out this is a 32-bit install although the
CPUs are 64 bit

>
> Thank you for your time.
>
>> Cheers
>> Ettore
>>
>>
>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>> Hi,
>>>>
>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>> and send you the call-stack dump? I am willing to test your patch on
>>>> our hardware as soon as you got one ready, if that can be of help.
>>>
>>> Sorry, I did not answer your question. The bug occurs in both configurations;
>>> so, do not bother changing your configuration for the moment.
>>>
>>>> Cheers
>>>> Ettore
>>>>
>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> > Hi,
>>>> >
>>>> > On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>> >> Hi,
>>>> >>
>>>> >> It is finally working. here is the dmesg after I insert a module:
>>>> >>
>>>> >> irq_test: before rtdm_irq_request
>>>> >> irq_test: after rtdm_irq_request (err = -22)
>>>> >> irq_test: before rtdm_irq_enable
>>>> >> irq_test: after rtdm_irq_enable (err = -22)
>>>> >
>>>> > rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
>>>> > the irq 48 turns into the irq 5;
>>>> >
>>>> >> Attached are a complete call-stack dump and my present kernel
>>>> >>  configuration.
>>>> >
>>>> > With the fact that there is still a NULL pointer bug without IO APIC, the
>>>> > bug is bound to be located in analogy. There may be some wrong write
>>>> > access on the interrupt structure.
>>>> >
>>>> > I will come back with a patch which dumps the structure's content at
>>>> > various locations in the attach code.
>>>> >
>>>> >> Cheers
>>>> >> Ettore
>>>> >>
>>>> >> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> >> > Hi,
>>>> >> >
>>>> >> > On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid.uk>
>>>> >
>>>> > wrote:
>>>> >> >> Hi,
>>>> >> >>
>>>> >> >> I have compiled the module using this makefile:
>>>> >> >>
>>>> >> >> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>> >> >> obj-m   := irqTest.o
>>>> >> >>
>>>> >> >> ifeq ($(prefix),)
>>>> >> >> $(error Please add <xeno-install>/bin to your PATH variable)
>>>> >> >> endif
>>>> >> >>
>>>> >> >> KDIR    := /lib/modules/$(shell uname -r)/build
>>>> >> >> PWD     := $(shell pwd)
>>>> >> >> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>> >> >>
>>>> >> >>
>>>> >> >> all: default
>>>> >> >>
>>>> >> >> default:
>>>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>> >> >>
>>>> >> >> install:
>>>> >> >>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>> >> >>
>>>> >> >> clean:
>>>> >> >>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>> >> >>
>>>> >> >> The module seems to compiles fine:
>>>> >> >>
>>>> >> >> make -C /lib/modules/2.6.31.1/build
>>>> >> >> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>> >> >> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>> >> >>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>> >> >>  Building modules, stage 2.
>>>> >> >>  MODPOST 1 modules
>>>> >> >>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>> >> >>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>> >> >> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>> >> >>
>>>> >> >> To make sure module dependencies are in place I modprobe irqbench
>>>> >> >> (probably not necessary).
>>>> >> >>
>>>> >> >> modprobe xeno_irqbench
>>>> >> >>
>>>> >> >> All the loaded modules:
>>>> >> >>
>>>> >> >> fangorn:~# lsmod
>>>> >> >> Module                  Size  Used by
>>>> >> >> xeno_irqbench           5152  0
>>>> >> >> xeno_native            83296  0
>>>> >> >> analogy_ni_pcimio      15676  0
>>>> >> >> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>> >> >> analogy_ni_tio         21724  1 analogy_ni_mio
>>>> >> >> analogy_8255            4060  1 analogy_ni_mio
>>>> >> >> analogy_ni_mite         9980  3
>>>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>> >> >> 38876  5
>>>> >> >> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>> >> >>ni_ mite xeno_rtdm              24244  3
>>>> >> >> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>> >> >> 10968 0
>>>> >> >> ext3                  112900  1
>>>> >> >> jbd                    44016  1 ext3
>>>> >> >> mbcache                 6652  1 ext3
>>>> >> >> ide_pci_generic         3712  0
>>>> >> >> ide_core               79388  1 ide_pci_generic
>>>> >> >> e1000                 118204  0
>>>> >> >> ata_piix               15968  2
>>>> >> >> sata_mv                27632  0
>>>> >> >> libata                151468  2 ata_piix,sata_mv
>>>> >> >> unix                   24460  10
>>>> >> >>
>>>> >> >>
>>>> >> >> When I insert the module it complains about missing symbols:
>>>> >> >>
>>>> >> >> insmod irqTest.ko
>>>> >> >>
>>>> >> >> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>>> >> >>
>>>> >> >> dmesg:
>>>> >> >>
>>>> >> >> irqTest: module license 'unspecified' taints kernel.
>>>> >> >> Disabling lock debugging due to kernel taint
>>>> >> >> irqTest: Unknown symbol xnintr_enable
>>>> >> >> irqTest: Unknown symbol xnintr_detach
>>>> >> >>
>>>> >> >> What am I doing wrong?
>>>> >> >
>>>> >> > It's me who did wrong. I just tested the compilation inside the
>>>> >> > kernel.
>>>> >> >
>>>> >> > xnintr_* symbols are only exported for GPL compliant modules. So,
>>>> >> > could you add the following line in the test module:
>>>> >> > MODULE_LICENSE("GPL");
>>>> >> >
>>>> >> > With that, the insmod operation should work.
>>>> >> >
>>>> >> >> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>> >> >> problem.
>>>> >> >
>>>> >> > Could you send the call-stack dump ? Maybe, that will unveil a clue.
>>>> >> >
>>>> >> >> Cheers
>>>> >> >> Ettore
>>>> >> >>
>>>> >> >> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>> >> >>> Hi,
>>>> >> >>>
>>>> >> >>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>> >> >>>> Hello,
>>>> >> >>>>
>>>> >> >>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
>>>> >> >>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>> >> >>>> generator board.
>>>> >> >>>>
>>>> >> >>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>>> >> >>>> the following:
>>>> >> >>>>
>>>> >> >>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>> >> >>>> cmd_write: basic descriptor retrieved
>>>> >> >>>>        subdevices count = 0
>>>> >> >>>>        read subdevice index = 0
>>>> >> >>>>        write subdevice index = 0
>>>> >> >>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>> >> >>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>>> >> >>>> 0x0804d008 ***
>>>> >> >>>> ======= Backtrace: =========
>>>> >> >>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>> >> >>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>> >> >>>> cmd_write[0x804927c]
>>>> >> >>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>> >> >>>> cmd_write[0x8048b01]
>>>> >> >>>> ======= Memory map: ========
>>>> >> >>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>>> >> >>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>>> >> >>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>> >> >>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>> >> >>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>> >> >>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>>> >> >>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>>> >> >>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>> >> >>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>> >> >>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>> >> >>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>>>> >> >>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>> >> >>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>> >> >>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>> >> >>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
>>>> >> >>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>> >> >>>> /lib/i686/cmov/libpthread-2.7.so
>>>> >> >>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>> >> >>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>> >> >>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>>> >> >>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>> >> >>>> 00000000 00:00 0
>>>> >> >>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>> >> >>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>>>> >> >>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>> >> >>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>> >> >>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>> >> >>>> /usr/lib/libanalogy.so.1.0.0
>>>> >> >>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>> >> >>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>> >> >>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>> >> >>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>> >> >>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>> >> >>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>> >> >>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>> >> >>>> Aborted
>>>> >> >>>>
>>>> >> >>>> This is probably because the device /dev/analogy0 does not exist.
>>>> >> >>>>
>>>> >> >>>> This is the output of uname -a
>>>> >> >>>>
>>>> >> >>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>>> >> >>>> i686 GNU/Linux
>>>> >> >>>>
>>>> >> >>>> And these are the relevant entries in dmesg
>>>> >> >>>>
>>>> >> >>>> dmesg:
>>>> >> >>>>
>>>> >> >>>> I-pipe 2.4-06: pipeline enabled.
>>>> >> >>>> I-pipe: Domain Xenomai registered.
>>>> >> >>>>
>>>> >> >>>> Xenomai: hal/i386 started.
>>>> >> >>>> Xenomai: scheduling class idle registered.
>>>> >> >>>> Xenomai: scheduling class rt registered.
>>>> >> >>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>> >> >>>> loaded. Xenomai: SMI-enabled chipset found
>>>> >> >>>> Xenomai: SMI workaround enabled
>>>> >> >>>> Xenomai: starting RTDM services.
>>>> >> >>>> Xenomai: starting native API services.
>>>> >> >>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>> >> >>>>
>>>> >> >>>> result of lspci for the relevant board:
>>>> >> >>>>
>>>> >> >>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>> >> >>>>
>>>> >> >>>> And lsmod:
>>>> >> >>>>
>>>> >> >>>> Module                  Size  Used by
>>>> >> >>>> xeno_native           105088  0
>>>> >> >>>> analogy_ni_pcimio      15644  0
>>>> >> >>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>> >> >>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>> >> >>>> analogy_8255            3900  1 analogy_ni_mio
>>>> >> >>>> analogy_ni_mite        10140  3
>>>> >> >>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>> >> >>>>  40220  5
>>>> >> >>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>> >> >>>>y_n i_mit e xeno_rtdm              28436  2
>>>> >> >>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>> >> >>>> ext3                  109636  1
>>>> >> >>>> jbd                    43920  1 ext3
>>>> >> >>>> mbcache                 6272  1 ext3
>>>> >> >>>> ide_pci_generic         3712  0
>>>> >> >>>> ide_core               74204  1 ide_pci_generic
>>>> >> >>>> ata_piix               15748  2
>>>> >> >>>> sata_mv                26448  0
>>>> >> >>>> e1000                 114208  0
>>>> >> >>>> libata                142156  2 ata_piix,sata_mv
>>>> >> >>>> unix                   22992  10
>>>> >> >>>>
>>>> >> >>>>
>>>> >> >>>> According to this post:
>>>> >> >>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>> >> >>>>
>>>> >> >>>> >The analogy driver "a4l_pcimio" will be registered with your last
>>>> >> >>>> >insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>> >> >>>> >/proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>>> >> >>>>
>>>> >> >>>> fangorn:~# cat /proc/analogy/drivers
>>>> >> >>>> --  Analogy drivers --
>>>> >> >>>>
>>>> >> >>>> | idx | driver name
>>>> >> >>>> |  00 | analogy_ni_pcimio
>>>> >> >>>> |  01 | analogy_8255
>>>> >> >>>>
>>>> >> >>>> There are two entries and the drivers are not attached:
>>>> >> >>>>
>>>> >> >>>> fangorn:~# cat /proc/analogy/devices
>>>> >> >>>> --  Analogy devices --
>>>> >> >>>>
>>>> >> >>>> | idx | status | driver
>>>> >> >>>> |  00 | Unused | No driver
>>>> >> >>>> |  01 | Unused | No driver
>>>> >> >>>> |  02 | Unused | No driver
>>>> >> >>>> |  03 | Unused | No driver
>>>> >> >>>> |  04 | Unused | No driver
>>>> >> >>>> |  05 | Unused | No driver
>>>> >> >>>> |  06 | Unused | No driver
>>>> >> >>>> |  07 | Unused | No driver
>>>> >> >>>> |  08 | Unused | No driver
>>>> >> >>>> |  09 | Unused | No driver
>>>> >> >>>>
>>>> >> >>>> I'm aware of the name change of the drivers:
>>>> >> >>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>> >> >>>>
>>>> >> >>>> >- a4l_pcimio becomes analogy_ni_pcimio
>>>> >> >>>> >- 8255 becomes analogy_8255.
>>>> >> >>>> >Consequently, the command line to attach these drivers has
>>>> >> >>>> >changed. Starting from now, we have to type:
>>>> >> >>>> >- analogy_config analogyX analogy_ni_pcimio (instead of
>>>> >> >>>> > a4l_pcimio)
>>>> >> >>>>
>>>> >> >>>> This is what happens when I try to attach the driver to de device:
>>>> >> >>>>
>>>> >> >>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:last sysfs file:
>>>> >> >>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>> >> >>>> task=f79013b0 task.ti=f64cc000)
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:I-pipe domain Linux
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:Stack:
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:Call Trace:
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>>> >> >>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>>> >> >>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>>> >> >>>> 00 31
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>> >> >>>> SS:ESP 0068:f64cddc8
>>>> >> >>>>
>>>> >> >>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>> >> >>>>  kernel:CR2: 0000000000000004
>>>> >> >>>>
>>>> >> >>>>
>>>> >> >>>> relevant dmeg:
>>>> >> >>>>
>>>> >> >>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>> >> >>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>> >> >>>> mite 0000:04:01.0: setting latency timer to 64
>>>> >> >>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>> >> >>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>> >> >>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>>> >> >>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>>>> >> >>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>> >> >>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>>> >> >>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>> >> >>>> *pde = 00000000
>>>> >> >>>> Oops: 0000 [#1] PREEMPT SMP
>>>> >> >>>> last sysfs file:
>>>> >> >>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>>> >> >>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>> >> >>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>>> >> >>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>>> >> >>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>> >> >>>>
>>>> >> >>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>> >> >>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>> >> >>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>> >> >>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>> >> >>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>> >> >>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>> >> >>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>> >> >>>>  task.ti=f64cc000) I-pipe domain Linux
>>>> >> >>>> Stack:
>>>> >> >>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>>> >> >>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>>>> >> >>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>>>> >> >>>> 00000001 f8c31e60 00000030 Call Trace:
>>>> >> >>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>> >> >>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>> >> >>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>> >> >>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>> >> >>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>> >> >>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>> >> >>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>> >> >>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>> >> >>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>> >> >>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>> >> >>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>> >> >>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>> >> >>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>> >> >>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>> >> >>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>> >> >>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>> >> >>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>> >> >>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>> >> >>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>> >> >>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>> >> >>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
>>>> >> >>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>>> >> >>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>> >> >>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>> >> >>>> 0068:f64cddc8 CR2: 0000000000000004
>>>> >> >>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>> >> >>>
>>>> >> >>> Thanks for such a great report.
>>>> >> >>>
>>>> >> >>> I keep two things in mind:
>>>> >> >>> - cmd_write's error handling path is not buggy (that was already in
>>>> >> >>> my todo list). I will fix that as soon as possible.
>>>> >> >>>
>>>> >> >>> - according to the call-stack dump you made, the irq handler
>>>> >> >>> registering seems to be the source of the trouble. What strikes me
>>>> >> >>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>>> >> >>> more in the analogy layer).
>>>> >> >>>
>>>> >> >>> In order to be sure that the problem is located in analogy, it would
>>>> >> >>> be great to test that calling rtdm_request_irq(... , 48, ...) does
>>>> >> >>> not trigger the bug.
>>>> >> >>>
>>>> >> >>> Here is a little test module you could try to insmod. If you do not
>>>> >> >>> want to bother finding out how to compile it, you can replace the
>>>> >> >>> code of an existing rtdm driver (for example:
>>>> >> >>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>> >> >>>
>>>> >> >>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
>>>> >> >>> your kernel configuration (in "Processor type and features", disable
>>>> >> >>> the SMP option and disable "IO APIC" under "Local APIC").
>>>> >> >>>
>>>> >> >>> #include <linux/version.h>
>>>> >> >>> #include <linux/module.h>
>>>> >> >>> #include <linux/ioport.h>
>>>> >> >>>
>>>> >> >>> #include <rtdm/rtdm_driver.h>
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> int test_handler(rtdm_irq_t *irq_handle)
>>>> >> >>> {
>>>> >> >>>
>>>> >> >>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>>> >> >>>
>>>> >> >>>        return RTDM_IRQ_HANDLED;
>>>> >> >>> }
>>>> >> >>>
>>>> >> >>> static rtdm_irq_t handle;
>>>> >> >>>
>>>> >> >>> static int __init __test_init(void)
>>>> >> >>> {
>>>> >> >>>
>>>> >> >>>        int err;
>>>> >> >>>
>>>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>> >> >>>
>>>> >> >>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>> >> >>> "test_irq", NULL);
>>>> >> >>>
>>>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>>>> >> >>> err);
>>>> >> >>>
>>>> >> >>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>> >> >>>
>>>> >> >>>        err = rtdm_irq_enable(&handle);
>>>> >> >>>
>>>> >> >>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>>> >> >>> err);
>>>> >> >>>
>>>> >> >>>
>>>> >> >>>        return err;
>>>> >> >>> }
>>>> >> >>>
>>>> >> >>> static void __exit __test_exit(void)
>>>> >> >>> {
>>>> >> >>>
>>>> >> >>>        rtdm_irq_free(&handle);
>>>> >> >>>
>>>> >> >>> }
>>>> >> >>>
>>>> >> >>> module_init(__test_init);
>>>> >> >>> module_exit(__test_exit);
>>>> >> >>>
>>>> >> >>>> Can anyone help?
>>>> >> >>>>
>>>> >> >>>> Best regards
>>>> >> >>>> Ettore Pedretti
>>>> >> >
>>>> >> > Alexis.
>>>> >
>>>> > Alexis.
>>>>
>>>
>>> _______________________________________________
>>> Xenomai-help mailing list
>>> Xenomai-help@domain.hid
>>> https://mail.gna.org/listinfo/xenomai-help
>>>
>>

[-- Attachment #2: ConfigAnalogy --]
[-- Type: application/octet-stream, Size: 40357 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.31.1
# Mon Nov 23 16:11:24 2009
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_X86_32_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_X86_32_LAZY_GS=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y

#
# RCU Subsystem
#
CONFIG_CLASSIC_RCU=y
# CONFIG_TREE_RCU is not set
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_PREEMPT_RCU_TRACE is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=15
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
# CONFIG_GROUP_SCHED is not set
# CONFIG_CGROUPS is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_COUNTERS=y

#
# Performance Counters
#
# CONFIG_PERF_COUNTERS is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_API_DEBUG=y

#
# GCOV-based kernel profiling
#
# CONFIG_SLOW_WORK is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"

#
# Real-time sub-system
#
CONFIG_XENOMAI=y
CONFIG_XENO_GENERIC_STACKPOOL=y
CONFIG_XENO_FASTSYNCH=y
CONFIG_XENO_OPT_NUCLEUS=y
CONFIG_XENO_OPT_PERVASIVE=y
CONFIG_XENO_OPT_PRIOCPL=y
CONFIG_XENO_OPT_PIPELINE_HEAD=y
# CONFIG_XENO_OPT_SCHED_CLASSES is not set
CONFIG_XENO_OPT_PIPE=y
CONFIG_XENO_OPT_PIPE_NRDEV=32
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512
CONFIG_XENO_OPT_SYS_HEAPSZ=2048
CONFIG_XENO_OPT_SYS_STACKPOOLSZ=32
CONFIG_XENO_OPT_SEM_HEAPSZ=12
CONFIG_XENO_OPT_GLOBAL_SEM_HEAPSZ=12
CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
# CONFIG_XENO_OPT_SHIRQ is not set
CONFIG_XENO_OPT_SELECT=y

#
# Timing
#
# CONFIG_XENO_OPT_TIMING_PERIODIC is not set
CONFIG_XENO_OPT_TIMING_VIRTICK=1000
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0

#
# Scalability
#
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set
# CONFIG_XENO_OPT_TIMER_WHEEL is not set

#
# Machine
#
CONFIG_XENO_HW_FPU=y

#
# NMI watchdog
#
# CONFIG_XENO_HW_NMI_DEBUG_LATENCY is not set

#
# SMI workaround
#
# CONFIG_XENO_HW_SMI_DETECT_DISABLE is not set
CONFIG_XENO_HW_SMI_DETECT=y
CONFIG_XENO_HW_SMI_WORKAROUND=y
CONFIG_XENO_HW_SMI_ALL=y

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=m
CONFIG_XENO_OPT_NATIVE_PERIOD=0
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=65536
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_BUFFER=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
CONFIG_XENO_OPT_NATIVE_INTR=y
CONFIG_XENO_SKIN_POSIX=m
CONFIG_XENO_OPT_POSIX_PERIOD=0
# CONFIG_XENO_OPT_POSIX_SHM is not set
# CONFIG_XENO_OPT_POSIX_INTR is not set
# CONFIG_XENO_OPT_POSIX_SELECT is not set
CONFIG_XENO_OPT_DEBUG_POSIX=y
# CONFIG_XENO_SKIN_PSOS is not set
# CONFIG_XENO_SKIN_UITRON is not set
# CONFIG_XENO_SKIN_VRTX is not set
# CONFIG_XENO_SKIN_VXWORKS is not set
# CONFIG_XENO_SKIN_RTAI is not set
# CONFIG_XENO_OPT_NOWARN_DEPRECATED is not set
CONFIG_XENO_SKIN_RTDM=m
CONFIG_XENO_OPT_RTDM_PERIOD=0
CONFIG_XENO_OPT_RTDM_FILDES=128
CONFIG_XENO_OPT_RTDM_SELECT=y

#
# Drivers
#

#
# Serial drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set

#
# Testing drivers
#
CONFIG_XENO_KLATENCY_MODULE=m
# CONFIG_XENO_DRIVERS_TIMERBENCH is not set
# CONFIG_XENO_DRIVERS_IRQBENCH is not set
# CONFIG_XENO_DRIVERS_SWITCHTEST is not set

#
# CAN drivers
#
# CONFIG_XENO_DRIVERS_CAN is not set

#
# ANALOGY drivers
#
CONFIG_XENO_DRIVERS_ANALOGY=m
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=0
# CONFIG_XENO_DRIVERS_ANALOGY_FAKE is not set
# CONFIG_XENO_DRIVERS_ANALOGY_LOOP is not set
CONFIG_XENO_DRIVERS_ANALOGY_8255=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_MITE=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_TIO=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_MIO=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_PCIMIO=m

#
# Real-time IPC drivers
#
# CONFIG_XENO_DRIVERS_RTIPC is not set
# CONFIG_FREEZER is not set

#
# Processor type and features
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
# CONFIG_SPARSE_IRQ is not set
CONFIG_X86_MPPARSE=y
# CONFIG_X86_BIGSMP is not set
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_32_NON_STANDARD is not set
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_MEMTEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CPU=y
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_CYRIX_32=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_CPU_SUP_UMC_32=y
# CONFIG_X86_DS is not set
# CONFIG_HPET_TIMER is not set
CONFIG_DMI=y
# CONFIG_IOMMU_HELPER is not set
# CONFIG_IOMMU_API is not set
CONFIG_NR_CPUS=8
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_IPIPE=y
CONFIG_IPIPE_DOMAINS=4
CONFIG_IPIPE_COMPAT=y
CONFIG_IPIPE_DELAYED_ATOMICSW=y
# CONFIG_IPIPE_UNMASKED_CONTEXT_SWITCH is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
CONFIG_X86_MCE=y
# CONFIG_X86_OLD_MCE is not set
CONFIG_X86_NEW_MCE=y
CONFIG_X86_MCE_INTEL=y
# CONFIG_X86_MCE_AMD is not set
# CONFIG_X86_ANCIENT_MCE is not set
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_X86_CPU_DEBUG is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_X86_PAE is not set
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW_64K=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
# CONFIG_X86_PAT is not set
CONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
# CONFIG_SCHED_HRTICK is not set
# CONFIG_KEXEC is not set
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
# CONFIG_HOTPLUG_CPU is not set
CONFIG_COMPAT_VDSO=y
# CONFIG_CMDLINE_BOOL is not set

#
# Power management and ACPI options
#
# CONFIG_PM is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
# CONFIG_CPU_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
# CONFIG_PCI_GOOLPC is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
# CONFIG_PCIE_ECRC is not set
# CONFIG_PCIEAER_INJECT is not set
# CONFIG_PCIEASPM is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_STUB is not set
CONFIG_HT_IRQ=y
# CONFIG_PCI_IOV is not set
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
# CONFIG_OLPC is not set
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_HAVE_AOUT=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y
CONFIG_HAVE_ATOMIC_IOMAP=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=m
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_XFRM_MODE_BEET=m
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
# CONFIG_NF_CONNTRACK is not set
# CONFIG_NETFILTER_XTABLES is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV4 is not set
CONFIG_IP_NF_QUEUE=y
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
# CONFIG_BLK_DEV is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=m

#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_XFER_MODE=y
CONFIG_IDE_TIMINGS=y
CONFIG_IDE_ATAPI=y
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_IDE_GD=m
CONFIG_IDE_GD_ATA=y
# CONFIG_IDE_GD_ATAPI is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_PLATFORM is not set
CONFIG_BLK_DEV_CMD640=m
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=m
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_RZ1000=m
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_CS5536 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8172 is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
# CONFIG_BLK_DEV_IDEDMA is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_SATA_PMP=y
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
# CONFIG_SATA_SVW is not set
CONFIG_ATA_PIIX=m
CONFIG_SATA_MV=m
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_SCH is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#

#
# You can enable one or both FireWire driver stacks.
#

#
# See the help texts for more information.
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_ETHOC is not set
# CONFIG_DNET is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
CONFIG_8139TOO=m
CONFIG_8139TOO_PIO=y
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SMSC9420 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_KS8842 is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NET_POCKET is not set
# CONFIG_ATL2 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=m
# CONFIG_E1000E is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_DEVKMEM=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=m
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=m
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_CHARDEV is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_SIMTEC is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set

#
# Graphics adapter I2C/DDC channel drivers
#
# CONFIG_I2C_VOODOO3 is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_STUB is not set
# CONFIG_SCx200_ACB is not set

#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_SPI is not set

#
# PPS support
#
# CONFIG_PPS is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7473 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHER is not set
# CONFIG_SENSORS_FSCPOS is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_AB3100_CORE is not set
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set

#
# Graphics support
#
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
CONFIG_HID_DEBUG=y
# CONFIG_HIDRAW is not set
# CONFIG_HID_PID is not set

#
# Special HID drivers
#
# CONFIG_USB_SUPPORT is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set

#
# TI VLYNQ
#
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_ISCSI_IBFT_FIND is not set

#
# File systems
#
CONFIG_EXT2_FS=m
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
# CONFIG_EXT4_FS is not set
CONFIG_JBD=m
CONFIG_FS_MBCACHE=m
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
# CONFIG_FUSE_FS is not set

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
# CONFIG_DLM is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_UNUSED_SYMBOLS=y
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
# CONFIG_IPIPE_DEBUG is not set
# CONFIG_DEBUG_KERNEL is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FTRACE_SYSCALLS=y
CONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_STRICT_DEVMEM is not set
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_4KSTACKS is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_IOMMU_STRESS is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_OPTIMIZE_INLINING is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
# CONFIG_CRYPTO_FIPS is not set
CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_ALGAPI2=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_HASH2=m
# CONFIG_CRYPTO_MANAGER is not set
# CONFIG_CRYPTO_MANAGER2 is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
# CONFIG_CRYPTO_CBC is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
CONFIG_HAVE_KVM=y
CONFIG_HAVE_KVM_IRQCHIP=y
# CONFIG_VIRTUALIZATION is not set
# CONFIG_BINARY_PRINTF is not set

#
# Library routines
#
CONFIG_BITREVERSE=m
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_FIND_LAST_BIT=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=m
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-26 14:22                   ` Philippe Gerum
@ 2009-11-27  0:43                     ` Alexis Berlemont
  2009-11-27 18:14                       ` Philippe Gerum
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-27  0:43 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

Hi Philippe,

Philippe Gerum wrote:
> On Thu, 2009-11-26 at 10:34 +0100, Alexis Berlemont wrote:
>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
>>> Hi Alexis,
>>>
>>> I applied the patch to my local git repository:
>>>
>>> fangorn:/usr/src#
>>> cd xenomai-head/
>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>> patch_debug_1.diff
>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>> warning: 1 line adds whitespace errors.
>>>
>>> Then created a debian package:
>>>
>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>> --git-upstream-branch=origin/master --git-ignore-new
>>>
>>> built a new kernel package:
>>>
>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>
>>> and installed the Debian package with dpkg -i
>>>
>>> This is what happens when i insert the module into the kernel:
>>>
>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>> Killed
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>> fangorn:~/control/CHAMP/irqTest#
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:I-pipe domain Linux
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Stack:
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Call Trace:
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Code:  Bad EIP value.
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:CR2: 0000000000000000
>>>
>>> dmesg after insmod:
>>>
>>> irq_test: before rtdm_irq_request
>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>> IP: [<(null)>] (null)
>>> *pde = 00000000
>>> Oops: 0000 [#1] PREEMPT SMP
>>> last sysfs file: /sys/class/net/lo/operstate
>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>> scsi_wait_scan]
>>>
>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>> EIP is at 0x0
>>> EAX: 00000030
> 
> This is likely IRQ 48, with rthal_irq_enable jumping to address zero.
> 
>>  EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>> I-pipe domain Linux
>>> Stack:
>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
>>> Call Trace:
>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>> Code:  Bad EIP value.
>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>> CR2: 0000000000000000
>>> ---[ end trace ac2616367ecf94b2 ]---
>>>
>>> I hope this is what you wanted me to try. Please let me know.
>> So if I understand well, you "insmoded" the little test module which
>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>> occured.
>>
>> This bug occurred before calling analogy_config, you did not tried to
>> attach the ni_pcimio driver, right ?
>>
>> If I am right, it seems like the bug is not located in analogy but
>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>
> 
> The IRQ requested does not seem to have been associated with any chip
> controller, which is likely the basic issue.

I had a look at arch/x86/kernel/apic/io_apic.c and the only controllers 
which seem left unhandled by ipipe are the remapped ones (and the hpet 
but I doubt it could be the hpet). Do you see any other possibility ?

Do you think that writing a little test module which requests the irq 
(through Linux API) is a good idea ?

After having loaded this module, the problematic controller should be 
listed in /proc/interrupts...

>> What is your kernel configuration ? no IO_APIC ?
>> Which irq did you try to request ? 48 or 5 ?
>>
>> Which CPU are you using ?
>>
> 
> Looks like something being used in x86_32 mode.
> 
>> Thank you for your time.
>>
>>> Cheers
>>> Ettore
>>>
>>>
>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>> Hi,
>>>>>
>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>> Sorry, I did not answer your question. The bug occurs in both configurations;
>>>> so, do not bother changing your configuration for the moment.
>>>>
>>>>> Cheers
>>>>> Ettore
>>>>>
>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>> Hi,
>>>>>>
>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>
>>>>>>> irq_test: before rtdm_irq_request
>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
>>>>>> the irq 48 turns into the irq 5;
>>>>>>
>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>  configuration.
>>>>>> With the fact that there is still a NULL pointer bug without IO APIC, the
>>>>>> bug is bound to be located in analogy. There may be some wrong write
>>>>>> access on the interrupt structure.
>>>>>>
>>>>>> I will come back with a patch which dumps the structure's content at
>>>>>> various locations in the attach code.
>>>>>>
>>>>>>> Cheers
>>>>>>> Ettore
>>>>>>>
>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
>>>>>> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>
>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>
>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>> endif
>>>>>>>>>
>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> all: default
>>>>>>>>>
>>>>>>>>> default:
>>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>
>>>>>>>>> install:
>>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>
>>>>>>>>> clean:
>>>>>>>>>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>
>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>
>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>
>>>>>>>>> To make sure module dependencies are in place I modprobe irqbench
>>>>>>>>> (probably not necessary).
>>>>>>>>>
>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>
>>>>>>>>> All the loaded modules:
>>>>>>>>>
>>>>>>>>> fangorn:~# lsmod
>>>>>>>>> Module                  Size  Used by
>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>> xeno_native            83296  0
>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>> 38876  5
>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>> 10968 0
>>>>>>>>> ext3                  112900  1
>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>> e1000                 118204  0
>>>>>>>>> ata_piix               15968  2
>>>>>>>>> sata_mv                27632  0
>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>> unix                   24460  10
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>
>>>>>>>>> insmod irqTest.ko
>>>>>>>>>
>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>>>>>>>>
>>>>>>>>> dmesg:
>>>>>>>>>
>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>
>>>>>>>>> What am I doing wrong?
>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>> kernel.
>>>>>>>>
>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>> could you add the following line in the test module:
>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>
>>>>>>>> With that, the insmod operation should work.
>>>>>>>>
>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>> problem.
>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a clue.
>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Ettore
>>>>>>>>>
>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>> generator board.
>>>>>>>>>>>
>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>>>>>>>>>> the following:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>        subdevices count = 0
>>>>>>>>>>>        read subdevice index = 0
>>>>>>>>>>>        write subdevice index = 0
>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>> Aborted
>>>>>>>>>>>
>>>>>>>>>>> This is probably because the device /dev/analogy0 does not exist.
>>>>>>>>>>>
>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>
>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>
>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>
>>>>>>>>>>> dmesg:
>>>>>>>>>>>
>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>
>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>
>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>
>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>
>>>>>>>>>>> And lsmod:
>>>>>>>>>>>
>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>  40220  5
>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> According to this post:
>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>
>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your last
>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>
>>>>>>>>>>> | idx | driver name
>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>
>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>
>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>
>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>
>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>> This is what happens when I try to attach the driver to de device:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>>>>>>>>>> 00 31
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>
>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>> last sysfs file:
>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>
>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>> Stack:
>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>
>>>>>>>>>> I keep two things in mind:
>>>>>>>>>> - cmd_write's error handling path is not buggy (that was already in
>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>
>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>> registering seems to be the source of the trouble. What strikes me
>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>
>>>>>>>>>> In order to be sure that the problem is located in analogy, it would
>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...) does
>>>>>>>>>> not trigger the bug.
>>>>>>>>>>
>>>>>>>>>> Here is a little test module you could try to insmod. If you do not
>>>>>>>>>> want to bother finding out how to compile it, you can replace the
>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>
>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
>>>>>>>>>> your kernel configuration (in "Processor type and features", disable
>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>
>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>
>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>
>>>>>>>>>>        return RTDM_IRQ_HANDLED;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>
>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        int err;
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>
>>>>>>>>>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>>>>>>>>>> err);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>
>>>>>>>>>>        err = rtdm_irq_enable(&handle);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>>>>>>>>> err);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>        return err;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        rtdm_irq_free(&handle);
>>>>>>>>>>
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> module_init(__test_init);
>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>
>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>
>>>>>>>>>>> Best regards
>>>>>>>>>>> Ettore Pedretti
>>>>>>>> Alexis.
>>>>>> Alexis.
>>>> _______________________________________________
>>>> Xenomai-help mailing list
>>>> Xenomai-help@domain.hid
>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>
>>>
>>>
>>> --
>>> Ettore Pedretti, SUPA
>>> School of Physics and Astronomy
>>> University of St Andrews, North Haugh,
>>> St Andrews, Fife, KY16 9SS, Scotland
>>> Ph: +44 1334 461669, Fax: +44-1334-463104
>>> The University of St Andrews is a charity registered in Scotland : No SC013532
>>>
>>>
>> Alexis.
>>
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
> 
> 



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-26 23:38                   ` Ettore Pedretti
@ 2009-11-27  0:47                     ` Alexis Berlemont
  2009-11-29 23:02                     ` Alexis Berlemont
  1 sibling, 0 replies; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-27  0:47 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

Ettore Pedretti wrote:
> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
>>> Hi Alexis,
>>>
>>> I applied the patch to my local git repository:
>>>
>>> fangorn:/usr/src#
>>> cd xenomai-head/
>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>> patch_debug_1.diff
>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>> warning: 1 line adds whitespace errors.
>>>
>>> Then created a debian package:
>>>
>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>> --git-upstream-branch=origin/master --git-ignore-new
>>>
>>> built a new kernel package:
>>>
>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>
>>> and installed the Debian package with dpkg -i
>>>
>>> This is what happens when i insert the module into the kernel:
>>>
>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>> Killed
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>> fangorn:~/control/CHAMP/irqTest#
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:I-pipe domain Linux
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Stack:
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Call Trace:
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Code:  Bad EIP value.
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:CR2: 0000000000000000
>>>
>>> dmesg after insmod:
>>>
>>> irq_test: before rtdm_irq_request
>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>> IP: [<(null)>] (null)
>>> *pde = 00000000
>>> Oops: 0000 [#1] PREEMPT SMP
>>> last sysfs file: /sys/class/net/lo/operstate
>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>> scsi_wait_scan]
>>>
>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>> EIP is at 0x0
>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>> I-pipe domain Linux
>>> Stack:
>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
>>> Call Trace:
>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>> Code:  Bad EIP value.
>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>> CR2: 0000000000000000
>>> ---[ end trace ac2616367ecf94b2 ]---
>>>
>>> I hope this is what you wanted me to try. Please let me know.
>> So if I understand well, you "insmoded" the little test module which
>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>> occured.
> 
> Correct
> 
>> This bug occurred before calling analogy_config, you did not tried to
>> attach the ni_pcimio driver, right ?
> 
> I insmod-ed the test module that gave that error dump. I later tried
> to attach the driver which causes the usual error. The stack-dumps I
> sent are solely related to insmod of test program.
> 
>> If I am right, it seems like the bug is not located in analogy but
>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>
>> What is your kernel configuration ? no IO_APIC ?
> 
> I put back my config to IO_APIC. Should I disable that again?
> attached is my kernel configuration (configAnalogy)
> 
> 
>> Which irq did you try to request ? 48 or 5 ?
> 
> I do not know. do I have to pass parameters to insmod?

No, you just have to change the irq number in the source code and 
recompile it. However, if you have re-enabled the IO-APIC in the kernel 
config, that should be ok (48 was already set in the code).

> 
> This is my /proc/interrupts if that is helpful
>            CPU0       CPU1
>   0:        222          0   IO-APIC-edge      timer
>   1:          0          9   IO-APIC-edge      i8042
>   2:          0          0    XT-PIC-XT        cascade
>  12:          0        132   IO-APIC-edge      i8042
>  14:          0          8   IO-APIC-edge      ata_piix
>  15:          0      12358   IO-APIC-edge      ata_piix
>  20:          0          0   IO-APIC-fasteoi   astropci0
>  28:          0        235   IO-APIC-fasteoi   sata_mv
>  54:          0      77950   IO-APIC-fasteoi   eth0
> NMI:          0          0   Non-maskable interrupts
> LOC:   45365307   45365133   Local timer interrupts
> SPU:          0          0   Spurious interrupts
> CNT:          0          0   Performance counter interrupts
> PND:          0          0   Performance pending work
> RES:       2555       2212   Rescheduling interrupts
> CAL:         60         58   Function call interrupts
> TLB:        419        200   TLB shootdowns
> TRM:          0          0   Thermal event interrupts
> THR:          0          0   Threshold APIC interrupts
> MCE:          0          0   Machine check exceptions
> MCP:        152        152   Machine check polls
> ERR:          0
> MIS:          0
> 
> and my /proc/xenomai/irq
> 
> IRQ         CPU0        CPU1
> 516:           0           0         [IPI]
> 519:    46161773    46161772         [timer]
> 520:           0           0         [critical sync]
> 546:           0           0         [virtual]
> 
> 
>> Which CPU are you using ?
> 
> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
> 
> As Philippe rightly pointed out this is a 32-bit install although the
> CPUs are 64 bit
> 
>> Thank you for your time.
>>
>>> Cheers
>>> Ettore
>>>
>>>
>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>> Hi,
>>>>>
>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>> Sorry, I did not answer your question. The bug occurs in both configurations;
>>>> so, do not bother changing your configuration for the moment.
>>>>
>>>>> Cheers
>>>>> Ettore
>>>>>
>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>> Hi,
>>>>>>
>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>
>>>>>>> irq_test: before rtdm_irq_request
>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
>>>>>> the irq 48 turns into the irq 5;
>>>>>>
>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>  configuration.
>>>>>> With the fact that there is still a NULL pointer bug without IO APIC, the
>>>>>> bug is bound to be located in analogy. There may be some wrong write
>>>>>> access on the interrupt structure.
>>>>>>
>>>>>> I will come back with a patch which dumps the structure's content at
>>>>>> various locations in the attach code.
>>>>>>
>>>>>>> Cheers
>>>>>>> Ettore
>>>>>>>
>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
>>>>>> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>
>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>
>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>> endif
>>>>>>>>>
>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> all: default
>>>>>>>>>
>>>>>>>>> default:
>>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>
>>>>>>>>> install:
>>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>
>>>>>>>>> clean:
>>>>>>>>>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>
>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>
>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>
>>>>>>>>> To make sure module dependencies are in place I modprobe irqbench
>>>>>>>>> (probably not necessary).
>>>>>>>>>
>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>
>>>>>>>>> All the loaded modules:
>>>>>>>>>
>>>>>>>>> fangorn:~# lsmod
>>>>>>>>> Module                  Size  Used by
>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>> xeno_native            83296  0
>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>> 38876  5
>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>> 10968 0
>>>>>>>>> ext3                  112900  1
>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>> e1000                 118204  0
>>>>>>>>> ata_piix               15968  2
>>>>>>>>> sata_mv                27632  0
>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>> unix                   24460  10
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>
>>>>>>>>> insmod irqTest.ko
>>>>>>>>>
>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>>>>>>>>
>>>>>>>>> dmesg:
>>>>>>>>>
>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>
>>>>>>>>> What am I doing wrong?
>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>> kernel.
>>>>>>>>
>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>> could you add the following line in the test module:
>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>
>>>>>>>> With that, the insmod operation should work.
>>>>>>>>
>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>> problem.
>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a clue.
>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Ettore
>>>>>>>>>
>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>> generator board.
>>>>>>>>>>>
>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>>>>>>>>>> the following:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>        subdevices count = 0
>>>>>>>>>>>        read subdevice index = 0
>>>>>>>>>>>        write subdevice index = 0
>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>> Aborted
>>>>>>>>>>>
>>>>>>>>>>> This is probably because the device /dev/analogy0 does not exist.
>>>>>>>>>>>
>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>
>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>
>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>
>>>>>>>>>>> dmesg:
>>>>>>>>>>>
>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>
>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>
>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>
>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>
>>>>>>>>>>> And lsmod:
>>>>>>>>>>>
>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>  40220  5
>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> According to this post:
>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>
>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your last
>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>
>>>>>>>>>>> | idx | driver name
>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>
>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>
>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>
>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>
>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>> This is what happens when I try to attach the driver to de device:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>>>>>>>>>> 00 31
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>
>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>> last sysfs file:
>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>
>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>> Stack:
>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>
>>>>>>>>>> I keep two things in mind:
>>>>>>>>>> - cmd_write's error handling path is not buggy (that was already in
>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>
>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>> registering seems to be the source of the trouble. What strikes me
>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>
>>>>>>>>>> In order to be sure that the problem is located in analogy, it would
>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...) does
>>>>>>>>>> not trigger the bug.
>>>>>>>>>>
>>>>>>>>>> Here is a little test module you could try to insmod. If you do not
>>>>>>>>>> want to bother finding out how to compile it, you can replace the
>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>
>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
>>>>>>>>>> your kernel configuration (in "Processor type and features", disable
>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>
>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>
>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>
>>>>>>>>>>        return RTDM_IRQ_HANDLED;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>
>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        int err;
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>
>>>>>>>>>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>>>>>>>>>> err);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>
>>>>>>>>>>        err = rtdm_irq_enable(&handle);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>>>>>>>>> err);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>        return err;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        rtdm_irq_free(&handle);
>>>>>>>>>>
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> module_init(__test_init);
>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>
>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>
>>>>>>>>>>> Best regards
>>>>>>>>>>> Ettore Pedretti
>>>>>>>> Alexis.
>>>>>> Alexis.
>>>> _______________________________________________
>>>> Xenomai-help mailing list
>>>> Xenomai-help@domain.hid
>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>
>> >

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-27  0:43                     ` Alexis Berlemont
@ 2009-11-27 18:14                       ` Philippe Gerum
  2009-11-27 18:30                         ` Philippe Gerum
  0 siblings, 1 reply; 35+ messages in thread
From: Philippe Gerum @ 2009-11-27 18:14 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

On Fri, 2009-11-27 at 01:43 +0100, Alexis Berlemont wrote:
> Hi Philippe,
> 
> Philippe Gerum wrote:
> > On Thu, 2009-11-26 at 10:34 +0100, Alexis Berlemont wrote:
> >> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
> >>> Hi Alexis,
> >>>
> >>> I applied the patch to my local git repository:
> >>>
> >>> fangorn:/usr/src#
> >>> cd xenomai-head/
> >>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> >>> patch_debug_1.diff
> >>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> >>> ../patch_debug_1.diff:14: trailing whitespace.
> >>>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
> >>> warning: 1 line adds whitespace errors.
> >>>
> >>> Then created a debian package:
> >>>
> >>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
> >>> --git-upstream-branch=origin/master --git-ignore-new
> >>>
> >>> built a new kernel package:
> >>>
> >>> fakeroot make-kpkg --initrd --added-patches xenomai
> >>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
> >>>
> >>> and installed the Debian package with dpkg -i
> >>>
> >>> This is what happens when i insert the module into the kernel:
> >>>
> >>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
> >>> Killed
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> >>> fangorn:~/control/CHAMP/irqTest#
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:last sysfs file: /sys/class/net/lo/operstate
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:I-pipe domain Linux
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:Stack:
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:Call Trace:
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:Code:  Bad EIP value.
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> >>>
> >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> >>>  kernel:CR2: 0000000000000000
> >>>
> >>> dmesg after insmod:
> >>>
> >>> irq_test: before rtdm_irq_request
> >>> BUG: unable to handle kernel NULL pointer dereference at (null)
> >>> IP: [<(null)>] (null)
> >>> *pde = 00000000
> >>> Oops: 0000 [#1] PREEMPT SMP
> >>> last sysfs file: /sys/class/net/lo/operstate
> >>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
> >>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
> >>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
> >>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
> >>> scsi_wait_scan]
> >>>
> >>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
> >>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
> >>> EIP is at 0x0
> >>> EAX: 00000030
> > 
> > This is likely IRQ 48, with rthal_irq_enable jumping to address zero.
> > 
> >>  EBX: 00000000 ECX: 00000030 EDX: c1250b80
> >>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
> >>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> >>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> >>> I-pipe domain Linux
> >>> Stack:
> >>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
> >>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
> >>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
> >>> Call Trace:
> >>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
> >>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
> >>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
> >>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
> >>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
> >>>  [<c1001028>] ? do_one_initcall+0x23/0x183
> >>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
> >>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
> >>>  [<c1092cc5>] ? sys_close+0x71/0xb5
> >>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
> >>> Code:  Bad EIP value.
> >>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> >>> CR2: 0000000000000000
> >>> ---[ end trace ac2616367ecf94b2 ]---
> >>>
> >>> I hope this is what you wanted me to try. Please let me know.
> >> So if I understand well, you "insmoded" the little test module which
> >> does nothing but calling rtdm_irq_request() and the NULL pointer bug
> >> occured.
> >>
> >> This bug occurred before calling analogy_config, you did not tried to
> >> attach the ni_pcimio driver, right ?
> >>
> >> If I am right, it seems like the bug is not located in analogy but
> >> between Xenomai's nucleus and Ipipe, which is ... weird.
> >>
> > 
> > The IRQ requested does not seem to have been associated with any chip
> > controller, which is likely the basic issue.
> 
> I had a look at arch/x86/kernel/apic/io_apic.c and the only controllers 
> which seem left unhandled by ipipe are the remapped ones (and the hpet 
> but I doubt it could be the hpet). Do you see any other possibility ?
> 

What needs to be assessed is whether irq48 gets registered through
ioapic_register_intr() because a routing was found, or not. Likely not.

> Do you think that writing a little test module which requests the irq 
> (through Linux API) is a good idea ?
> 
> After having loaded this module, the problematic controller should be 
> listed in /proc/interrupts...
> 

/proc/interrupts only lists Linux requested interrupts, not necessarily
all registered ones. So this won't do, since you likely don't want some
Linux driver to request an interrupt an RTDM driver wants to handle
(i.e. no IRQ sharing between domains).

> >> What is your kernel configuration ? no IO_APIC ?
> >> Which irq did you try to request ? 48 or 5 ?
> >>
> >> Which CPU are you using ?
> >>
> > 
> > Looks like something being used in x86_32 mode.
> > 
> >> Thank you for your time.
> >>
> >>> Cheers
> >>> Ettore
> >>>
> >>>
> >>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
> >>>>> Hi,
> >>>>>
> >>>>> Would it help at this stage if I re-enable IO APIC, run your program
> >>>>> and send you the call-stack dump? I am willing to test your patch on
> >>>>> our hardware as soon as you got one ready, if that can be of help.
> >>>> Sorry, I did not answer your question. The bug occurs in both configurations;
> >>>> so, do not bother changing your configuration for the moment.
> >>>>
> >>>>> Cheers
> >>>>> Ettore
> >>>>>
> >>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >>>>>> Hi,
> >>>>>>
> >>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> It is finally working. here is the dmesg after I insert a module:
> >>>>>>>
> >>>>>>> irq_test: before rtdm_irq_request
> >>>>>>> irq_test: after rtdm_irq_request (err = -22)
> >>>>>>> irq_test: before rtdm_irq_enable
> >>>>>>> irq_test: after rtdm_irq_enable (err = -22)
> >>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
> >>>>>> the irq 48 turns into the irq 5;
> >>>>>>
> >>>>>>> Attached are a complete call-stack dump and my present kernel
> >>>>>>>  configuration.
> >>>>>> With the fact that there is still a NULL pointer bug without IO APIC, the
> >>>>>> bug is bound to be located in analogy. There may be some wrong write
> >>>>>> access on the interrupt structure.
> >>>>>>
> >>>>>> I will come back with a patch which dumps the structure's content at
> >>>>>> various locations in the attach code.
> >>>>>>
> >>>>>>> Cheers
> >>>>>>> Ettore
> >>>>>>>
> >>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
> >>>>>> wrote:
> >>>>>>>>> Hi,
> >>>>>>>>>
> >>>>>>>>> I have compiled the module using this makefile:
> >>>>>>>>>
> >>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
> >>>>>>>>> obj-m   := irqTest.o
> >>>>>>>>>
> >>>>>>>>> ifeq ($(prefix),)
> >>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
> >>>>>>>>> endif
> >>>>>>>>>
> >>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
> >>>>>>>>> PWD     := $(shell pwd)
> >>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> all: default
> >>>>>>>>>
> >>>>>>>>> default:
> >>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
> >>>>>>>>>
> >>>>>>>>> install:
> >>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
> >>>>>>>>>
> >>>>>>>>> clean:
> >>>>>>>>>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
> >>>>>>>>>
> >>>>>>>>> The module seems to compiles fine:
> >>>>>>>>>
> >>>>>>>>> make -C /lib/modules/2.6.31.1/build
> >>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
> >>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
> >>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
> >>>>>>>>>  Building modules, stage 2.
> >>>>>>>>>  MODPOST 1 modules
> >>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
> >>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
> >>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
> >>>>>>>>>
> >>>>>>>>> To make sure module dependencies are in place I modprobe irqbench
> >>>>>>>>> (probably not necessary).
> >>>>>>>>>
> >>>>>>>>> modprobe xeno_irqbench
> >>>>>>>>>
> >>>>>>>>> All the loaded modules:
> >>>>>>>>>
> >>>>>>>>> fangorn:~# lsmod
> >>>>>>>>> Module                  Size  Used by
> >>>>>>>>> xeno_irqbench           5152  0
> >>>>>>>>> xeno_native            83296  0
> >>>>>>>>> analogy_ni_pcimio      15676  0
> >>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
> >>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
> >>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
> >>>>>>>>> analogy_ni_mite         9980  3
> >>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >>>>>>>>> 38876  5
> >>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
> >>>>>>>>> ni_ mite xeno_rtdm              24244  3
> >>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
> >>>>>>>>> 10968 0
> >>>>>>>>> ext3                  112900  1
> >>>>>>>>> jbd                    44016  1 ext3
> >>>>>>>>> mbcache                 6652  1 ext3
> >>>>>>>>> ide_pci_generic         3712  0
> >>>>>>>>> ide_core               79388  1 ide_pci_generic
> >>>>>>>>> e1000                 118204  0
> >>>>>>>>> ata_piix               15968  2
> >>>>>>>>> sata_mv                27632  0
> >>>>>>>>> libata                151468  2 ata_piix,sata_mv
> >>>>>>>>> unix                   24460  10
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> When I insert the module it complains about missing symbols:
> >>>>>>>>>
> >>>>>>>>> insmod irqTest.ko
> >>>>>>>>>
> >>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
> >>>>>>>>>
> >>>>>>>>> dmesg:
> >>>>>>>>>
> >>>>>>>>> irqTest: module license 'unspecified' taints kernel.
> >>>>>>>>> Disabling lock debugging due to kernel taint
> >>>>>>>>> irqTest: Unknown symbol xnintr_enable
> >>>>>>>>> irqTest: Unknown symbol xnintr_detach
> >>>>>>>>>
> >>>>>>>>> What am I doing wrong?
> >>>>>>>> It's me who did wrong. I just tested the compilation inside the
> >>>>>>>> kernel.
> >>>>>>>>
> >>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
> >>>>>>>> could you add the following line in the test module:
> >>>>>>>> MODULE_LICENSE("GPL");
> >>>>>>>>
> >>>>>>>> With that, the insmod operation should work.
> >>>>>>>>
> >>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
> >>>>>>>>> problem.
> >>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a clue.
> >>>>>>>>
> >>>>>>>>> Cheers
> >>>>>>>>> Ettore
> >>>>>>>>>
> >>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
> >>>>>>>>>> Hi,
> >>>>>>>>>>
> >>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
> >>>>>>>>>>> Hello,
> >>>>>>>>>>>
> >>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
> >>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
> >>>>>>>>>>> generator board.
> >>>>>>>>>>>
> >>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I obtain
> >>>>>>>>>>> the following:
> >>>>>>>>>>>
> >>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
> >>>>>>>>>>> cmd_write: basic descriptor retrieved
> >>>>>>>>>>>        subdevices count = 0
> >>>>>>>>>>>        read subdevice index = 0
> >>>>>>>>>>>        write subdevice index = 0
> >>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
> >>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
> >>>>>>>>>>> 0x0804d008 ***
> >>>>>>>>>>> ======= Backtrace: =========
> >>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
> >>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
> >>>>>>>>>>> cmd_write[0x804927c]
> >>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
> >>>>>>>>>>> cmd_write[0x8048b01]
> >>>>>>>>>>> ======= Memory map: ========
> >>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
> >>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
> >>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
> >>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
> >>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
> >>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
> >>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
> >>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
> >>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
> >>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
> >>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
> >>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
> >>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
> >>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
> >>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
> >>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
> >>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
> >>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
> >>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
> >>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
> >>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
> >>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
> >>>>>>>>>>> 00000000 00:00 0
> >>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
> >>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
> >>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
> >>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
> >>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
> >>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
> >>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
> >>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
> >>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
> >>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
> >>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
> >>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
> >>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> >>>>>>>>>>> Aborted
> >>>>>>>>>>>
> >>>>>>>>>>> This is probably because the device /dev/analogy0 does not exist.
> >>>>>>>>>>>
> >>>>>>>>>>> This is the output of uname -a
> >>>>>>>>>>>
> >>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
> >>>>>>>>>>> i686 GNU/Linux
> >>>>>>>>>>>
> >>>>>>>>>>> And these are the relevant entries in dmesg
> >>>>>>>>>>>
> >>>>>>>>>>> dmesg:
> >>>>>>>>>>>
> >>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
> >>>>>>>>>>> I-pipe: Domain Xenomai registered.
> >>>>>>>>>>>
> >>>>>>>>>>> Xenomai: hal/i386 started.
> >>>>>>>>>>> Xenomai: scheduling class idle registered.
> >>>>>>>>>>> Xenomai: scheduling class rt registered.
> >>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
> >>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
> >>>>>>>>>>> Xenomai: SMI workaround enabled
> >>>>>>>>>>> Xenomai: starting RTDM services.
> >>>>>>>>>>> Xenomai: starting native API services.
> >>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
> >>>>>>>>>>>
> >>>>>>>>>>> result of lspci for the relevant board:
> >>>>>>>>>>>
> >>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
> >>>>>>>>>>>
> >>>>>>>>>>> And lsmod:
> >>>>>>>>>>>
> >>>>>>>>>>> Module                  Size  Used by
> >>>>>>>>>>> xeno_native           105088  0
> >>>>>>>>>>> analogy_ni_pcimio      15644  0
> >>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
> >>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
> >>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
> >>>>>>>>>>> analogy_ni_mite        10140  3
> >>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
> >>>>>>>>>>>  40220  5
> >>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
> >>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
> >>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
> >>>>>>>>>>> ext3                  109636  1
> >>>>>>>>>>> jbd                    43920  1 ext3
> >>>>>>>>>>> mbcache                 6272  1 ext3
> >>>>>>>>>>> ide_pci_generic         3712  0
> >>>>>>>>>>> ide_core               74204  1 ide_pci_generic
> >>>>>>>>>>> ata_piix               15748  2
> >>>>>>>>>>> sata_mv                26448  0
> >>>>>>>>>>> e1000                 114208  0
> >>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
> >>>>>>>>>>> unix                   22992  10
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> According to this post:
> >>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
> >>>>>>>>>>>
> >>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your last
> >>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
> >>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry: a4l_pcimio.
> >>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
> >>>>>>>>>>> --  Analogy drivers --
> >>>>>>>>>>>
> >>>>>>>>>>> | idx | driver name
> >>>>>>>>>>> |  00 | analogy_ni_pcimio
> >>>>>>>>>>> |  01 | analogy_8255
> >>>>>>>>>>>
> >>>>>>>>>>> There are two entries and the drivers are not attached:
> >>>>>>>>>>>
> >>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
> >>>>>>>>>>> --  Analogy devices --
> >>>>>>>>>>>
> >>>>>>>>>>> | idx | status | driver
> >>>>>>>>>>> |  00 | Unused | No driver
> >>>>>>>>>>> |  01 | Unused | No driver
> >>>>>>>>>>> |  02 | Unused | No driver
> >>>>>>>>>>> |  03 | Unused | No driver
> >>>>>>>>>>> |  04 | Unused | No driver
> >>>>>>>>>>> |  05 | Unused | No driver
> >>>>>>>>>>> |  06 | Unused | No driver
> >>>>>>>>>>> |  07 | Unused | No driver
> >>>>>>>>>>> |  08 | Unused | No driver
> >>>>>>>>>>> |  09 | Unused | No driver
> >>>>>>>>>>>
> >>>>>>>>>>> I'm aware of the name change of the drivers:
> >>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
> >>>>>>>>>>>
> >>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
> >>>>>>>>>>>> - 8255 becomes analogy_8255.
> >>>>>>>>>>>> Consequently, the command line to attach these drivers has
> >>>>>>>>>>>> changed. Starting from now, we have to type:
> >>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
> >>>>>>>>>>>> a4l_pcimio)
> >>>>>>>>>>> This is what happens when I try to attach the driver to de device:
> >>>>>>>>>>>
> >>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:last sysfs file:
> >>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
> >>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:I-pipe domain Linux
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:Stack:
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:Call Trace:
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
> >>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
> >>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
> >>>>>>>>>>> 00 31
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>>>>>>>>>> SS:ESP 0068:f64cddc8
> >>>>>>>>>>>
> >>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
> >>>>>>>>>>>  kernel:CR2: 0000000000000004
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> relevant dmeg:
> >>>>>>>>>>>
> >>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> >>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> >>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
> >>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
> >>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
> >>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> >>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
> >>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> >>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
> >>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>>>>>>>>>> *pde = 00000000
> >>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
> >>>>>>>>>>> last sysfs file:
> >>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
> >>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
> >>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
> >>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
> >>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
> >>>>>>>>>>>
> >>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> >>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
> >>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> >>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
> >>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
> >>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> >>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
> >>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
> >>>>>>>>>>> Stack:
> >>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
> >>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
> >>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
> >>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
> >>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
> >>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> >>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> >>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
> >>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
> >>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
> >>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
> >>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
> >>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
> >>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
> >>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
> >>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
> >>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
> >>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
> >>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
> >>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
> >>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
> >>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
> >>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
> >>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
> >>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
> >>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> >>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> >>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
> >>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
> >>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
> >>>>>>>>>> Thanks for such a great report.
> >>>>>>>>>>
> >>>>>>>>>> I keep two things in mind:
> >>>>>>>>>> - cmd_write's error handling path is not buggy (that was already in
> >>>>>>>>>> my todo list). I will fix that as soon as possible.
> >>>>>>>>>>
> >>>>>>>>>> - according to the call-stack dump you made, the irq handler
> >>>>>>>>>> registering seems to be the source of the trouble. What strikes me
> >>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
> >>>>>>>>>> more in the analogy layer).
> >>>>>>>>>>
> >>>>>>>>>> In order to be sure that the problem is located in analogy, it would
> >>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...) does
> >>>>>>>>>> not trigger the bug.
> >>>>>>>>>>
> >>>>>>>>>> Here is a little test module you could try to insmod. If you do not
> >>>>>>>>>> want to bother finding out how to compile it, you can replace the
> >>>>>>>>>> code of an existing rtdm driver (for example:
> >>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
> >>>>>>>>>>
> >>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
> >>>>>>>>>> your kernel configuration (in "Processor type and features", disable
> >>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
> >>>>>>>>>>
> >>>>>>>>>> #include <linux/version.h>
> >>>>>>>>>> #include <linux/module.h>
> >>>>>>>>>> #include <linux/ioport.h>
> >>>>>>>>>>
> >>>>>>>>>> #include <rtdm/rtdm_driver.h>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
> >>>>>>>>>> {
> >>>>>>>>>>
> >>>>>>>>>>        rtdm_printk("irq_test: INTERRUPT!\n");
> >>>>>>>>>>
> >>>>>>>>>>        return RTDM_IRQ_HANDLED;
> >>>>>>>>>> }
> >>>>>>>>>>
> >>>>>>>>>> static rtdm_irq_t handle;
> >>>>>>>>>>
> >>>>>>>>>> static int __init __test_init(void)
> >>>>>>>>>> {
> >>>>>>>>>>
> >>>>>>>>>>        int err;
> >>>>>>>>>>
> >>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
> >>>>>>>>>>
> >>>>>>>>>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
> >>>>>>>>>> "test_irq", NULL);
> >>>>>>>>>>
> >>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
> >>>>>>>>>> err);
> >>>>>>>>>>
> >>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
> >>>>>>>>>>
> >>>>>>>>>>        err = rtdm_irq_enable(&handle);
> >>>>>>>>>>
> >>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
> >>>>>>>>>> err);
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>        return err;
> >>>>>>>>>> }
> >>>>>>>>>>
> >>>>>>>>>> static void __exit __test_exit(void)
> >>>>>>>>>> {
> >>>>>>>>>>
> >>>>>>>>>>        rtdm_irq_free(&handle);
> >>>>>>>>>>
> >>>>>>>>>> }
> >>>>>>>>>>
> >>>>>>>>>> module_init(__test_init);
> >>>>>>>>>> module_exit(__test_exit);
> >>>>>>>>>>
> >>>>>>>>>>> Can anyone help?
> >>>>>>>>>>>
> >>>>>>>>>>> Best regards
> >>>>>>>>>>> Ettore Pedretti
> >>>>>>>> Alexis.
> >>>>>> Alexis.
> >>>> _______________________________________________
> >>>> Xenomai-help mailing list
> >>>> Xenomai-help@domain.hid
> >>>> https://mail.gna.org/listinfo/xenomai-help
> >>>>
> >>>
> >>>
> >>> --
> >>> Ettore Pedretti, SUPA
> >>> School of Physics and Astronomy
> >>> University of St Andrews, North Haugh,
> >>> St Andrews, Fife, KY16 9SS, Scotland
> >>> Ph: +44 1334 461669, Fax: +44-1334-463104
> >>> The University of St Andrews is a charity registered in Scotland : No SC013532
> >>>
> >>>
> >> Alexis.
> >>
> >> _______________________________________________
> >> Xenomai-help mailing list
> >> Xenomai-help@domain.hid
> >> https://mail.gna.org/listinfo/xenomai-help
> > 
> > 
> 


-- 
Philippe.




^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-27 18:14                       ` Philippe Gerum
@ 2009-11-27 18:30                         ` Philippe Gerum
  0 siblings, 0 replies; 35+ messages in thread
From: Philippe Gerum @ 2009-11-27 18:30 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

On Fri, 2009-11-27 at 19:14 +0100, Philippe Gerum wrote:
> On Fri, 2009-11-27 at 01:43 +0100, Alexis Berlemont wrote:
> > Hi Philippe,
> > 
> > Philippe Gerum wrote:
> > > On Thu, 2009-11-26 at 10:34 +0100, Alexis Berlemont wrote:
> > >> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
> > >>> Hi Alexis,
> > >>>
> > >>> I applied the patch to my local git repository:
> > >>>
> > >>> fangorn:/usr/src#
> > >>> cd xenomai-head/
> > >>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> > >>> patch_debug_1.diff
> > >>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
> > >>> ../patch_debug_1.diff:14: trailing whitespace.
> > >>>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
> > >>> warning: 1 line adds whitespace errors.
> > >>>
> > >>> Then created a debian package:
> > >>>
> > >>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
> > >>> --git-upstream-branch=origin/master --git-ignore-new
> > >>>
> > >>> built a new kernel package:
> > >>>
> > >>> fakeroot make-kpkg --initrd --added-patches xenomai
> > >>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
> > >>>
> > >>> and installed the Debian package with dpkg -i
> > >>>
> > >>> This is what happens when i insert the module into the kernel:
> > >>>
> > >>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
> > >>> Killed
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:Oops: 0000 [#1] PREEMPT SMP
> > >>> fangorn:~/control/CHAMP/irqTest#
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:last sysfs file: /sys/class/net/lo/operstate
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:I-pipe domain Linux
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:Stack:
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:Call Trace:
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:Code:  Bad EIP value.
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> > >>>
> > >>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
> > >>>  kernel:CR2: 0000000000000000
> > >>>
> > >>> dmesg after insmod:
> > >>>
> > >>> irq_test: before rtdm_irq_request
> > >>> BUG: unable to handle kernel NULL pointer dereference at (null)
> > >>> IP: [<(null)>] (null)
> > >>> *pde = 00000000
> > >>> Oops: 0000 [#1] PREEMPT SMP
> > >>> last sysfs file: /sys/class/net/lo/operstate
> > >>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
> > >>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
> > >>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
> > >>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
> > >>> scsi_wait_scan]
> > >>>
> > >>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
> > >>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
> > >>> EIP is at 0x0
> > >>> EAX: 00000030
> > > 
> > > This is likely IRQ 48, with rthal_irq_enable jumping to address zero.
> > > 
> > >>  EBX: 00000000 ECX: 00000030 EDX: c1250b80
> > >>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
> > >>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> > >>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
> > >>> I-pipe domain Linux
> > >>> Stack:
> > >>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
> > >>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
> > >>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
> > >>> Call Trace:
> > >>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
> > >>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
> > >>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
> > >>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
> > >>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
> > >>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
> > >>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
> > >>>  [<c1001028>] ? do_one_initcall+0x23/0x183
> > >>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
> > >>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
> > >>>  [<c1092cc5>] ? sys_close+0x71/0xb5
> > >>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
> > >>> Code:  Bad EIP value.
> > >>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
> > >>> CR2: 0000000000000000
> > >>> ---[ end trace ac2616367ecf94b2 ]---
> > >>>
> > >>> I hope this is what you wanted me to try. Please let me know.
> > >> So if I understand well, you "insmoded" the little test module which
> > >> does nothing but calling rtdm_irq_request() and the NULL pointer bug
> > >> occured.
> > >>
> > >> This bug occurred before calling analogy_config, you did not tried to
> > >> attach the ni_pcimio driver, right ?
> > >>
> > >> If I am right, it seems like the bug is not located in analogy but
> > >> between Xenomai's nucleus and Ipipe, which is ... weird.
> > >>
> > > 
> > > The IRQ requested does not seem to have been associated with any chip
> > > controller, which is likely the basic issue.
> > 
> > I had a look at arch/x86/kernel/apic/io_apic.c and the only controllers 
> > which seem left unhandled by ipipe are the remapped ones (and the hpet 
> > but I doubt it could be the hpet). Do you see any other possibility ?
> > 
> 
> What needs to be assessed is whether irq48 gets registered through
> ioapic_register_intr() because a routing was found, or not. Likely not.
> 
> > Do you think that writing a little test module which requests the irq 
> > (through Linux API) is a good idea ?
> > 

Sorry, I'm just catching up with your idea. Yes, you could check this
way whether irq48 was registered at low-level, but it would not tell you
why it is not.

-- 
Philippe.




^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-26 23:38                   ` Ettore Pedretti
  2009-11-27  0:47                     ` Alexis Berlemont
@ 2009-11-29 23:02                     ` Alexis Berlemont
  2009-11-30  8:41                       ` Ettore Pedretti
  1 sibling, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-11-29 23:02 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

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

Hi,

Ettore Pedretti wrote:
> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid> wrote:
>>> Hi Alexis,
>>>
>>> I applied the patch to my local git repository:
>>>
>>> fangorn:/usr/src#
>>> cd xenomai-head/
>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>> patch_debug_1.diff
>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>       rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>> warning: 1 line adds whitespace errors.
>>>
>>> Then created a debian package:
>>>
>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>> --git-upstream-branch=origin/master --git-ignore-new
>>>
>>> built a new kernel package:
>>>
>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>
>>> and installed the Debian package with dpkg -i
>>>
>>> This is what happens when i insert the module into the kernel:
>>>
>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>> Killed
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>> fangorn:~/control/CHAMP/irqTest#
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:I-pipe domain Linux
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Stack:
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Call Trace:
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:Code:  Bad EIP value.
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>
>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>  kernel:CR2: 0000000000000000
>>>
>>> dmesg after insmod:
>>>
>>> irq_test: before rtdm_irq_request
>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>> IP: [<(null)>] (null)
>>> *pde = 00000000
>>> Oops: 0000 [#1] PREEMPT SMP
>>> last sysfs file: /sys/class/net/lo/operstate
>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>> scsi_wait_scan]
>>>
>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>> EIP is at 0x0
>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>> I-pipe domain Linux
>>> Stack:
>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000 f8e27000
>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000 f6c03f84
>>> Call Trace:
>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>> Code:  Bad EIP value.
>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>> CR2: 0000000000000000
>>> ---[ end trace ac2616367ecf94b2 ]---
>>>
>>> I hope this is what you wanted me to try. Please let me know.
>> So if I understand well, you "insmoded" the little test module which
>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>> occured.
> 
> Correct
> 
>> This bug occurred before calling analogy_config, you did not tried to
>> attach the ni_pcimio driver, right ?
> 
> I insmod-ed the test module that gave that error dump. I later tried
> to attach the driver which causes the usual error. The stack-dumps I
> sent are solely related to insmod of test program.
> 
>> If I am right, it seems like the bug is not located in analogy but
>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>
>> What is your kernel configuration ? no IO_APIC ?
> 
> I put back my config to IO_APIC. Should I disable that again?
> attached is my kernel configuration (configAnalogy)
> 
> 
>> Which irq did you try to request ? 48 or 5 ?
> 
> I do not know. do I have to pass parameters to insmod?
> 
> This is my /proc/interrupts if that is helpful
>            CPU0       CPU1
>   0:        222          0   IO-APIC-edge      timer
>   1:          0          9   IO-APIC-edge      i8042
>   2:          0          0    XT-PIC-XT        cascade
>  12:          0        132   IO-APIC-edge      i8042
>  14:          0          8   IO-APIC-edge      ata_piix
>  15:          0      12358   IO-APIC-edge      ata_piix
>  20:          0          0   IO-APIC-fasteoi   astropci0
>  28:          0        235   IO-APIC-fasteoi   sata_mv
>  54:          0      77950   IO-APIC-fasteoi   eth0
> NMI:          0          0   Non-maskable interrupts
> LOC:   45365307   45365133   Local timer interrupts
> SPU:          0          0   Spurious interrupts
> CNT:          0          0   Performance counter interrupts
> PND:          0          0   Performance pending work
> RES:       2555       2212   Rescheduling interrupts
> CAL:         60         58   Function call interrupts
> TLB:        419        200   TLB shootdowns
> TRM:          0          0   Thermal event interrupts
> THR:          0          0   Threshold APIC interrupts
> MCE:          0          0   Machine check exceptions
> MCP:        152        152   Machine check polls
> ERR:          0
> MIS:          0
> 
> and my /proc/xenomai/irq
> 
> IRQ         CPU0        CPU1
> 516:           0           0         [IPI]
> 519:    46161773    46161772         [timer]
> 520:           0           0         [critical sync]
> 546:           0           0         [virtual]
> 
> 
>> Which CPU are you using ?
> 
> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
> 
> As Philippe rightly pointed out this is a 32-bit install although the
> CPUs are 64 bit

Following Philippe's advice, I attached a little patch for your kernel
sources. Could you apply it and send the kernel log messages ?

You will also find attached the sources of a little module which calls
Linux' request_irq(48). Could you insmod the module and send a dump of
/proc/interrupts ?

>> Thank you for your time.
>>
>>> Cheers
>>> Ettore
>>>
>>>
>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>> Hi,
>>>>>
>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>> Sorry, I did not answer your question. The bug occurs in both configurations;
>>>> so, do not bother changing your configuration for the moment.
>>>>
>>>>> Cheers
>>>>> Ettore
>>>>>
>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>> Hi,
>>>>>>
>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>
>>>>>>> irq_test: before rtdm_irq_request
>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled. So,
>>>>>> the irq 48 turns into the irq 5;
>>>>>>
>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>  configuration.
>>>>>> With the fact that there is still a NULL pointer bug without IO APIC, the
>>>>>> bug is bound to be located in analogy. There may be some wrong write
>>>>>> access on the interrupt structure.
>>>>>>
>>>>>> I will come back with a patch which dumps the structure's content at
>>>>>> various locations in the attach code.
>>>>>>
>>>>>>> Cheers
>>>>>>> Ettore
>>>>>>>
>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti <ep41@domain.hid>
>>>>>> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>
>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>
>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>> endif
>>>>>>>>>
>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> all: default
>>>>>>>>>
>>>>>>>>> default:
>>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>
>>>>>>>>> install:
>>>>>>>>>        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>
>>>>>>>>> clean:
>>>>>>>>>        rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>
>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>
>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>
>>>>>>>>> To make sure module dependencies are in place I modprobe irqbench
>>>>>>>>> (probably not necessary).
>>>>>>>>>
>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>
>>>>>>>>> All the loaded modules:
>>>>>>>>>
>>>>>>>>> fangorn:~# lsmod
>>>>>>>>> Module                  Size  Used by
>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>> xeno_native            83296  0
>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>> 38876  5
>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>> 10968 0
>>>>>>>>> ext3                  112900  1
>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>> e1000                 118204  0
>>>>>>>>> ata_piix               15968  2
>>>>>>>>> sata_mv                27632  0
>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>> unix                   24460  10
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>
>>>>>>>>> insmod irqTest.ko
>>>>>>>>>
>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>>>>>>>>
>>>>>>>>> dmesg:
>>>>>>>>>
>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>
>>>>>>>>> What am I doing wrong?
>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>> kernel.
>>>>>>>>
>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>> could you add the following line in the test module:
>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>
>>>>>>>> With that, the insmod operation should work.
>>>>>>>>
>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>> problem.
>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a clue.
>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Ettore
>>>>>>>>>
>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need to
>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>> generator board.
>>>>>>>>>>>
>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I obtain
>>>>>>>>>>> the following:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>        subdevices count = 0
>>>>>>>>>>>        read subdevice index = 0
>>>>>>>>>>>        write subdevice index = 0
>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size (fast):
>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303   /usr/bin/cmd_write
>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303   /usr/bin/cmd_write
>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619    /lib/libgcc_s.so.1
>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619    /lib/libgcc_s.so.1
>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000 08:01
>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000 08:01
>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>> Aborted
>>>>>>>>>>>
>>>>>>>>>>> This is probably because the device /dev/analogy0 does not exist.
>>>>>>>>>>>
>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>
>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST 2009
>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>
>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>
>>>>>>>>>>> dmesg:
>>>>>>>>>>>
>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>
>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>
>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>
>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>
>>>>>>>>>>> And lsmod:
>>>>>>>>>>>
>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>  40220  5
>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> According to this post:
>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>
>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your last
>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry: a4l_pcimio.
>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>
>>>>>>>>>>> | idx | driver name
>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>
>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>
>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>
>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>
>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>> This is what happens when I try to attach the driver to de device:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>>>>>>>>>> 00 31
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>
>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>
>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>> last sysfs file:
>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm
>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix sata_mv
>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>
>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>> Stack:
>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0 f64cde14
>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38 f8c2cccf
>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b
>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>
>>>>>>>>>> I keep two things in mind:
>>>>>>>>>> - cmd_write's error handling path is not buggy (that was already in
>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>
>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>> registering seems to be the source of the trouble. What strikes me
>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>
>>>>>>>>>> In order to be sure that the problem is located in analogy, it would
>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...) does
>>>>>>>>>> not trigger the bug.
>>>>>>>>>>
>>>>>>>>>> Here is a little test module you could try to insmod. If you do not
>>>>>>>>>> want to bother finding out how to compile it, you can replace the
>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>
>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC in
>>>>>>>>>> your kernel configuration (in "Processor type and features", disable
>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>
>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>
>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>
>>>>>>>>>>        return RTDM_IRQ_HANDLED;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>
>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        int err;
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>
>>>>>>>>>>        err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_request (err = %d)\n",
>>>>>>>>>> err);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>
>>>>>>>>>>        err = rtdm_irq_enable(&handle);
>>>>>>>>>>
>>>>>>>>>>        rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>>>>>>>>> err);
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>        return err;
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>> {
>>>>>>>>>>
>>>>>>>>>>        rtdm_irq_free(&handle);
>>>>>>>>>>
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> module_init(__test_init);
>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>
>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>
>>>>>>>>>>> Best regards
>>>>>>>>>>> Ettore Pedretti
>>>>>>>> Alexis.
>>>>>> Alexis.
>>>> _______________________________________________
>>>> Xenomai-help mailing list
>>>> Xenomai-help@domain.hid
>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>
>> >

Alexis.

[-- Attachment #2: debug_patch2.diff --]
[-- Type: text/x-patch, Size: 821 bytes --]

diff -uNrp linux-2.6.31.1-xeno-perso/arch/x86/kernel/apic/io_apic.c linux-2.6.31.1-xeno-perso-x86_64-local/arch/x86/kernel/apic/io_apic.c
--- linux-2.6.31.1-xeno-perso/arch/x86/kernel/apic/io_apic.c	2009-10-16 15:39:55.000000000 +0200
+++ linux-2.6.31.1-xeno-perso-x86_64-local/arch/x86/kernel/apic/io_apic.c	2009-11-29 23:34:40.000000000 +0100
@@ -1357,6 +1357,11 @@ static inline int IO_APIC_irq_trigger(in
 static void ioapic_register_intr(int irq, struct irq_desc *desc, unsigned long trigger)
 {
 
+#if 1 /* debug */
+	printk("ioapic_register_intr: irq = %d, trig = %lu, apic_trig = %d, remap = %d\n",
+	       irq, trigger, IO_APIC_irq_trigger(irq), irq_remapped(irq));
+#endif /* debug */
+
 	if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
 	    trigger == IOAPIC_LEVEL)
 		desc->status |= IRQ_LEVEL;

[-- Attachment #3: test_module.c --]
[-- Type: text/x-csrc, Size: 634 bytes --]

#include <linux/version.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>

static int test_var;

static irqreturn_t test_handler(int irq, void *arg)
{
	printk("irq_test: INTERRUPT!\n");
	return IRQ_HANDLED;

}

static int __init __test_init(void)
{

	int err;

	printk("irq_test: before request_irq\n");

	err = request_irq(48, test_handler, IRQF_SHARED, "test_irq", &test_var);
	
	printk("irq_test: after request_irq (err = %d)\n", err);	

	return err;
}

static void __exit __test_exit(void)
{
	free_irq(48, &test_var);
}

MODULE_LICENSE("GPL");
module_init(__test_init);
module_exit(__test_exit);

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-29 23:02                     ` Alexis Berlemont
@ 2009-11-30  8:41                       ` Ettore Pedretti
  2009-12-02 23:21                         ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2009-11-30  8:41 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

Hi,

I applied your kernel patch before applying the xenomai patch. When I
insert the kernel patch I obtain:

insmod: error inserting 'test_module.ko': -1 Function not implemented

Attached is the content of dmesg from boot to module insertion.

Cheers
-ep

ps. I am leaving the mountain tomorrow and will be travelling until
Friday. I hope I will be able to test the machine at distance without
crashing it for good.




2009/11/29 Alexis Berlemont <berlemont.hauw@domain.hid>:
> Hi,
>
> Ettore Pedretti wrote:
>>
>> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>
>>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid>
>>> wrote:
>>>>
>>>> Hi Alexis,
>>>>
>>>> I applied the patch to my local git repository:
>>>>
>>>> fangorn:/usr/src#
>>>> cd xenomai-head/
>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>> patch_debug_1.diff
>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>>      rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>>> warning: 1 line adds whitespace errors.
>>>>
>>>> Then created a debian package:
>>>>
>>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>>> --git-upstream-branch=origin/master --git-ignore-new
>>>>
>>>> built a new kernel package:
>>>>
>>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>>
>>>> and installed the Debian package with dpkg -i
>>>>
>>>> This is what happens when i insert the module into the kernel:
>>>>
>>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>>> Killed
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>> fangorn:~/control/CHAMP/irqTest#
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>> task.ti=f6c02000)
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:I-pipe domain Linux
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:Stack:
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:Call Trace:
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:Code:  Bad EIP value.
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>
>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>  kernel:CR2: 0000000000000000
>>>>
>>>> dmesg after insmod:
>>>>
>>>> irq_test: before rtdm_irq_request
>>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>>> IP: [<(null)>] (null)
>>>> *pde = 00000000
>>>> Oops: 0000 [#1] PREEMPT SMP
>>>> last sysfs file: /sys/class/net/lo/operstate
>>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>>> scsi_wait_scan]
>>>>
>>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>>> EIP is at 0x0
>>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>> I-pipe domain Linux
>>>> Stack:
>>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
>>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000
>>>> f8e27000
>>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000
>>>> f6c03f84
>>>> Call Trace:
>>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>>> Code:  Bad EIP value.
>>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>> CR2: 0000000000000000
>>>> ---[ end trace ac2616367ecf94b2 ]---
>>>>
>>>> I hope this is what you wanted me to try. Please let me know.
>>>
>>> So if I understand well, you "insmoded" the little test module which
>>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>>> occured.
>>
>> Correct
>>
>>> This bug occurred before calling analogy_config, you did not tried to
>>> attach the ni_pcimio driver, right ?
>>
>> I insmod-ed the test module that gave that error dump. I later tried
>> to attach the driver which causes the usual error. The stack-dumps I
>> sent are solely related to insmod of test program.
>>
>>> If I am right, it seems like the bug is not located in analogy but
>>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>>
>>> What is your kernel configuration ? no IO_APIC ?
>>
>> I put back my config to IO_APIC. Should I disable that again?
>> attached is my kernel configuration (configAnalogy)
>>
>>
>>> Which irq did you try to request ? 48 or 5 ?
>>
>> I do not know. do I have to pass parameters to insmod?
>>
>> This is my /proc/interrupts if that is helpful
>>           CPU0       CPU1
>>  0:        222          0   IO-APIC-edge      timer
>>  1:          0          9   IO-APIC-edge      i8042
>>  2:          0          0    XT-PIC-XT        cascade
>>  12:          0        132   IO-APIC-edge      i8042
>>  14:          0          8   IO-APIC-edge      ata_piix
>>  15:          0      12358   IO-APIC-edge      ata_piix
>>  20:          0          0   IO-APIC-fasteoi   astropci0
>>  28:          0        235   IO-APIC-fasteoi   sata_mv
>>  54:          0      77950   IO-APIC-fasteoi   eth0
>> NMI:          0          0   Non-maskable interrupts
>> LOC:   45365307   45365133   Local timer interrupts
>> SPU:          0          0   Spurious interrupts
>> CNT:          0          0   Performance counter interrupts
>> PND:          0          0   Performance pending work
>> RES:       2555       2212   Rescheduling interrupts
>> CAL:         60         58   Function call interrupts
>> TLB:        419        200   TLB shootdowns
>> TRM:          0          0   Thermal event interrupts
>> THR:          0          0   Threshold APIC interrupts
>> MCE:          0          0   Machine check exceptions
>> MCP:        152        152   Machine check polls
>> ERR:          0
>> MIS:          0
>>
>> and my /proc/xenomai/irq
>>
>> IRQ         CPU0        CPU1
>> 516:           0           0         [IPI]
>> 519:    46161773    46161772         [timer]
>> 520:           0           0         [critical sync]
>> 546:           0           0         [virtual]
>>
>>
>>> Which CPU are you using ?
>>
>> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>
>> As Philippe rightly pointed out this is a 32-bit install although the
>> CPUs are 64 bit
>
> Following Philippe's advice, I attached a little patch for your kernel
> sources. Could you apply it and send the kernel log messages ?
>
> You will also find attached the sources of a little module which calls
> Linux' request_irq(48). Could you insmod the module and send a dump of
> /proc/interrupts ?
>
>>> Thank you for your time.
>>>
>>>> Cheers
>>>> Ettore
>>>>
>>>>
>>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>
>>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>>>
>>>>> Sorry, I did not answer your question. The bug occurs in both
>>>>> configurations;
>>>>> so, do not bother changing your configuration for the moment.
>>>>>
>>>>>> Cheers
>>>>>> Ettore
>>>>>>
>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>>
>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>>>
>>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled.
>>>>>>> So,
>>>>>>> the irq 48 turns into the irq 5;
>>>>>>>
>>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>>  configuration.
>>>>>>>
>>>>>>> With the fact that there is still a NULL pointer bug without IO APIC,
>>>>>>> the
>>>>>>> bug is bound to be located in analogy. There may be some wrong write
>>>>>>> access on the interrupt structure.
>>>>>>>
>>>>>>> I will come back with a patch which dumps the structure's content at
>>>>>>> various locations in the attach code.
>>>>>>>
>>>>>>>> Cheers
>>>>>>>> Ettore
>>>>>>>>
>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti
>>>>>>>>> <ep41@domain.hid>
>>>>>>>
>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>>
>>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>>
>>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>>> endif
>>>>>>>>>>
>>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> all: default
>>>>>>>>>>
>>>>>>>>>> default:
>>>>>>>>>>       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>>
>>>>>>>>>> install:
>>>>>>>>>>       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>>
>>>>>>>>>> clean:
>>>>>>>>>>       rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>>
>>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>>
>>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>
>>>>>>>>>> To make sure module dependencies are in place I modprobe irqbench
>>>>>>>>>> (probably not necessary).
>>>>>>>>>>
>>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>>
>>>>>>>>>> All the loaded modules:
>>>>>>>>>>
>>>>>>>>>> fangorn:~# lsmod
>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>>> xeno_native            83296  0
>>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>> 38876  5
>>>>>>>>>>
>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>>> 10968 0
>>>>>>>>>> ext3                  112900  1
>>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>>> e1000                 118204  0
>>>>>>>>>> ata_piix               15968  2
>>>>>>>>>> sata_mv                27632  0
>>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>>> unix                   24460  10
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>>
>>>>>>>>>> insmod irqTest.ko
>>>>>>>>>>
>>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>>>>>>>>>
>>>>>>>>>> dmesg:
>>>>>>>>>>
>>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>>
>>>>>>>>>> What am I doing wrong?
>>>>>>>>>
>>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>>> kernel.
>>>>>>>>>
>>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>>> could you add the following line in the test module:
>>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>>
>>>>>>>>> With that, the insmod operation should work.
>>>>>>>>>
>>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>>> problem.
>>>>>>>>>
>>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a
>>>>>>>>> clue.
>>>>>>>>>
>>>>>>>>>> Cheers
>>>>>>>>>> Ettore
>>>>>>>>>>
>>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need
>>>>>>>>>>>> to
>>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>>> generator board.
>>>>>>>>>>>>
>>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I
>>>>>>>>>>>> obtain
>>>>>>>>>>>> the following:
>>>>>>>>>>>>
>>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>>       subdevices count = 0
>>>>>>>>>>>>       read subdevice index = 0
>>>>>>>>>>>>       write subdevice index = 0
>>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size
>>>>>>>>>>>> (fast):
>>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303
>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303
>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619
>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619
>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000
>>>>>>>>>>>> 08:01
>>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000
>>>>>>>>>>>> 08:01
>>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>>> Aborted
>>>>>>>>>>>>
>>>>>>>>>>>> This is probably because the device /dev/analogy0 does not
>>>>>>>>>>>> exist.
>>>>>>>>>>>>
>>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>>
>>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST
>>>>>>>>>>>> 2009
>>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>>
>>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>>
>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>
>>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>>
>>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>>
>>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>>
>>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>>
>>>>>>>>>>>> And lsmod:
>>>>>>>>>>>>
>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>  40220  5
>>>>>>>>>>>>
>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> According to this post:
>>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>>
>>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your
>>>>>>>>>>>>> last
>>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry:
>>>>>>>>>>>>> a4l_pcimio.
>>>>>>>>>>>>
>>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>>
>>>>>>>>>>>> | idx | driver name
>>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>>
>>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>>
>>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>>
>>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>>
>>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>>
>>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>>>
>>>>>>>>>>>> This is what happens when I try to attach the driver to de
>>>>>>>>>>>> device:
>>>>>>>>>>>>
>>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe
>>>>>>>>>>>> ff
>>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00
>>>>>>>>>>>> 00
>>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01
>>>>>>>>>>>> 00
>>>>>>>>>>>> 00 31
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>>
>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>>
>>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode
>>>>>>>>>>>> = 3
>>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins =
>>>>>>>>>>>> 0,
>>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at
>>>>>>>>>>>> 00000004
>>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>> last sysfs file:
>>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy
>>>>>>>>>>>> xeno_rtdm
>>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix
>>>>>>>>>>>> sata_mv
>>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>>
>>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>>> Stack:
>>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0
>>>>>>>>>>>> f64cde14
>>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38
>>>>>>>>>>>> f8c2cccf
>>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>>>>>>>>>>> 8b
>>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b
>>>>>>>>>>>> 42
>>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00
>>>>>>>>>>>> 31
>>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>>>
>>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>>
>>>>>>>>>>> I keep two things in mind:
>>>>>>>>>>> - cmd_write's error handling path is not buggy (that was already
>>>>>>>>>>> in
>>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>>
>>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>>> registering seems to be the source of the trouble. What strikes
>>>>>>>>>>> me
>>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>>
>>>>>>>>>>> In order to be sure that the problem is located in analogy, it
>>>>>>>>>>> would
>>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...)
>>>>>>>>>>> does
>>>>>>>>>>> not trigger the bug.
>>>>>>>>>>>
>>>>>>>>>>> Here is a little test module you could try to insmod. If you do
>>>>>>>>>>> not
>>>>>>>>>>> want to bother finding out how to compile it, you can replace the
>>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>>
>>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC
>>>>>>>>>>> in
>>>>>>>>>>> your kernel configuration (in "Processor type and features",
>>>>>>>>>>> disable
>>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>>
>>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>>
>>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>>> {
>>>>>>>>>>>
>>>>>>>>>>>       rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>>
>>>>>>>>>>>       return RTDM_IRQ_HANDLED;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>>
>>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>>> {
>>>>>>>>>>>
>>>>>>>>>>>       int err;
>>>>>>>>>>>
>>>>>>>>>>>       rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>>
>>>>>>>>>>>       err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>>
>>>>>>>>>>>       rtdm_printk("irq_test: after rtdm_irq_request (err =
>>>>>>>>>>> %d)\n",
>>>>>>>>>>> err);
>>>>>>>>>>>
>>>>>>>>>>>       rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>>
>>>>>>>>>>>       err = rtdm_irq_enable(&handle);
>>>>>>>>>>>
>>>>>>>>>>>       rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>>>>>>>>>> err);
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>       return err;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>>> {
>>>>>>>>>>>
>>>>>>>>>>>       rtdm_irq_free(&handle);
>>>>>>>>>>>
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> module_init(__test_init);
>>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>>
>>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>>
>>>>>>>>>>>> Best regards
>>>>>>>>>>>> Ettore Pedretti
>>>>>>>>>
>>>>>>>>> Alexis.
>>>>>>>
>>>>>>> Alexis.
>>>>>
>>>>> _______________________________________________
>>>>> Xenomai-help mailing list
>>>>> Xenomai-help@domain.hid
>>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>>
>>> >
>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44 1334 461669, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532

[-- Attachment #2: dmesg30Nov09 --]
[-- Type: application/octet-stream, Size: 20226 bytes --]

fangorn:~/control/CHAMP/irqTest# insmod test_module.ko 
insmod: error inserting 'test_module.ko': -1 Function not implemented
fangorn:~/control/CHAMP/irqTest# dmesg
Linux version 2.6.31.1 (root@fangorn) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 SMP PREEMPT Mon Nov 30 00:03:16 PST 2009
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009a800 (usable)
 BIOS-e820: 000000000009a800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000ce000 - 00000000000d0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 00000000bff70000 (usable)
 BIOS-e820: 00000000bff70000 - 00000000bff77000 (ACPI data)
 BIOS-e820: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ff800000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fffffc00 - 0000000100000000 (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0xbff70 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-C7FFF write-protect
  C8000-DFFFF uncachable
  E0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000 mask F80000000 write-back
  1 base 080000000 mask FC0000000 write-back
  2 base 0BFF80000 mask FFFF80000 uncachable
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
Warning only 895MB will be used.
Use a HIGHMEM enabled kernel.
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000037f1e000
 0000000000 - 0000400000 page 4k
 0000400000 - 0037c00000 page 2M
 0037c00000 - 0037f1e000 page 4k
kernel direct mapping tables up to 37f1e000 @ 10000-15000
RAMDISK: 37e16000 - 37fef18c
Allocated new RAMDISK: 00100000 - 002d918c
Move RAMDISK from 0000000037e16000 - 0000000037fef18b to 00100000 - 002d918b
895MB LOWMEM available.
  mapped low ram: 0 - 37f1e000
  low ram: 0 - 37f1e000
  node 0 low ram: 00000000 - 37f1e000
  node 0 bootmap 00011000 - 00017fe4
(9 early reservations) ==> bootmem [0000000000 - 0037f1e000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
  #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
  #3 [0001000000 - 0001317138]    TEXT DATA BSS ==> [0001000000 - 0001317138]
  #4 [000009a800 - 0000100000]    BIOS reserved ==> [000009a800 - 0000100000]
  #5 [0001318000 - 000131e170]              BRK ==> [0001318000 - 000131e170]
  #6 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #7 [0000100000 - 00002d918c]      NEW RAMDISK ==> [0000100000 - 00002d918c]
  #8 [0000011000 - 0000018000]          BOOTMAP ==> [0000011000 - 0000018000]
found SMP MP-table at [c00f5d90] f5d90
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00037f1e
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x00000100 -> 0x00037f1e
On node 0 totalpages: 229032
free_area_init_node: node 0, pgdat c125d680, node_mem_map c131f200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3946 pages, LIFO batch:0
  Normal zone: 1759 pages used for memmap
  Normal zone: 223295 pages, LIFO batch:31
Using APIC driver default
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
MPTABLE: OEM ID: INTEL   
MPTABLE: Product ID: Lindenhurst 
MPTABLE: APIC at: 0xFEE00000
Processor #0 (Bootup-CPU)
Processor #6
I/O APIC #2 Version 32 at 0xFEC00000.
I/O APIC #3 Version 32 at 0xFEC81000.
I/O APIC #4 Version 32 at 0xFEC81400.
Enabling APIC mode:  Flat.  Using 3 I/O APICs
Processors: 2
SMP: Allowing 2 CPUs, 0 hotplug CPUs
nr_irqs_gsi: 72
Allocating PCI resources starting at c0000000 (gap: c0000000:20000000)
NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
PERCPU: Embedded 13 pages at c1a23000, static data 30492 bytes
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227241
Kernel command line: root=/dev/sda1 ro quiet
PID hash table entries: 4096 (order: 12, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 902716k/916600k available (1792k kernel code, 13172k reserved, 639k data, 292k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff20000 - 0xfffff000   ( 892 kB)
    vmalloc : 0xf871e000 - 0xfff1e000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xf7f1e000   ( 895 MB)
      .init : 0xc1261000 - 0xc12aa000   ( 292 kB)
      .data : 0xc11c023c - 0xc1260238   ( 639 kB)
      .text : 0xc1000000 - 0xc11c023c   (1792 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
NR_IRQS:512
Fast TSC calibration using PIT
Detected 3000.160 MHz processor.
I-pipe 2.4-06: pipeline enabled.
Console: colour VGA+ 80x25
console [tty0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 6000.32 BogoMIPS (lpj=3000160)
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 4 MCE banks
CPU0: Thermal monitoring enabled (TM1)
Checking 'hlt' instruction... OK.
Freeing SMP alternatives: 10k freed
ExtINT not setup in hardware but reported by MP table
ioapic_register_intr: irq = 1, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 0, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 3, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 4, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 6, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 7, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 8, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 9, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 12, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 13, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 14, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 15, trig = 0, apic_trig = 0, remap = 0
ioapic_register_intr: irq = 16, trig = 1, apic_trig = 1, remap = 0
ioapic_register_intr: irq = 17, trig = 1, apic_trig = 1, remap = 0
ioapic_register_intr: irq = 18, trig = 1, apic_trig = 1, remap = 0
ioapic_register_intr: irq = 19, trig = 1, apic_trig = 1, remap = 0
ioapic_register_intr: irq = 20, trig = 1, apic_trig = 1, remap = 0
ioapic_register_intr: irq = 23, trig = 1, apic_trig = 1, remap = 0
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 0) ...
....... works.
CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
Booting processor 1 APIC 0x6 ip 0x6000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5999.16 BogoMIPS (lpj=2999584)
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 3
CPU: Processor Core ID: 0
mce: CPU supports 4 MCE banks
CPU1: Thermal monitoring enabled (TM1)
CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
Total of 2 processors activated (11999.48 BogoMIPS).
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd870, last bus=6
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:04.0: PME# supported from D0 D3hot D3cold
pci 0000:00:04.0: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x1840-0x185f]
pci 0000:00:1d.1: reg 20 io port: [0x1860-0x187f]
pci 0000:00:1d.2: reg 20 io port: [0x1880-0x189f]
pci 0000:00:1d.3: reg 20 io port: [0x18a0-0x18bf]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xd0000000-0xd00003ff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 1180-11bf claimed by ICH4 GPIO
pci 0000:00:1f.2: reg 10 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 14 io port: [0x00-0x03]
pci 0000:00:1f.2: reg 18 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 1c io port: [0x00-0x03]
pci 0000:00:1f.2: reg 20 io port: [0x18f0-0x18ff]
pci 0000:00:1f.3: reg 20 io port: [0x1100-0x111f]
pci 0000:00:1f.5: reg 10 io port: [0x1400-0x14ff]
pci 0000:00:1f.5: reg 14 io port: [0x1800-0x183f]
pci 0000:00:1f.5: reg 18 32bit mmio: [0xd0000c00-0xd0000dff]
pci 0000:00:1f.5: reg 1c 32bit mmio: [0xd0000800-0xd00008ff]
pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1f.5: PME# disabled
pci 0000:02:00.0: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.1: reg 10 32bit mmio: [0xd0100000-0xd0100fff]
pci 0000:02:00.2: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.2: PME# supported from D0 D3hot D3cold
pci 0000:02:00.2: PME# disabled
pci 0000:02:00.3: reg 10 32bit mmio: [0xd0101000-0xd0101fff]
pci 0000:00:03.0: bridge io port: [0x2000-0x3fff]
pci 0000:00:03.0: bridge 32bit mmio: [0xd0100000-0xd08fffff]
pci 0000:03:03.0: reg 10 64bit mmio: [0xd0200000-0xd02fffff]
pci 0000:03:03.0: reg 18 io port: [0x2000-0x20ff]
pci 0000:03:03.0: reg 1c 64bit mmio: [0xd0400000-0xd07fffff]
pci 0000:03:03.0: reg 30 32bit mmio: [0x000000-0x3fffff]
pci 0000:02:00.0: bridge io port: [0x2000-0x2fff]
pci 0000:02:00.0: bridge 32bit mmio: [0xd0200000-0xd07fffff]
pci 0000:04:01.0: reg 10 32bit mmio: [0xd0801000-0xd0801fff]
pci 0000:04:01.0: reg 14 32bit mmio: [0xd0800000-0xd0800fff]
pci 0000:04:02.0: reg 10 64bit mmio: [0xd0820000-0xd083ffff]
pci 0000:04:02.0: reg 20 io port: [0x3000-0x303f]
pci 0000:04:02.0: PME# supported from D0 D3hot D3cold
pci 0000:04:02.0: PME# disabled
pci 0000:04:02.1: reg 10 64bit mmio: [0xd0840000-0xd085ffff]
pci 0000:04:02.1: reg 20 io port: [0x3040-0x307f]
pci 0000:04:02.1: PME# supported from D0 D3hot D3cold
pci 0000:04:02.1: PME# disabled
pci 0000:02:00.2: bridge io port: [0x3000-0x3fff]
pci 0000:02:00.2: bridge 32bit mmio: [0xd0800000-0xd08fffff]
pci 0000:05:00.0: reg 10 32bit mmio: [0xd8000000-0xdfffffff]
pci 0000:05:00.0: reg 14 io port: [0x4000-0x40ff]
pci 0000:05:00.0: reg 18 32bit mmio: [0xd0900000-0xd090ffff]
pci 0000:05:00.0: reg 30 32bit mmio: [0x000000-0x01ffff]
pci 0000:05:00.0: supports D1 D2
pci 0000:05:00.1: reg 10 32bit mmio: [0xd0910000-0xd091ffff]
pci 0000:05:00.1: supports D1 D2
pci 0000:00:04.0: bridge io port: [0x4000-0x4fff]
pci 0000:00:04.0: bridge 32bit mmio: [0xd0900000-0xd09fffff]
pci 0000:00:04.0: bridge 64bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:06:02.0: reg 10 32bit mmio: [0xd0a00000-0xd0a0ffff]
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge 32bit mmio: [0xd0a00000-0xd0afffff]
pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:24d0]
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:02:00.0: PCI bridge, secondary bus 0000:03
pci 0000:02:00.0:   IO window: 0x2000-0x2fff
pci 0000:02:00.0:   MEM window: 0xd0200000-0xd07fffff
pci 0000:02:00.0:   PREFETCH window: 0xc0000000-0xc03fffff
pci 0000:02:00.2: PCI bridge, secondary bus 0000:04
pci 0000:02:00.2:   IO window: 0x3000-0x3fff
pci 0000:02:00.2:   MEM window: 0xd0800000-0xd08fffff
pci 0000:02:00.2:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x2000-0x3fff
pci 0000:00:03.0:   MEM window: 0xd0100000-0xd08fffff
pci 0000:00:03.0:   PREFETCH window: 0xc0000000-0xc03fffff
pci 0000:00:04.0: PCI bridge, secondary bus 0000:05
pci 0000:00:04.0:   IO window: 0x4000-0x4fff
pci 0000:00:04.0:   MEM window: 0xd0900000-0xd09fffff
pci 0000:00:04.0:   PREFETCH window: 0x000000d8000000-0x000000dfffffff
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
pci 0000:00:1e.0:   IO window: disabled
pci 0000:00:1e.0:   MEM window: 0xd0a00000-0xd0afffff
pci 0000:00:1e.0:   PREFETCH window: disabled
ioapic_register_intr: irq = 16, trig = 1, apic_trig = 1, remap = 0
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: setting latency timer to 64
pci 0000:02:00.0: setting latency timer to 64
pci 0000:02:00.2: setting latency timer to 64
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:02: resource 0 io:  [0x2000-0x3fff]
pci_bus 0000:02: resource 1 mem: [0xd0100000-0xd08fffff]
pci_bus 0000:02: resource 2 pref mem [0xc0000000-0xc03fffff]
pci_bus 0000:03: resource 0 io:  [0x2000-0x2fff]
pci_bus 0000:03: resource 1 mem: [0xd0200000-0xd07fffff]
pci_bus 0000:03: resource 2 pref mem [0xc0000000-0xc03fffff]
pci_bus 0000:04: resource 0 io:  [0x3000-0x3fff]
pci_bus 0000:04: resource 1 mem: [0xd0800000-0xd08fffff]
pci_bus 0000:05: resource 0 io:  [0x4000-0x4fff]
pci_bus 0000:05: resource 1 mem: [0xd0900000-0xd09fffff]
pci_bus 0000:05: resource 2 pref mem [0xd8000000-0xdfffffff]
pci_bus 0000:06: resource 1 mem: [0xd0a00000-0xd0afffff]
pci_bus 0000:06: resource 3 io:  [0x00-0xffff]
pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Unpacking initramfs...
Freeing initrd memory: 1892k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
audit: initializing netlink socket (disabled)
type=2000 audit(1259569352.284:1): initialized
I-pipe: Domain Xenomai registered.
Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream) loaded.
msgmni has been set to 1767
io scheduler noop registered
io scheduler deadline registered (default)
pci 0000:05:00.0: Boot video device
pcieport-driver 0000:00:02.0: setting latency timer to 64
pcieport-driver 0000:00:03.0: setting latency timer to 64
pcieport-driver 0000:00:04.0: setting latency timer to 64
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Using IPI Shortcut mode
Freeing unused kernel memory: 292k freed
input: AT Translated Set 2 keyboard as /class/input/input0
NET: Registered protocol family 1
libata version 3.00 loaded.
sata_mv 0000:03:03.0: version 1.28
ioapic_register_intr: irq = 28, trig = 1, apic_trig = 1, remap = 0
sata_mv 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
sata_mv 0000:03:03.0: Gen-II 32 slots 8 ports SCSI mode IRQ via INTx
Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI
Copyright (c) 1999-2006 Intel Corporation.
ioapic_register_intr: irq = 54, trig = 1, apic_trig = 1, remap = 0
e1000 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
ata_piix 0000:00:1f.2: version 2.13
ioapic_register_intr: irq = 18, trig = 1, apic_trig = 1, remap = 0
ata_piix 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
scsi0 : sata_mv
scsi1 : sata_mv
scsi2 : sata_mv
scsi3 : sata_mv
scsi4 : sata_mv
scsi5 : sata_mv
scsi6 : sata_mv
scsi7 : sata_mv
ata1: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 28
ata2: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 28
ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 28
ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 28
ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0232000 irq 28
ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0234000 irq 28
ata7: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0236000 irq 28
ata8: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0238000 irq 28
ata_piix 0000:00:1f.2: setting latency timer to 64
scsi8 : ata_piix
scsi9 : ata_piix
ata9: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x18f0 irq 14
ata10: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18f8 irq 15
input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
e1000: 0000:04:02.0: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b6
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
ioapic_register_intr: irq = 55, trig = 1, apic_trig = 1, remap = 0
e1000 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
ata10.00: ATA-7: HDT722525DLA380, V44OA96A, max UDMA/133
ata10.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1: SATA link down (SStatus 0 SControl 300)
ata10.00: configured for UDMA/133
ata9.00: ATAPI: SONY    DVD RW DW-Q30A, YYS2, max UDMA/66
ata9.00: limited to UDMA/33 due to 40-wire cable
ata9.00: configured for UDMA/33
e1000: 0000:04:02.1: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b7
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
ata2: SATA link down (SStatus 0 SControl 300)
ata3: SATA link down (SStatus 0 SControl 300)
ata4: SATA link down (SStatus 0 SControl 300)
ata5: SATA link down (SStatus 0 SControl 300)
ata6: SATA link down (SStatus 0 SControl 300)
ata7: SATA link down (SStatus 0 SControl 300)
ata8: SATA link down (SStatus 0 SControl 300)
scsi 8:0:0:0: CD-ROM            SONY     DVD RW DW-Q30A   YYS2 PQ: 0 ANSI: 5
scsi 9:0:0:0: Direct-Access     ATA      HDT722525DLA380  V44O PQ: 0 ANSI: 5
sd 9:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 9:0:0:0: [sda] Write Protect is off
sd 9:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 9:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 < sda5 >
sd 9:0:0:0: [sda] Attached SCSI disk
Uniform Multi-Platform E-IDE driver
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with writeback data mode.
udevd version 125 started
(astropci_init): +-------------------------------+
(astropci_init): |   ASTROPCI - Initialization   |
(astropci_init): +-------------------------------+
(astropci_probe): looking for ARC PCI boards ...
ioapic_register_intr: irq = 20, trig = 1, apic_trig = 1, remap = 0
astropci 0000:06:02.0: PCI->APIC IRQ transform: INT A -> IRQ 20
(astropci_probe): ISR name: astropci0 device num: 0
IRQ 20/astropci0: IRQF_DISABLED is not guaranteed on shared IRQs
(astropci_probe): Successfully probed device 0, has_irq: 1, irq 20, func 16
(astropci_probe): finished looking for ARC PCI boards
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
Analogy: MITE: Available NI device IDs: 0x1880
Adding 2650684k swap on /dev/sda5.  Priority:-1 extents:1 across:2650684k 
EXT3 FS on sda1, internal journal
Xenomai: starting native API services.
e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
warning: `ntpd' uses 32-bit capabilities (legacy support in use)
irq_test: before request_irq
irq_test: after request_irq (err = -38)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-11-30  8:41                       ` Ettore Pedretti
@ 2009-12-02 23:21                         ` Alexis Berlemont
  2009-12-15 15:41                           ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-12-02 23:21 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

Ettore Pedretti wrote:
> Hi,

Sorry for the late reply.

> I applied your kernel patch before applying the xenomai patch. When I
> insert the kernel patch I obtain:
> 
> insmod: error inserting 'test_module.ko': -1 Function not implemented

Yes. request_irq returns an error because the io_apic did not register
the interrupt.

> Attached is the content of dmesg from boot to module insertion.

Thanks to your traces and a look at the x86-specific pci code in the
kernel (arch/x86/pci), I think I understand the way it works.

The fact that request_irq return -ENOSYS is normal: the irq is not
"enabled". In order to enable the pci card's irq, we have to enable the
pci device (thanks to a call to pci_enable()). This operation will route
the PCI interrupt line to an io_apic irq; after that, the io_apic will
register the irq. Once this procedure is complete, the irq is made
available for Linux.

That is the reason why, our little Linux test module failed and our
little RTDM test module crashed.

If you had the kernel boot argument "pci=routeirq", both test modules
should insmod fine because all pci interrupt are "enabled" during the
PCI discovery.

Concerning the analogy driver, that does not explain the problem because
the pci board enabling is _supposed_ to be ok. Could you also test the
attach procedure with kernel boot argument specified above ?

> Cheers
> -ep
> 
> ps. I am leaving the mountain tomorrow and will be travelling until
> Friday. I hope I will be able to test the machine at distance without
> crashing it for good.
> 
> 
> 
> 
> 2009/11/29 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> Hi,
>>
>> Ettore Pedretti wrote:
>>> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid>
>>>> wrote:
>>>>> Hi Alexis,
>>>>>
>>>>> I applied the patch to my local git repository:
>>>>>
>>>>> fangorn:/usr/src#
>>>>> cd xenomai-head/
>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>> patch_debug_1.diff
>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>>>      rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>>>> warning: 1 line adds whitespace errors.
>>>>>
>>>>> Then created a debian package:
>>>>>
>>>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>>>> --git-upstream-branch=origin/master --git-ignore-new
>>>>>
>>>>> built a new kernel package:
>>>>>
>>>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>>>
>>>>> and installed the Debian package with dpkg -i
>>>>>
>>>>> This is what happens when i insert the module into the kernel:
>>>>>
>>>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>>>> Killed
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>> fangorn:~/control/CHAMP/irqTest#
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>> task.ti=f6c02000)
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:I-pipe domain Linux
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:Stack:
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:Call Trace:
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:Code:  Bad EIP value.
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>
>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>  kernel:CR2: 0000000000000000
>>>>>
>>>>> dmesg after insmod:
>>>>>
>>>>> irq_test: before rtdm_irq_request
>>>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>>>> IP: [<(null)>] (null)
>>>>> *pde = 00000000
>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>> last sysfs file: /sys/class/net/lo/operstate
>>>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>>>> scsi_wait_scan]
>>>>>
>>>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>>>> EIP is at 0x0
>>>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>>> I-pipe domain Linux
>>>>> Stack:
>>>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000 00000000
>>>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000
>>>>> f8e27000
>>>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000
>>>>> f6c03f84
>>>>> Call Trace:
>>>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>>>> Code:  Bad EIP value.
>>>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>> CR2: 0000000000000000
>>>>> ---[ end trace ac2616367ecf94b2 ]---
>>>>>
>>>>> I hope this is what you wanted me to try. Please let me know.
>>>> So if I understand well, you "insmoded" the little test module which
>>>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>>>> occured.
>>> Correct
>>>
>>>> This bug occurred before calling analogy_config, you did not tried to
>>>> attach the ni_pcimio driver, right ?
>>> I insmod-ed the test module that gave that error dump. I later tried
>>> to attach the driver which causes the usual error. The stack-dumps I
>>> sent are solely related to insmod of test program.
>>>
>>>> If I am right, it seems like the bug is not located in analogy but
>>>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>>>
>>>> What is your kernel configuration ? no IO_APIC ?
>>> I put back my config to IO_APIC. Should I disable that again?
>>> attached is my kernel configuration (configAnalogy)
>>>
>>>
>>>> Which irq did you try to request ? 48 or 5 ?
>>> I do not know. do I have to pass parameters to insmod?
>>>
>>> This is my /proc/interrupts if that is helpful
>>>           CPU0       CPU1
>>>  0:        222          0   IO-APIC-edge      timer
>>>  1:          0          9   IO-APIC-edge      i8042
>>>  2:          0          0    XT-PIC-XT        cascade
>>>  12:          0        132   IO-APIC-edge      i8042
>>>  14:          0          8   IO-APIC-edge      ata_piix
>>>  15:          0      12358   IO-APIC-edge      ata_piix
>>>  20:          0          0   IO-APIC-fasteoi   astropci0
>>>  28:          0        235   IO-APIC-fasteoi   sata_mv
>>>  54:          0      77950   IO-APIC-fasteoi   eth0
>>> NMI:          0          0   Non-maskable interrupts
>>> LOC:   45365307   45365133   Local timer interrupts
>>> SPU:          0          0   Spurious interrupts
>>> CNT:          0          0   Performance counter interrupts
>>> PND:          0          0   Performance pending work
>>> RES:       2555       2212   Rescheduling interrupts
>>> CAL:         60         58   Function call interrupts
>>> TLB:        419        200   TLB shootdowns
>>> TRM:          0          0   Thermal event interrupts
>>> THR:          0          0   Threshold APIC interrupts
>>> MCE:          0          0   Machine check exceptions
>>> MCP:        152        152   Machine check polls
>>> ERR:          0
>>> MIS:          0
>>>
>>> and my /proc/xenomai/irq
>>>
>>> IRQ         CPU0        CPU1
>>> 516:           0           0         [IPI]
>>> 519:    46161773    46161772         [timer]
>>> 520:           0           0         [critical sync]
>>> 546:           0           0         [virtual]
>>>
>>>
>>>> Which CPU are you using ?
>>> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>
>>> As Philippe rightly pointed out this is a 32-bit install although the
>>> CPUs are 64 bit
>> Following Philippe's advice, I attached a little patch for your kernel
>> sources. Could you apply it and send the kernel log messages ?
>>
>> You will also find attached the sources of a little module which calls
>> Linux' request_irq(48). Could you insmod the module and send a dump of
>> /proc/interrupts ?
>>
>>>> Thank you for your time.
>>>>
>>>>> Cheers
>>>>> Ettore
>>>>>
>>>>>
>>>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>>>> Sorry, I did not answer your question. The bug occurs in both
>>>>>> configurations;
>>>>>> so, do not bother changing your configuration for the moment.
>>>>>>
>>>>>>> Cheers
>>>>>>> Ettore
>>>>>>>
>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>>>
>>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled.
>>>>>>>> So,
>>>>>>>> the irq 48 turns into the irq 5;
>>>>>>>>
>>>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>>>  configuration.
>>>>>>>> With the fact that there is still a NULL pointer bug without IO APIC,
>>>>>>>> the
>>>>>>>> bug is bound to be located in analogy. There may be some wrong write
>>>>>>>> access on the interrupt structure.
>>>>>>>>
>>>>>>>> I will come back with a patch which dumps the structure's content at
>>>>>>>> various locations in the attach code.
>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Ettore
>>>>>>>>>
>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti
>>>>>>>>>> <ep41@domain.hid>
>>>>>>>> wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>>>
>>>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>>>
>>>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>>>> endif
>>>>>>>>>>>
>>>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> all: default
>>>>>>>>>>>
>>>>>>>>>>> default:
>>>>>>>>>>>       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>>>
>>>>>>>>>>> install:
>>>>>>>>>>>       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>>>
>>>>>>>>>>> clean:
>>>>>>>>>>>       rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>>>
>>>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>>>
>>>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>
>>>>>>>>>>> To make sure module dependencies are in place I modprobe irqbench
>>>>>>>>>>> (probably not necessary).
>>>>>>>>>>>
>>>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>>>
>>>>>>>>>>> All the loaded modules:
>>>>>>>>>>>
>>>>>>>>>>> fangorn:~# lsmod
>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>>>> xeno_native            83296  0
>>>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>> 38876  5
>>>>>>>>>>>
>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>>>> 10968 0
>>>>>>>>>>> ext3                  112900  1
>>>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>>>> e1000                 118204  0
>>>>>>>>>>> ata_piix               15968  2
>>>>>>>>>>> sata_mv                27632  0
>>>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>>>> unix                   24460  10
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>>>
>>>>>>>>>>> insmod irqTest.ko
>>>>>>>>>>>
>>>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in module
>>>>>>>>>>>
>>>>>>>>>>> dmesg:
>>>>>>>>>>>
>>>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>>>
>>>>>>>>>>> What am I doing wrong?
>>>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>>>> kernel.
>>>>>>>>>>
>>>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>>>> could you add the following line in the test module:
>>>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>>>
>>>>>>>>>> With that, the insmod operation should work.
>>>>>>>>>>
>>>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>>>> problem.
>>>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a
>>>>>>>>>> clue.
>>>>>>>>>>
>>>>>>>>>>> Cheers
>>>>>>>>>>> Ettore
>>>>>>>>>>>
>>>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need
>>>>>>>>>>>>> to
>>>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>>>> generator board.
>>>>>>>>>>>>>
>>>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I
>>>>>>>>>>>>> obtain
>>>>>>>>>>>>> the following:
>>>>>>>>>>>>>
>>>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened (fd=0)
>>>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>>>       subdevices count = 0
>>>>>>>>>>>>>       read subdevice index = 0
>>>>>>>>>>>>>       write subdevice index = 0
>>>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size
>>>>>>>>>>>>> (fast):
>>>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303
>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303
>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619
>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619
>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000
>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000 08:01
>>>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000
>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618    /lib/ld-2.7.so
>>>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>>>> Aborted
>>>>>>>>>>>>>
>>>>>>>>>>>>> This is probably because the device /dev/analogy0 does not
>>>>>>>>>>>>> exist.
>>>>>>>>>>>>>
>>>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>>>
>>>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST
>>>>>>>>>>>>> 2009
>>>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>>>
>>>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>>>
>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>>>
>>>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>>>
>>>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>>>
>>>>>>>>>>>>> And lsmod:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>>  40220  5
>>>>>>>>>>>>>
>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> According to this post:
>>>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>>>
>>>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your
>>>>>>>>>>>>>> last
>>>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry:
>>>>>>>>>>>>>> a4l_pcimio.
>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>>>
>>>>>>>>>>>>> | idx | driver name
>>>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>>>
>>>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>>>
>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>>>
>>>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>>>
>>>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>>>
>>>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>>>> This is what happens when I try to attach the driver to de
>>>>>>>>>>>>> device:
>>>>>>>>>>>>>
>>>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe
>>>>>>>>>>>>> ff
>>>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00
>>>>>>>>>>>>> 00
>>>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01
>>>>>>>>>>>>> 00
>>>>>>>>>>>>> 00 31
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>>>
>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>>>
>>>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode
>>>>>>>>>>>>> = 3
>>>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins =
>>>>>>>>>>>>> 0,
>>>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at
>>>>>>>>>>>>> 00000004
>>>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>> last sysfs file:
>>>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class Modules
>>>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy
>>>>>>>>>>>>> xeno_rtdm
>>>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix
>>>>>>>>>>>>> sata_mv
>>>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>>>
>>>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>>>> Stack:
>>>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7 f64cddfc
>>>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0
>>>>>>>>>>>>> f64cde14
>>>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38
>>>>>>>>>>>>> f8c2cccf
>>>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>>>>>>>>>>>> 8b
>>>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b
>>>>>>>>>>>>> 42
>>>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00
>>>>>>>>>>>>> 31
>>>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>>>
>>>>>>>>>>>> I keep two things in mind:
>>>>>>>>>>>> - cmd_write's error handling path is not buggy (that was already
>>>>>>>>>>>> in
>>>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>>>
>>>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>>>> registering seems to be the source of the trouble. What strikes
>>>>>>>>>>>> me
>>>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are no
>>>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>>>
>>>>>>>>>>>> In order to be sure that the problem is located in analogy, it
>>>>>>>>>>>> would
>>>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...)
>>>>>>>>>>>> does
>>>>>>>>>>>> not trigger the bug.
>>>>>>>>>>>>
>>>>>>>>>>>> Here is a little test module you could try to insmod. If you do
>>>>>>>>>>>> not
>>>>>>>>>>>> want to bother finding out how to compile it, you can replace the
>>>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>>>
>>>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC
>>>>>>>>>>>> in
>>>>>>>>>>>> your kernel configuration (in "Processor type and features",
>>>>>>>>>>>> disable
>>>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>>>
>>>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>>>
>>>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>>>> {
>>>>>>>>>>>>
>>>>>>>>>>>>       rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>>>
>>>>>>>>>>>>       return RTDM_IRQ_HANDLED;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>>>
>>>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>>>> {
>>>>>>>>>>>>
>>>>>>>>>>>>       int err;
>>>>>>>>>>>>
>>>>>>>>>>>>       rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>>>
>>>>>>>>>>>>       err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>>>
>>>>>>>>>>>>       rtdm_printk("irq_test: after rtdm_irq_request (err =
>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>> err);
>>>>>>>>>>>>
>>>>>>>>>>>>       rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>>>
>>>>>>>>>>>>       err = rtdm_irq_enable(&handle);
>>>>>>>>>>>>
>>>>>>>>>>>>       rtdm_printk("irq_test: after rtdm_irq_enable (err = %d)\n",
>>>>>>>>>>>> err);
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>       return err;
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>>>> {
>>>>>>>>>>>>
>>>>>>>>>>>>       rtdm_irq_free(&handle);
>>>>>>>>>>>>
>>>>>>>>>>>> }
>>>>>>>>>>>>
>>>>>>>>>>>> module_init(__test_init);
>>>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>>>
>>>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best regards
>>>>>>>>>>>>> Ettore Pedretti
>>>>>>>>>> Alexis.
>>>>>>>> Alexis.
>>>>>> _______________________________________________
>>>>>> Xenomai-help mailing list
>>>>>> Xenomai-help@domain.hid
>>>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>>>
>> Alexis.
>>
> 
> 
> 

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-12-02 23:21                         ` Alexis Berlemont
@ 2009-12-15 15:41                           ` Ettore Pedretti
  2009-12-15 23:49                             ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2009-12-15 15:41 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

Hi,

I have added routeirq to the kernel parameters:

kernel          /boot/vmlinuz-2.6.31.1 root=LABEL=ROOTFS_TEST ro noht
mem=2048M memmap=1024M pci=routeirq

When I insert your test module:

fangorn:~/control/CHAMP/irqTest# insmod test_module.ko

The trace is:

rq_test: before request_irq
irq_test: after request_irq (err = 0)

When I try the attach procedure:

analogy_config analogy0 analogy_ni_pcimio
Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:Oops: 0000 [#1] PREEMPT SMP

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:last sysfs file: /sys/class/net/lo/operstate

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730
task.ti=f6c48000)

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:I-pipe domain Linux

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:Stack:

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:Call Trace:

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
SS:ESP 0068:f6c49dc8

Message from syslogd@domain.hid at Dec 15 07:39:25 ...
 kernel:CR2: 0000000000000004

And the trace:

a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
mite 0000:04:01.0: setting latency timer to 64
a4l: MITE: 0xd0801000 mapped to f8e32000
a4l: DAQ: 0xd0800000 mapped to f8e36000
a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
BUG: unable to handle kernel NULL pointer dereference at 00000004
IP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: test_module xeno_native analogy_ni_pcimio
analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
ide_core ata_piix e1000 sata_mv libata unix [last unloaded:
scsi_wait_scan]

Pid: 3556, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
EIP: 0060:[<f8c7f029>] EFLAGS: 00010202 CPU: 1
EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
EAX: 00000000 EBX: f8a24280 ECX: f8c33e6c EDX: f8c33e60
ESI: 00000000 EDI: f8c33e60 EBP: f6c49e38 ESP: f6c49dc8
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730 task.ti=f6c48000)
I-pipe domain Linux
Stack:
 f6c49dd0 c10143ee f6c49dd8 f8c33e60 f6c49de0 c105ad27 f6c49dfc f8a10a5d
<0> f8c2de00 00000000 00000001 f8c33e94 fffffff0 f6c49e14 f8c2e118 00000001
<0> f8c30d0d f8c33e88 f8c33e60 f6c49e38 f8c2eccf 00000001 f8c33e60 00000030
Call Trace:
 [<c10143ee>] ? unmask_IO_APIC_irq+0xd/0xf
 [<c105ad27>] ? xnintr_enable+0xb/0xd
 [<f8a10a5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
 [<f8c2de00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
 [<f8c2e118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
 [<f8c2eccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
 [<f8c8dd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
 [<f8c2cfef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
 [<f8c2d2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
 [<c106641a>] ? xnshadow_ppd_get+0x4f/0x58
 [<f8c2d54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
 [<f8c2f36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
 [<f8a0f3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
 [<f8a11e77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
 [<f8a11dde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
 [<c1069ade>] ? losyscall_event+0xa9/0x190
 [<c10567fe>] ? __ipipe_dispatch_event+0xdf/0x201
 [<c1069a35>] ? losyscall_event+0x0/0x190
 [<c10167d1>] ? __ipipe_syscall_root+0x3b/0xc4
 [<c1002cfd>] ? system_call+0x2d/0x4f
Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP 0068:f6c49dc8
CR2: 0000000000000004
---[ end trace bcff6beb2ba30576 ]---

Ettore


2009/12/2 Alexis Berlemont <berlemont.hauw@domain.hid>:
> Hi,
>
> Ettore Pedretti wrote:
>>
>> Hi,
>
> Sorry for the late reply.
>
>> I applied your kernel patch before applying the xenomai patch. When I
>> insert the kernel patch I obtain:
>>
>> insmod: error inserting 'test_module.ko': -1 Function not implemented
>
> Yes. request_irq returns an error because the io_apic did not register
> the interrupt.
>
>> Attached is the content of dmesg from boot to module insertion.
>
> Thanks to your traces and a look at the x86-specific pci code in the
> kernel (arch/x86/pci), I think I understand the way it works.
>
> The fact that request_irq return -ENOSYS is normal: the irq is not
> "enabled". In order to enable the pci card's irq, we have to enable the
> pci device (thanks to a call to pci_enable()). This operation will route
> the PCI interrupt line to an io_apic irq; after that, the io_apic will
> register the irq. Once this procedure is complete, the irq is made
> available for Linux.
>
> That is the reason why, our little Linux test module failed and our
> little RTDM test module crashed.
>
> If you had the kernel boot argument "pci=routeirq", both test modules
> should insmod fine because all pci interrupt are "enabled" during the
> PCI discovery.
>
> Concerning the analogy driver, that does not explain the problem because
> the pci board enabling is _supposed_ to be ok. Could you also test the
> attach procedure with kernel boot argument specified above ?
>
>> Cheers
>> -ep
>>
>> ps. I am leaving the mountain tomorrow and will be travelling until
>> Friday. I hope I will be able to test the machine at distance without
>> crashing it for good.
>>
>>
>>
>>
>> 2009/11/29 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>
>>> Hi,
>>>
>>> Ettore Pedretti wrote:
>>>>
>>>> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>
>>>>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid>
>>>>> wrote:
>>>>>>
>>>>>> Hi Alexis,
>>>>>>
>>>>>> I applied the patch to my local git repository:
>>>>>>
>>>>>> fangorn:/usr/src#
>>>>>> cd xenomai-head/
>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>> patch_debug_1.diff
>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>>>>     rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>>>>> warning: 1 line adds whitespace errors.
>>>>>>
>>>>>> Then created a debian package:
>>>>>>
>>>>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>>>>> --git-upstream-branch=origin/master --git-ignore-new
>>>>>>
>>>>>> built a new kernel package:
>>>>>>
>>>>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>>>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>>>>
>>>>>> and installed the Debian package with dpkg -i
>>>>>>
>>>>>> This is what happens when i insert the module into the kernel:
>>>>>>
>>>>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>>>>> Killed
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>> fangorn:~/control/CHAMP/irqTest#
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>>> task.ti=f6c02000)
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:I-pipe domain Linux
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:Stack:
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:Call Trace:
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:Code:  Bad EIP value.
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>
>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>  kernel:CR2: 0000000000000000
>>>>>>
>>>>>> dmesg after insmod:
>>>>>>
>>>>>> irq_test: before rtdm_irq_request
>>>>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>>>>> IP: [<(null)>] (null)
>>>>>> *pde = 00000000
>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>> last sysfs file: /sys/class/net/lo/operstate
>>>>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>>>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>>>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>>>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>>>>> scsi_wait_scan]
>>>>>>
>>>>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>>>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>>>>> EIP is at 0x0
>>>>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>>>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>>>> I-pipe domain Linux
>>>>>> Stack:
>>>>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000
>>>>>> 00000000
>>>>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000
>>>>>> f8e27000
>>>>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000
>>>>>> f6c03f84
>>>>>> Call Trace:
>>>>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>>>>> Code:  Bad EIP value.
>>>>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>> CR2: 0000000000000000
>>>>>> ---[ end trace ac2616367ecf94b2 ]---
>>>>>>
>>>>>> I hope this is what you wanted me to try. Please let me know.
>>>>>
>>>>> So if I understand well, you "insmoded" the little test module which
>>>>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>>>>> occured.
>>>>
>>>> Correct
>>>>
>>>>> This bug occurred before calling analogy_config, you did not tried to
>>>>> attach the ni_pcimio driver, right ?
>>>>
>>>> I insmod-ed the test module that gave that error dump. I later tried
>>>> to attach the driver which causes the usual error. The stack-dumps I
>>>> sent are solely related to insmod of test program.
>>>>
>>>>> If I am right, it seems like the bug is not located in analogy but
>>>>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>>>>
>>>>> What is your kernel configuration ? no IO_APIC ?
>>>>
>>>> I put back my config to IO_APIC. Should I disable that again?
>>>> attached is my kernel configuration (configAnalogy)
>>>>
>>>>
>>>>> Which irq did you try to request ? 48 or 5 ?
>>>>
>>>> I do not know. do I have to pass parameters to insmod?
>>>>
>>>> This is my /proc/interrupts if that is helpful
>>>>          CPU0       CPU1
>>>>  0:        222          0   IO-APIC-edge      timer
>>>>  1:          0          9   IO-APIC-edge      i8042
>>>>  2:          0          0    XT-PIC-XT        cascade
>>>>  12:          0        132   IO-APIC-edge      i8042
>>>>  14:          0          8   IO-APIC-edge      ata_piix
>>>>  15:          0      12358   IO-APIC-edge      ata_piix
>>>>  20:          0          0   IO-APIC-fasteoi   astropci0
>>>>  28:          0        235   IO-APIC-fasteoi   sata_mv
>>>>  54:          0      77950   IO-APIC-fasteoi   eth0
>>>> NMI:          0          0   Non-maskable interrupts
>>>> LOC:   45365307   45365133   Local timer interrupts
>>>> SPU:          0          0   Spurious interrupts
>>>> CNT:          0          0   Performance counter interrupts
>>>> PND:          0          0   Performance pending work
>>>> RES:       2555       2212   Rescheduling interrupts
>>>> CAL:         60         58   Function call interrupts
>>>> TLB:        419        200   TLB shootdowns
>>>> TRM:          0          0   Thermal event interrupts
>>>> THR:          0          0   Threshold APIC interrupts
>>>> MCE:          0          0   Machine check exceptions
>>>> MCP:        152        152   Machine check polls
>>>> ERR:          0
>>>> MIS:          0
>>>>
>>>> and my /proc/xenomai/irq
>>>>
>>>> IRQ         CPU0        CPU1
>>>> 516:           0           0         [IPI]
>>>> 519:    46161773    46161772         [timer]
>>>> 520:           0           0         [critical sync]
>>>> 546:           0           0         [virtual]
>>>>
>>>>
>>>>> Which CPU are you using ?
>>>>
>>>> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>
>>>> As Philippe rightly pointed out this is a 32-bit install although the
>>>> CPUs are 64 bit
>>>
>>> Following Philippe's advice, I attached a little patch for your kernel
>>> sources. Could you apply it and send the kernel log messages ?
>>>
>>> You will also find attached the sources of a little module which calls
>>> Linux' request_irq(48). Could you insmod the module and send a dump of
>>> /proc/interrupts ?
>>>
>>>>> Thank you for your time.
>>>>>
>>>>>> Cheers
>>>>>> Ettore
>>>>>>
>>>>>>
>>>>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>
>>>>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>>>>>
>>>>>>> Sorry, I did not answer your question. The bug occurs in both
>>>>>>> configurations;
>>>>>>> so, do not bother changing your configuration for the moment.
>>>>>>>
>>>>>>>> Cheers
>>>>>>>> Ettore
>>>>>>>>
>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>>>>
>>>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>>>>>
>>>>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled.
>>>>>>>>> So,
>>>>>>>>> the irq 48 turns into the irq 5;
>>>>>>>>>
>>>>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>>>>  configuration.
>>>>>>>>>
>>>>>>>>> With the fact that there is still a NULL pointer bug without IO
>>>>>>>>> APIC,
>>>>>>>>> the
>>>>>>>>> bug is bound to be located in analogy. There may be some wrong
>>>>>>>>> write
>>>>>>>>> access on the interrupt structure.
>>>>>>>>>
>>>>>>>>> I will come back with a patch which dumps the structure's content
>>>>>>>>> at
>>>>>>>>> various locations in the attach code.
>>>>>>>>>
>>>>>>>>>> Cheers
>>>>>>>>>> Ettore
>>>>>>>>>>
>>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti
>>>>>>>>>>> <ep41@domain.hid>
>>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>>>>
>>>>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>>>>
>>>>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>>>>> endif
>>>>>>>>>>>>
>>>>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> all: default
>>>>>>>>>>>>
>>>>>>>>>>>> default:
>>>>>>>>>>>>      $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>>>>
>>>>>>>>>>>> install:
>>>>>>>>>>>>      $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>>>>
>>>>>>>>>>>> clean:
>>>>>>>>>>>>      rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>>>>
>>>>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>>>>
>>>>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>
>>>>>>>>>>>> To make sure module dependencies are in place I modprobe
>>>>>>>>>>>> irqbench
>>>>>>>>>>>> (probably not necessary).
>>>>>>>>>>>>
>>>>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>>>>
>>>>>>>>>>>> All the loaded modules:
>>>>>>>>>>>>
>>>>>>>>>>>> fangorn:~# lsmod
>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>>>>> xeno_native            83296  0
>>>>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>> 38876  5
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>>>>> 10968 0
>>>>>>>>>>>> ext3                  112900  1
>>>>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>>>>> e1000                 118204  0
>>>>>>>>>>>> ata_piix               15968  2
>>>>>>>>>>>> sata_mv                27632  0
>>>>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>>>>> unix                   24460  10
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>>>>
>>>>>>>>>>>> insmod irqTest.ko
>>>>>>>>>>>>
>>>>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in
>>>>>>>>>>>> module
>>>>>>>>>>>>
>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>
>>>>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>>>>
>>>>>>>>>>>> What am I doing wrong?
>>>>>>>>>>>
>>>>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>>>>> kernel.
>>>>>>>>>>>
>>>>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>>>>> could you add the following line in the test module:
>>>>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>>>>
>>>>>>>>>>> With that, the insmod operation should work.
>>>>>>>>>>>
>>>>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>>>>> problem.
>>>>>>>>>>>
>>>>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a
>>>>>>>>>>> clue.
>>>>>>>>>>>
>>>>>>>>>>>> Cheers
>>>>>>>>>>>> Ettore
>>>>>>>>>>>>
>>>>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>>>>> generator board.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I
>>>>>>>>>>>>>> obtain
>>>>>>>>>>>>>> the following:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened
>>>>>>>>>>>>>> (fd=0)
>>>>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>>>>      subdevices count = 0
>>>>>>>>>>>>>>      read subdevice index = 0
>>>>>>>>>>>>>>      write subdevice index = 0
>>>>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size
>>>>>>>>>>>>>> (fast):
>>>>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303
>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303
>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619
>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619
>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000
>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000
>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000
>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618
>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618
>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>>>>> Aborted
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This is probably because the device /dev/analogy0 does not
>>>>>>>>>>>>>> exist.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST
>>>>>>>>>>>>>> 2009
>>>>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> And lsmod:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>>>  40220  5
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> According to this post:
>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.orgml
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your
>>>>>>>>>>>>>>> last
>>>>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry:
>>>>>>>>>>>>>>> a4l_pcimio.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> | idx | driver name
>>>>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.orgl
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This is what happens when I try to attach the driver to de
>>>>>>>>>>>>>> device:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4
>>>>>>>>>>>>>> fe
>>>>>>>>>>>>>> ff
>>>>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00
>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b
>>>>>>>>>>>>>> 01
>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>> 00 31
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1
>>>>>>>>>>>>>> [analogy_ni_mio]
>>>>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface
>>>>>>>>>>>>>> mode
>>>>>>>>>>>>>> = 3
>>>>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins =
>>>>>>>>>>>>>> 0,
>>>>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at
>>>>>>>>>>>>>> 00000004
>>>>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>> last sysfs file:
>>>>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>> Modules
>>>>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy
>>>>>>>>>>>>>> xeno_rtdm
>>>>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix
>>>>>>>>>>>>>> sata_mv
>>>>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1)
>>>>>>>>>>>>>> X6DA8
>>>>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>>>>> Stack:
>>>>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7
>>>>>>>>>>>>>> f64cddfc
>>>>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0
>>>>>>>>>>>>>> f64cde14
>>>>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38
>>>>>>>>>>>>>> f8c2cccf
>>>>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>>>>>>>>>>>>> 8b
>>>>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b
>>>>>>>>>>>>>> 42
>>>>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>> 31
>>>>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>> SS:ESP
>>>>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I keep two things in mind:
>>>>>>>>>>>>> - cmd_write's error handling path is not buggy (that was
>>>>>>>>>>>>> already
>>>>>>>>>>>>> in
>>>>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>>>>
>>>>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>>>>> registering seems to be the source of the trouble. What strikes
>>>>>>>>>>>>> me
>>>>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are
>>>>>>>>>>>>> no
>>>>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>>>>
>>>>>>>>>>>>> In order to be sure that the problem is located in analogy, it
>>>>>>>>>>>>> would
>>>>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...)
>>>>>>>>>>>>> does
>>>>>>>>>>>>> not trigger the bug.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Here is a little test module you could try to insmod. If you do
>>>>>>>>>>>>> not
>>>>>>>>>>>>> want to bother finding out how to compile it, you can replace
>>>>>>>>>>>>> the
>>>>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC
>>>>>>>>>>>>> in
>>>>>>>>>>>>> your kernel configuration (in "Processor type and features",
>>>>>>>>>>>>> disable
>>>>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>>>>
>>>>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>>>>
>>>>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>>>>> {
>>>>>>>>>>>>>
>>>>>>>>>>>>>      rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>>>>
>>>>>>>>>>>>>      return RTDM_IRQ_HANDLED;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>>>>
>>>>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>>>>> {
>>>>>>>>>>>>>
>>>>>>>>>>>>>      int err;
>>>>>>>>>>>>>
>>>>>>>>>>>>>      rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>>>>
>>>>>>>>>>>>>      err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>>>>
>>>>>>>>>>>>>      rtdm_printk("irq_test: after rtdm_irq_request (err =
>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>> err);
>>>>>>>>>>>>>
>>>>>>>>>>>>>      rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>>>>
>>>>>>>>>>>>>      err = rtdm_irq_enable(&handle);
>>>>>>>>>>>>>
>>>>>>>>>>>>>      rtdm_printk("irq_test: after rtdm_irq_enable (err =
>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>> err);
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>      return err;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>>>>> {
>>>>>>>>>>>>>
>>>>>>>>>>>>>      rtdm_irq_free(&handle);
>>>>>>>>>>>>>
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> module_init(__test_init);
>>>>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Best regards
>>>>>>>>>>>>>> Ettore Pedretti
>>>>>>>>>>>
>>>>>>>>>>> Alexis.
>>>>>>>>>
>>>>>>>>> Alexis.
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Xenomai-help mailing list
>>>>>>> Xenomai-help@domain.hid
>>>>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>>>>
>>> Alexis.
>>>
>>
>>
>>
>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44-1334-461666, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-12-15 15:41                           ` Ettore Pedretti
@ 2009-12-15 23:49                             ` Alexis Berlemont
  2009-12-16 12:58                               ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-12-15 23:49 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Ettore Pedretti wrote:
> Hi,
> 
> I have added routeirq to the kernel parameters:
> 
> kernel          /boot/vmlinuz-2.6.31.1 root=LABEL=ROOTFS_TEST ro noht
> mem=2048M memmap=1024M pci=routeirq
> 
> When I insert your test module:
> 
> fangorn:~/control/CHAMP/irqTest# insmod test_module.ko
> 
> The trace is:
> 
> rq_test: before request_irq
> irq_test: after request_irq (err = 0)

Great ! and did the "rtdm test module" behave well ?

Could you also send the kernel traces (with the debug messages we added).

> When I try the attach procedure:
> 
> analogy_config analogy0 analogy_ni_pcimio
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:Oops: 0000 [#1] PREEMPT SMP
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:last sysfs file: /sys/class/net/lo/operstate
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730
> task.ti=f6c48000)
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:I-pipe domain Linux
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:Stack:
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:Call Trace:
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> SS:ESP 0068:f6c49dc8
> 
> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>  kernel:CR2: 0000000000000004
> 
> And the trace:
> 
> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> mite 0000:04:01.0: setting latency timer to 64
> a4l: MITE: 0xd0801000 mapped to f8e32000
> a4l: DAQ: 0xd0800000 mapped to f8e36000
> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
> a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
> BUG: unable to handle kernel NULL pointer dereference at 00000004
> IP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
> *pde = 00000000
> Oops: 0000 [#1] PREEMPT SMP
> last sysfs file: /sys/class/net/lo/operstate
> Modules linked in: test_module xeno_native analogy_ni_pcimio
> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
> ide_core ata_piix e1000 sata_mv libata unix [last unloaded:
> scsi_wait_scan]
> 
> Pid: 3556, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
> EIP: 0060:[<f8c7f029>] EFLAGS: 00010202 CPU: 1
> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
> EAX: 00000000 EBX: f8a24280 ECX: f8c33e6c EDX: f8c33e60
> ESI: 00000000 EDI: f8c33e60 EBP: f6c49e38 ESP: f6c49dc8
>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730 task.ti=f6c48000)
> I-pipe domain Linux
> Stack:
>  f6c49dd0 c10143ee f6c49dd8 f8c33e60 f6c49de0 c105ad27 f6c49dfc f8a10a5d
> <0> f8c2de00 00000000 00000001 f8c33e94 fffffff0 f6c49e14 f8c2e118 00000001
> <0> f8c30d0d f8c33e88 f8c33e60 f6c49e38 f8c2eccf 00000001 f8c33e60 00000030
> Call Trace:
>  [<c10143ee>] ? unmask_IO_APIC_irq+0xd/0xf
>  [<c105ad27>] ? xnintr_enable+0xb/0xd
>  [<f8a10a5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>  [<f8c2de00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>  [<f8c2e118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>  [<f8c2eccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>  [<f8c8dd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>  [<f8c2cfef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>  [<f8c2d2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>  [<c106641a>] ? xnshadow_ppd_get+0x4f/0x58
>  [<f8c2d54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>  [<f8c2f36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>  [<f8a0f3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>  [<f8a11e77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>  [<f8a11dde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>  [<c1069ade>] ? losyscall_event+0xa9/0x190
>  [<c10567fe>] ? __ipipe_dispatch_event+0xdf/0x201
>  [<c1069a35>] ? losyscall_event+0x0/0x190
>  [<c10167d1>] ? __ipipe_syscall_root+0x3b/0xc4
>  [<c1002cfd>] ? system_call+0x2d/0x4f
> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
> EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP 0068:f6c49dc8
> CR2: 0000000000000004
> ---[ end trace bcff6beb2ba30576 ]---
> 
> Ettore
> 
> 
> 2009/12/2 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> Hi,
>>
>> Ettore Pedretti wrote:
>>> Hi,
>> Sorry for the late reply.
>>
>>> I applied your kernel patch before applying the xenomai patch. When I
>>> insert the kernel patch I obtain:
>>>
>>> insmod: error inserting 'test_module.ko': -1 Function not implemented
>> Yes. request_irq returns an error because the io_apic did not register
>> the interrupt.
>>
>>> Attached is the content of dmesg from boot to module insertion.
>> Thanks to your traces and a look at the x86-specific pci code in the
>> kernel (arch/x86/pci), I think I understand the way it works.
>>
>> The fact that request_irq return -ENOSYS is normal: the irq is not
>> "enabled". In order to enable the pci card's irq, we have to enable the
>> pci device (thanks to a call to pci_enable()). This operation will route
>> the PCI interrupt line to an io_apic irq; after that, the io_apic will
>> register the irq. Once this procedure is complete, the irq is made
>> available for Linux.
>>
>> That is the reason why, our little Linux test module failed and our
>> little RTDM test module crashed.
>>
>> If you had the kernel boot argument "pci=routeirq", both test modules
>> should insmod fine because all pci interrupt are "enabled" during the
>> PCI discovery.
>>
>> Concerning the analogy driver, that does not explain the problem because
>> the pci board enabling is _supposed_ to be ok. Could you also test the
>> attach procedure with kernel boot argument specified above ?
>>
>>> Cheers
>>> -ep
>>>
>>> ps. I am leaving the mountain tomorrow and will be travelling until
>>> Friday. I hope I will be able to test the machine at distance without
>>> crashing it for good.
>>>
>>>
>>>
>>>
>>> 2009/11/29 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> Hi,
>>>>
>>>> Ettore Pedretti wrote:
>>>>> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid>
>>>>>> wrote:
>>>>>>> Hi Alexis,
>>>>>>>
>>>>>>> I applied the patch to my local git repository:
>>>>>>>
>>>>>>> fangorn:/usr/src#
>>>>>>> cd xenomai-head/
>>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>>> patch_debug_1.diff
>>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>>>>>     rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>>>>>> warning: 1 line adds whitespace errors.
>>>>>>>
>>>>>>> Then created a debian package:
>>>>>>>
>>>>>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>>>>>> --git-upstream-branch=origin/master --git-ignore-new
>>>>>>>
>>>>>>> built a new kernel package:
>>>>>>>
>>>>>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>>>>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>>>>>
>>>>>>> and installed the Debian package with dpkg -i
>>>>>>>
>>>>>>> This is what happens when i insert the module into the kernel:
>>>>>>>
>>>>>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>>>>>> Killed
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>> fangorn:~/control/CHAMP/irqTest#
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>>>> task.ti=f6c02000)
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:Stack:
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:Call Trace:
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:Code:  Bad EIP value.
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>>
>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>  kernel:CR2: 0000000000000000
>>>>>>>
>>>>>>> dmesg after insmod:
>>>>>>>
>>>>>>> irq_test: before rtdm_irq_request
>>>>>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>>>>>> IP: [<(null)>] (null)
>>>>>>> *pde = 00000000
>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>> last sysfs file: /sys/class/net/lo/operstate
>>>>>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>>>>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>>>>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>>>>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>>>>>> scsi_wait_scan]
>>>>>>>
>>>>>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>>>>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>>>>>> EIP is at 0x0
>>>>>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>>>>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0 task.ti=f6c02000)
>>>>>>> I-pipe domain Linux
>>>>>>> Stack:
>>>>>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000
>>>>>>> 00000000
>>>>>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000
>>>>>>> f8e27000
>>>>>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000
>>>>>>> f6c03f84
>>>>>>> Call Trace:
>>>>>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>>>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>>>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>>>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>>>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>>>>>> Code:  Bad EIP value.
>>>>>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>> CR2: 0000000000000000
>>>>>>> ---[ end trace ac2616367ecf94b2 ]---
>>>>>>>
>>>>>>> I hope this is what you wanted me to try. Please let me know.
>>>>>> So if I understand well, you "insmoded" the little test module which
>>>>>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>>>>>> occured.
>>>>> Correct
>>>>>
>>>>>> This bug occurred before calling analogy_config, you did not tried to
>>>>>> attach the ni_pcimio driver, right ?
>>>>> I insmod-ed the test module that gave that error dump. I later tried
>>>>> to attach the driver which causes the usual error. The stack-dumps I
>>>>> sent are solely related to insmod of test program.
>>>>>
>>>>>> If I am right, it seems like the bug is not located in analogy but
>>>>>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>>>>>
>>>>>> What is your kernel configuration ? no IO_APIC ?
>>>>> I put back my config to IO_APIC. Should I disable that again?
>>>>> attached is my kernel configuration (configAnalogy)
>>>>>
>>>>>
>>>>>> Which irq did you try to request ? 48 or 5 ?
>>>>> I do not know. do I have to pass parameters to insmod?
>>>>>
>>>>> This is my /proc/interrupts if that is helpful
>>>>>          CPU0       CPU1
>>>>>  0:        222          0   IO-APIC-edge      timer
>>>>>  1:          0          9   IO-APIC-edge      i8042
>>>>>  2:          0          0    XT-PIC-XT        cascade
>>>>>  12:          0        132   IO-APIC-edge      i8042
>>>>>  14:          0          8   IO-APIC-edge      ata_piix
>>>>>  15:          0      12358   IO-APIC-edge      ata_piix
>>>>>  20:          0          0   IO-APIC-fasteoi   astropci0
>>>>>  28:          0        235   IO-APIC-fasteoi   sata_mv
>>>>>  54:          0      77950   IO-APIC-fasteoi   eth0
>>>>> NMI:          0          0   Non-maskable interrupts
>>>>> LOC:   45365307   45365133   Local timer interrupts
>>>>> SPU:          0          0   Spurious interrupts
>>>>> CNT:          0          0   Performance counter interrupts
>>>>> PND:          0          0   Performance pending work
>>>>> RES:       2555       2212   Rescheduling interrupts
>>>>> CAL:         60         58   Function call interrupts
>>>>> TLB:        419        200   TLB shootdowns
>>>>> TRM:          0          0   Thermal event interrupts
>>>>> THR:          0          0   Threshold APIC interrupts
>>>>> MCE:          0          0   Machine check exceptions
>>>>> MCP:        152        152   Machine check polls
>>>>> ERR:          0
>>>>> MIS:          0
>>>>>
>>>>> and my /proc/xenomai/irq
>>>>>
>>>>> IRQ         CPU0        CPU1
>>>>> 516:           0           0         [IPI]
>>>>> 519:    46161773    46161772         [timer]
>>>>> 520:           0           0         [critical sync]
>>>>> 546:           0           0         [virtual]
>>>>>
>>>>>
>>>>>> Which CPU are you using ?
>>>>> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>>
>>>>> As Philippe rightly pointed out this is a 32-bit install although the
>>>>> CPUs are 64 bit
>>>> Following Philippe's advice, I attached a little patch for your kernel
>>>> sources. Could you apply it and send the kernel log messages ?
>>>>
>>>> You will also find attached the sources of a little module which calls
>>>> Linux' request_irq(48). Could you insmod the module and send a dump of
>>>> /proc/interrupts ?
>>>>
>>>>>> Thank you for your time.
>>>>>>
>>>>>>> Cheers
>>>>>>> Ettore
>>>>>>>
>>>>>>>
>>>>>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Would it help at this stage if I re-enable IO APIC, run your program
>>>>>>>>> and send you the call-stack dump? I am willing to test your patch on
>>>>>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>>>>>> Sorry, I did not answer your question. The bug occurs in both
>>>>>>>> configurations;
>>>>>>>> so, do not bother changing your configuration for the moment.
>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Ettore
>>>>>>>>>
>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> It is finally working. here is the dmesg after I insert a module:
>>>>>>>>>>>
>>>>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is disabled.
>>>>>>>>>> So,
>>>>>>>>>> the irq 48 turns into the irq 5;
>>>>>>>>>>
>>>>>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>>>>>  configuration.
>>>>>>>>>> With the fact that there is still a NULL pointer bug without IO
>>>>>>>>>> APIC,
>>>>>>>>>> the
>>>>>>>>>> bug is bound to be located in analogy. There may be some wrong
>>>>>>>>>> write
>>>>>>>>>> access on the interrupt structure.
>>>>>>>>>>
>>>>>>>>>> I will come back with a patch which dumps the structure's content
>>>>>>>>>> at
>>>>>>>>>> various locations in the attach code.
>>>>>>>>>>
>>>>>>>>>>> Cheers
>>>>>>>>>>> Ettore
>>>>>>>>>>>
>>>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti
>>>>>>>>>>>> <ep41@domain.hid>
>>>>>>>>>> wrote:
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>>>>>
>>>>>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>>>>>
>>>>>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>>>>>> endif
>>>>>>>>>>>>>
>>>>>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> all: default
>>>>>>>>>>>>>
>>>>>>>>>>>>> default:
>>>>>>>>>>>>>      $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>>>>>
>>>>>>>>>>>>> install:
>>>>>>>>>>>>>      $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>>>>>
>>>>>>>>>>>>> clean:
>>>>>>>>>>>>>      rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>>>>>
>>>>>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>>>>>
>>>>>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>>
>>>>>>>>>>>>> To make sure module dependencies are in place I modprobe
>>>>>>>>>>>>> irqbench
>>>>>>>>>>>>> (probably not necessary).
>>>>>>>>>>>>>
>>>>>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>>>>>
>>>>>>>>>>>>> All the loaded modules:
>>>>>>>>>>>>>
>>>>>>>>>>>>> fangorn:~# lsmod
>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>>>>>> xeno_native            83296  0
>>>>>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>> 38876  5
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>>>>>> 10968 0
>>>>>>>>>>>>> ext3                  112900  1
>>>>>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>>>>>> e1000                 118204  0
>>>>>>>>>>>>> ata_piix               15968  2
>>>>>>>>>>>>> sata_mv                27632  0
>>>>>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>>>>>> unix                   24460  10
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>>>>>
>>>>>>>>>>>>> insmod irqTest.ko
>>>>>>>>>>>>>
>>>>>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in
>>>>>>>>>>>>> module
>>>>>>>>>>>>>
>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>
>>>>>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>>>>>
>>>>>>>>>>>>> What am I doing wrong?
>>>>>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>>>>>> kernel.
>>>>>>>>>>>>
>>>>>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules. So,
>>>>>>>>>>>> could you add the following line in the test module:
>>>>>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>>>>>
>>>>>>>>>>>> With that, the insmod operation should work.
>>>>>>>>>>>>
>>>>>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>>>>>> problem.
>>>>>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a
>>>>>>>>>>>> clue.
>>>>>>>>>>>>
>>>>>>>>>>>>> Cheers
>>>>>>>>>>>>> Ettore
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I need
>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711 function
>>>>>>>>>>>>>>> generator board.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I
>>>>>>>>>>>>>>> obtain
>>>>>>>>>>>>>>> the following:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened
>>>>>>>>>>>>>>> (fd=0)
>>>>>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>>>>>      subdevices count = 0
>>>>>>>>>>>>>>>      read subdevice index = 0
>>>>>>>>>>>>>>>      write subdevice index = 0
>>>>>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size
>>>>>>>>>>>>>>> (fast):
>>>>>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303
>>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303
>>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619
>>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619
>>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000
>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000
>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000
>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618
>>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618
>>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>>>>>> Aborted
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> This is probably because the device /dev/analogy0 does not
>>>>>>>>>>>>>>> exist.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26 PST
>>>>>>>>>>>>>>> 2009
>>>>>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> And lsmod:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>>>>  40220  5
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> According to this post:
>>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with your
>>>>>>>>>>>>>>>> last
>>>>>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing "cat
>>>>>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry:
>>>>>>>>>>>>>>>> a4l_pcimio.
>>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> | idx | driver name
>>>>>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>>>>>> This is what happens when I try to attach the driver to de
>>>>>>>>>>>>>>> device:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4
>>>>>>>>>>>>>>> fe
>>>>>>>>>>>>>>> ff
>>>>>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00
>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b
>>>>>>>>>>>>>>> 01
>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>> 00 31
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1
>>>>>>>>>>>>>>> [analogy_ni_mio]
>>>>>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface
>>>>>>>>>>>>>>> mode
>>>>>>>>>>>>>>> = 3
>>>>>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins =
>>>>>>>>>>>>>>> 0,
>>>>>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>>>>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at
>>>>>>>>>>>>>>> 00000004
>>>>>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>> last sysfs file:
>>>>>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>> Modules
>>>>>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy
>>>>>>>>>>>>>>> xeno_rtdm
>>>>>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix
>>>>>>>>>>>>>>> sata_mv
>>>>>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1)
>>>>>>>>>>>>>>> X6DA8
>>>>>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>>>>>> Stack:
>>>>>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7
>>>>>>>>>>>>>>> f64cddfc
>>>>>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0
>>>>>>>>>>>>>>> f64cde14
>>>>>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38
>>>>>>>>>>>>>>> f8c2cccf
>>>>>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>>>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>>>>>>>>>>>>>> 8b
>>>>>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b
>>>>>>>>>>>>>>> 42
>>>>>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00
>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>> 31
>>>>>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>> SS:ESP
>>>>>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I keep two things in mind:
>>>>>>>>>>>>>> - cmd_write's error handling path is not buggy (that was
>>>>>>>>>>>>>> already
>>>>>>>>>>>>>> in
>>>>>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>>>>>> registering seems to be the source of the trouble. What strikes
>>>>>>>>>>>>>> me
>>>>>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we are
>>>>>>>>>>>>>> no
>>>>>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> In order to be sure that the problem is located in analogy, it
>>>>>>>>>>>>>> would
>>>>>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...)
>>>>>>>>>>>>>> does
>>>>>>>>>>>>>> not trigger the bug.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Here is a little test module you could try to insmod. If you do
>>>>>>>>>>>>>> not
>>>>>>>>>>>>>> want to bother finding out how to compile it, you can replace
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source below.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Another interesting test would be to disable CONFIG_X86_IO_APIC
>>>>>>>>>>>>>> in
>>>>>>>>>>>>>> your kernel configuration (in "Processor type and features",
>>>>>>>>>>>>>> disable
>>>>>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      return RTDM_IRQ_HANDLED;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      int err;
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      rtdm_printk("irq_test: after rtdm_irq_request (err =
>>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>>> err);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      err = rtdm_irq_enable(&handle);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      rtdm_printk("irq_test: after rtdm_irq_enable (err =
>>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>>> err);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      return err;
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      rtdm_irq_free(&handle);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> module_init(__test_init);
>>>>>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Best regards
>>>>>>>>>>>>>>> Ettore Pedretti
>>>>>>>>>>>> Alexis.
>>>>>>>>>> Alexis.
>>>>>>>> _______________________________________________
>>>>>>>> Xenomai-help mailing list
>>>>>>>> Xenomai-help@domain.hid
>>>>>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>>>>>
>>>> Alexis.
>>>>
>>>
>>>
>> Alexis.
>>
> 
> 
> 

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-12-15 23:49                             ` Alexis Berlemont
@ 2009-12-16 12:58                               ` Ettore Pedretti
  2009-12-18 21:32                                 ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2009-12-16 12:58 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

Hi,

You gave me two test modules. I sent you the trace of the second
module plus the trace of the attach procedure.

I am now sending the trace of the very first module you sent:

insmod irqTest.ko

irq_test: before rtdm_irq_request
irq_test: after rtdm_irq_request (err = 0)
irq_test: before rtdm_irq_enable
irq_test: after rtdm_irq_enable (err = 0)

Is this what you meant?

Please note that all the previous xenomai and kernel patches are in place.
Cheers
Ettore


2009/12/15 Alexis Berlemont <berlemont.hauw@domain.hid>:
> Ettore Pedretti wrote:
>>
>> Hi,
>>
>> I have added routeirq to the kernel parameters:
>>
>> kernel          /boot/vmlinuz-2.6.31.1 root=LABEL=ROOTFS_TEST ro noht
>> mem=2048M memmap=1024M pci=routeirq
>>
>> When I insert your test module:
>>
>> fangorn:~/control/CHAMP/irqTest# insmod test_module.ko
>>
>> The trace is:
>>
>> rq_test: before request_irq
>> irq_test: after request_irq (err = 0)
>
> Great ! and did the "rtdm test module" behave well ?
>
> Could you also send the kernel traces (with the debug messages we added).
>
>> When I try the attach procedure:
>>
>> analogy_config analogy0 analogy_ni_pcimio
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730
>> task.ti=f6c48000)
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:I-pipe domain Linux
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:Stack:
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:Call Trace:
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> SS:ESP 0068:f6c49dc8
>>
>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>  kernel:CR2: 0000000000000004
>>
>> And the trace:
>>
>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>> mite 0000:04:01.0: setting latency timer to 64
>> a4l: MITE: 0xd0801000 mapped to f8e32000
>> a4l: DAQ: 0xd0800000 mapped to f8e36000
>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins =
>> 2
>> a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>> IP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> *pde = 00000000
>> Oops: 0000 [#1] PREEMPT SMP
>> last sysfs file: /sys/class/net/lo/operstate
>> Modules linked in: test_module xeno_native analogy_ni_pcimio
>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>> ide_core ata_piix e1000 sata_mv libata unix [last unloaded:
>> scsi_wait_scan]
>>
>> Pid: 3556, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>> EIP: 0060:[<f8c7f029>] EFLAGS: 00010202 CPU: 1
>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>> EAX: 00000000 EBX: f8a24280 ECX: f8c33e6c EDX: f8c33e60
>> ESI: 00000000 EDI: f8c33e60 EBP: f6c49e38 ESP: f6c49dc8
>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>> Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730
>> task.ti=f6c48000)
>> I-pipe domain Linux
>> Stack:
>>  f6c49dd0 c10143ee f6c49dd8 f8c33e60 f6c49de0 c105ad27 f6c49dfc f8a10a5d
>> <0> f8c2de00 00000000 00000001 f8c33e94 fffffff0 f6c49e14 f8c2e118
>> 00000001
>> <0> f8c30d0d f8c33e88 f8c33e60 f6c49e38 f8c2eccf 00000001 f8c33e60
>> 00000030
>> Call Trace:
>>  [<c10143ee>] ? unmask_IO_APIC_irq+0xd/0xf
>>  [<c105ad27>] ? xnintr_enable+0xb/0xd
>>  [<f8a10a5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>  [<f8c2de00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>  [<f8c2e118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>  [<f8c2eccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>  [<f8c8dd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>  [<f8c2cfef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>  [<f8c2d2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>  [<c106641a>] ? xnshadow_ppd_get+0x4f/0x58
>>  [<f8c2d54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>  [<f8c2f36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>  [<f8a0f3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>  [<f8a11e77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>  [<f8a11dde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>  [<c1069ade>] ? losyscall_event+0xa9/0x190
>>  [<c10567fe>] ? __ipipe_dispatch_event+0xdf/0x201
>>  [<c1069a35>] ? losyscall_event+0x0/0x190
>>  [<c10167d1>] ? __ipipe_syscall_root+0x3b/0xc4
>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>> EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>> 0068:f6c49dc8
>> CR2: 0000000000000004
>> ---[ end trace bcff6beb2ba30576 ]---
>>
>> Ettore
>>
>>
>> 2009/12/2 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>
>>> Hi,
>>>
>>> Ettore Pedretti wrote:
>>>>
>>>> Hi,
>>>
>>> Sorry for the late reply.
>>>
>>>> I applied your kernel patch before applying the xenomai patch. When I
>>>> insert the kernel patch I obtain:
>>>>
>>>> insmod: error inserting 'test_module.ko': -1 Function not implemented
>>>
>>> Yes. request_irq returns an error because the io_apic did not register
>>> the interrupt.
>>>
>>>> Attached is the content of dmesg from boot to module insertion.
>>>
>>> Thanks to your traces and a look at the x86-specific pci code in the
>>> kernel (arch/x86/pci), I think I understand the way it works.
>>>
>>> The fact that request_irq return -ENOSYS is normal: the irq is not
>>> "enabled". In order to enable the pci card's irq, we have to enable the
>>> pci device (thanks to a call to pci_enable()). This operation will route
>>> the PCI interrupt line to an io_apic irq; after that, the io_apic will
>>> register the irq. Once this procedure is complete, the irq is made
>>> available for Linux.
>>>
>>> That is the reason why, our little Linux test module failed and our
>>> little RTDM test module crashed.
>>>
>>> If you had the kernel boot argument "pci=routeirq", both test modules
>>> should insmod fine because all pci interrupt are "enabled" during the
>>> PCI discovery.
>>>
>>> Concerning the analogy driver, that does not explain the problem because
>>> the pci board enabling is _supposed_ to be ok. Could you also test the
>>> attach procedure with kernel boot argument specified above ?
>>>
>>>> Cheers
>>>> -ep
>>>>
>>>> ps. I am leaving the mountain tomorrow and will be travelling until
>>>> Friday. I hope I will be able to test the machine at distance without
>>>> crashing it for good.
>>>>
>>>>
>>>>
>>>>
>>>> 2009/11/29 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Ettore Pedretti wrote:
>>>>>>
>>>>>> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>
>>>>>>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hidm>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi Alexis,
>>>>>>>>
>>>>>>>> I applied the patch to my local git repository:
>>>>>>>>
>>>>>>>> fangorn:/usr/src#
>>>>>>>> cd xenomai-head/
>>>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>>>> patch_debug_1.diff
>>>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>>>>>>    rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>>>>>>> warning: 1 line adds whitespace errors.
>>>>>>>>
>>>>>>>> Then created a debian package:
>>>>>>>>
>>>>>>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>>>>>>> --git-upstream-branch=origin/master --git-ignore-new
>>>>>>>>
>>>>>>>> built a new kernel package:
>>>>>>>>
>>>>>>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>>>>>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>>>>>>
>>>>>>>> and installed the Debian package with dpkg -i
>>>>>>>>
>>>>>>>> This is what happens when i insert the module into the kernel:
>>>>>>>>
>>>>>>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>>>>>>> Killed
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>> fangorn:~/control/CHAMP/irqTest#
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>>>>> task.ti=f6c02000)
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:Stack:
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:Call Trace:
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:Code:  Bad EIP value.
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>>>
>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>  kernel:CR2: 0000000000000000
>>>>>>>>
>>>>>>>> dmesg after insmod:
>>>>>>>>
>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>>>>>>> IP: [<(null)>] (null)
>>>>>>>> *pde = 00000000
>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>> last sysfs file: /sys/class/net/lo/operstate
>>>>>>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>>>>>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>>>>>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>>>>>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>>>>>>> scsi_wait_scan]
>>>>>>>>
>>>>>>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>>>>>>> EIP is at 0x0
>>>>>>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>>>>>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>>>>> task.ti=f6c02000)
>>>>>>>> I-pipe domain Linux
>>>>>>>> Stack:
>>>>>>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000
>>>>>>>> 00000000
>>>>>>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000
>>>>>>>> f8e27000
>>>>>>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000
>>>>>>>> f6c03f84
>>>>>>>> Call Trace:
>>>>>>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>>>>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>>>>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>>>>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>>>>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>>>>>>> Code:  Bad EIP value.
>>>>>>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>>> CR2: 0000000000000000
>>>>>>>> ---[ end trace ac2616367ecf94b2 ]---
>>>>>>>>
>>>>>>>> I hope this is what you wanted me to try. Please let me know.
>>>>>>>
>>>>>>> So if I understand well, you "insmoded" the little test module which
>>>>>>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>>>>>>> occured.
>>>>>>
>>>>>> Correct
>>>>>>
>>>>>>> This bug occurred before calling analogy_config, you did not tried to
>>>>>>> attach the ni_pcimio driver, right ?
>>>>>>
>>>>>> I insmod-ed the test module that gave that error dump. I later tried
>>>>>> to attach the driver which causes the usual error. The stack-dumps I
>>>>>> sent are solely related to insmod of test program.
>>>>>>
>>>>>>> If I am right, it seems like the bug is not located in analogy but
>>>>>>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>>>>>>
>>>>>>> What is your kernel configuration ? no IO_APIC ?
>>>>>>
>>>>>> I put back my config to IO_APIC. Should I disable that again?
>>>>>> attached is my kernel configuration (configAnalogy)
>>>>>>
>>>>>>
>>>>>>> Which irq did you try to request ? 48 or 5 ?
>>>>>>
>>>>>> I do not know. do I have to pass parameters to insmod?
>>>>>>
>>>>>> This is my /proc/interrupts if that is helpful
>>>>>>         CPU0       CPU1
>>>>>>  0:        222          0   IO-APIC-edge      timer
>>>>>>  1:          0          9   IO-APIC-edge      i8042
>>>>>>  2:          0          0    XT-PIC-XT        cascade
>>>>>>  12:          0        132   IO-APIC-edge      i8042
>>>>>>  14:          0          8   IO-APIC-edge      ata_piix
>>>>>>  15:          0      12358   IO-APIC-edge      ata_piix
>>>>>>  20:          0          0   IO-APIC-fasteoi   astropci0
>>>>>>  28:          0        235   IO-APIC-fasteoi   sata_mv
>>>>>>  54:          0      77950   IO-APIC-fasteoi   eth0
>>>>>> NMI:          0          0   Non-maskable interrupts
>>>>>> LOC:   45365307   45365133   Local timer interrupts
>>>>>> SPU:          0          0   Spurious interrupts
>>>>>> CNT:          0          0   Performance counter interrupts
>>>>>> PND:          0          0   Performance pending work
>>>>>> RES:       2555       2212   Rescheduling interrupts
>>>>>> CAL:         60         58   Function call interrupts
>>>>>> TLB:        419        200   TLB shootdowns
>>>>>> TRM:          0          0   Thermal event interrupts
>>>>>> THR:          0          0   Threshold APIC interrupts
>>>>>> MCE:          0          0   Machine check exceptions
>>>>>> MCP:        152        152   Machine check polls
>>>>>> ERR:          0
>>>>>> MIS:          0
>>>>>>
>>>>>> and my /proc/xenomai/irq
>>>>>>
>>>>>> IRQ         CPU0        CPU1
>>>>>> 516:           0           0         [IPI]
>>>>>> 519:    46161773    46161772         [timer]
>>>>>> 520:           0           0         [critical sync]
>>>>>> 546:           0           0         [virtual]
>>>>>>
>>>>>>
>>>>>>> Which CPU are you using ?
>>>>>>
>>>>>> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>>> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>>>
>>>>>> As Philippe rightly pointed out this is a 32-bit install although the
>>>>>> CPUs are 64 bit
>>>>>
>>>>> Following Philippe's advice, I attached a little patch for your kernel
>>>>> sources. Could you apply it and send the kernel log messages ?
>>>>>
>>>>> You will also find attached the sources of a little module which calls
>>>>> Linux' request_irq(48). Could you insmod the module and send a dump of
>>>>> /proc/interrupts ?
>>>>>
>>>>>>> Thank you for your time.
>>>>>>>
>>>>>>>> Cheers
>>>>>>>> Ettore
>>>>>>>>
>>>>>>>>
>>>>>>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>
>>>>>>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Would it help at this stage if I re-enable IO APIC, run your
>>>>>>>>>> program
>>>>>>>>>> and send you the call-stack dump? I am willing to test your patch
>>>>>>>>>> on
>>>>>>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>>>>>>>
>>>>>>>>> Sorry, I did not answer your question. The bug occurs in both
>>>>>>>>> configurations;
>>>>>>>>> so, do not bother changing your configuration for the moment.
>>>>>>>>>
>>>>>>>>>> Cheers
>>>>>>>>>> Ettore
>>>>>>>>>>
>>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> It is finally working. here is the dmesg after I insert a
>>>>>>>>>>>> module:
>>>>>>>>>>>>
>>>>>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>>>>>>>
>>>>>>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is
>>>>>>>>>>> disabled.
>>>>>>>>>>> So,
>>>>>>>>>>> the irq 48 turns into the irq 5;
>>>>>>>>>>>
>>>>>>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>>>>>>  configuration.
>>>>>>>>>>>
>>>>>>>>>>> With the fact that there is still a NULL pointer bug without IO
>>>>>>>>>>> APIC,
>>>>>>>>>>> the
>>>>>>>>>>> bug is bound to be located in analogy. There may be some wrong
>>>>>>>>>>> write
>>>>>>>>>>> access on the interrupt structure.
>>>>>>>>>>>
>>>>>>>>>>> I will come back with a patch which dumps the structure's content
>>>>>>>>>>> at
>>>>>>>>>>> various locations in the attach code.
>>>>>>>>>>>
>>>>>>>>>>>> Cheers
>>>>>>>>>>>> Ettore
>>>>>>>>>>>>
>>>>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti
>>>>>>>>>>>>> <ep41@domain.hid>
>>>>>>>>>>>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>>>>>>> endif
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> all: default
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> default:
>>>>>>>>>>>>>>     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> install:
>>>>>>>>>>>>>>     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> clean:
>>>>>>>>>>>>>>     rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> To make sure module dependencies are in place I modprobe
>>>>>>>>>>>>>> irqbench
>>>>>>>>>>>>>> (probably not necessary).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> All the loaded modules:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> fangorn:~# lsmod
>>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>>>>>>> xeno_native            83296  0
>>>>>>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>>> 38876  5
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>>>>>>> 10968 0
>>>>>>>>>>>>>> ext3                  112900  1
>>>>>>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>>>>>>> e1000                 118204  0
>>>>>>>>>>>>>> ata_piix               15968  2
>>>>>>>>>>>>>> sata_mv                27632  0
>>>>>>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>>>>>>> unix                   24460  10
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> insmod irqTest.ko
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in
>>>>>>>>>>>>>> module
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> What am I doing wrong?
>>>>>>>>>>>>>
>>>>>>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>>>>>>> kernel.
>>>>>>>>>>>>>
>>>>>>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules.
>>>>>>>>>>>>> So,
>>>>>>>>>>>>> could you add the following line in the test module:
>>>>>>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>>>>>>
>>>>>>>>>>>>> With that, the insmod operation should work.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>>>>>>> problem.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a
>>>>>>>>>>>>> clue.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Cheers
>>>>>>>>>>>>>> Ettore
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I
>>>>>>>>>>>>>>>> need
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711
>>>>>>>>>>>>>>>> function
>>>>>>>>>>>>>>>> generator board.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I
>>>>>>>>>>>>>>>> obtain
>>>>>>>>>>>>>>>> the following:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened
>>>>>>>>>>>>>>>> (fd=0)
>>>>>>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>>>>>>     subdevices count = 0
>>>>>>>>>>>>>>>>     read subdevice index = 0
>>>>>>>>>>>>>>>>     write subdevice index = 0
>>>>>>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size
>>>>>>>>>>>>>>>> (fast):
>>>>>>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303
>>>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303
>>>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619
>>>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619
>>>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000
>>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000
>>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000
>>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618
>>>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618
>>>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>>>>>>> Aborted
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> This is probably because the device /dev/analogy0 does not
>>>>>>>>>>>>>>>> exist.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26
>>>>>>>>>>>>>>>> PST
>>>>>>>>>>>>>>>> 2009
>>>>>>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> And lsmod:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio
>>>>>>>>>>>>>>>> xeno_analogy
>>>>>>>>>>>>>>>>  40220  5
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> According to this post:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org.html
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with
>>>>>>>>>>>>>>>>> your
>>>>>>>>>>>>>>>>> last
>>>>>>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing
>>>>>>>>>>>>>>>>> "cat
>>>>>>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry:
>>>>>>>>>>>>>>>>> a4l_pcimio.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> | idx | driver name
>>>>>>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.orgtml
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> This is what happens when I try to attach the driver to de
>>>>>>>>>>>>>>>> device:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85
>>>>>>>>>>>>>>>> d4
>>>>>>>>>>>>>>>> fe
>>>>>>>>>>>>>>>> ff
>>>>>>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01
>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84
>>>>>>>>>>>>>>>> 0b
>>>>>>>>>>>>>>>> 01
>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>> 00 31
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1
>>>>>>>>>>>>>>>> [analogy_ni_mio]
>>>>>>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface
>>>>>>>>>>>>>>>> mode
>>>>>>>>>>>>>>>> = 3
>>>>>>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins
>>>>>>>>>>>>>>>> =
>>>>>>>>>>>>>>>> 0,
>>>>>>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq
>>>>>>>>>>>>>>>> 48
>>>>>>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at
>>>>>>>>>>>>>>>> 00000004
>>>>>>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>>> last sysfs file:
>>>>>>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>>> Modules
>>>>>>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy
>>>>>>>>>>>>>>>> xeno_rtdm
>>>>>>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix
>>>>>>>>>>>>>>>> sata_mv
>>>>>>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1)
>>>>>>>>>>>>>>>> X6DA8
>>>>>>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>>>>>>> Stack:
>>>>>>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7
>>>>>>>>>>>>>>>> f64cddfc
>>>>>>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0
>>>>>>>>>>>>>>>> f64cde14
>>>>>>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38
>>>>>>>>>>>>>>>> f8c2cccf
>>>>>>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664
>>>>>>>>>>>>>>>> [analogy_ni_pcimio]
>>>>>>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>>>>>>>>>>>>>>> ff
>>>>>>>>>>>>>>>> 8b
>>>>>>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>>>>>>>>>>>>>>> 8b
>>>>>>>>>>>>>>>> 42
>>>>>>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01
>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>> 31
>>>>>>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>>> SS:ESP
>>>>>>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I keep two things in mind:
>>>>>>>>>>>>>>> - cmd_write's error handling path is not buggy (that was
>>>>>>>>>>>>>>> already
>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>>>>>>> registering seems to be the source of the trouble. What
>>>>>>>>>>>>>>> strikes
>>>>>>>>>>>>>>> me
>>>>>>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we
>>>>>>>>>>>>>>> are
>>>>>>>>>>>>>>> no
>>>>>>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> In order to be sure that the problem is located in analogy,
>>>>>>>>>>>>>>> it
>>>>>>>>>>>>>>> would
>>>>>>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...)
>>>>>>>>>>>>>>> does
>>>>>>>>>>>>>>> not trigger the bug.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Here is a little test module you could try to insmod. If you
>>>>>>>>>>>>>>> do
>>>>>>>>>>>>>>> not
>>>>>>>>>>>>>>> want to bother finding out how to compile it, you can replace
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source
>>>>>>>>>>>>>>> below.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Another interesting test would be to disable
>>>>>>>>>>>>>>> CONFIG_X86_IO_APIC
>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>> your kernel configuration (in "Processor type and features",
>>>>>>>>>>>>>>> disable
>>>>>>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     return RTDM_IRQ_HANDLED;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     int err;
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     rtdm_printk("irq_test: after rtdm_irq_request (err =
>>>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>>>> err);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     err = rtdm_irq_enable(&handle);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     rtdm_printk("irq_test: after rtdm_irq_enable (err =
>>>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>>>> err);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     return err;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     rtdm_irq_free(&handle);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> module_init(__test_init);
>>>>>>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Best regards
>>>>>>>>>>>>>>>> Ettore Pedretti
>>>>>>>>>>>>>
>>>>>>>>>>>>> Alexis.
>>>>>>>>>>>
>>>>>>>>>>> Alexis.
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Xenomai-help mailing list
>>>>>>>>> Xenomai-help@domain.hid
>>>>>>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>>>>>>
>>>>> Alexis.
>>>>>
>>>>
>>>>
>>> Alexis.
>>>
>>
>>
>>
>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44-1334-461666, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-12-16 12:58                               ` Ettore Pedretti
@ 2009-12-18 21:32                                 ` Alexis Berlemont
  2010-01-05 18:15                                   ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2009-12-18 21:32 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

Sorry for the late reply.

Ettore Pedretti wrote:
> Hi,
> 
> You gave me two test modules. I sent you the trace of the second
> module plus the trace of the attach procedure.
> 
> I am now sending the trace of the very first module you sent:
> 
> insmod irqTest.ko
> 
> irq_test: before rtdm_irq_request
> irq_test: after rtdm_irq_request (err = 0)
> irq_test: before rtdm_irq_enable
> irq_test: after rtdm_irq_enable (err = 0)
> 
> Is this what you meant?
> 
Yes, thank you. The bug is definitely in the function ni_E_init(). 
Considering the number of cards supported by the ni_pcimio driver, the 
problem that you are facing is bound to occur in other configuration.

I will update the NI driver with configurable debug messages. I will 
come back as soon as possible. Sorry for the lack of reactivity, my free 
time is quite reduced during this pre-Christmas period.

> Please note that all the previous xenomai and kernel patches are in place.
> Cheers
> Ettore
> 
> 
> 2009/12/15 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> Ettore Pedretti wrote:
>>> Hi,
>>>
>>> I have added routeirq to the kernel parameters:
>>>
>>> kernel          /boot/vmlinuz-2.6.31.1 root=LABEL=ROOTFS_TEST ro noht
>>> mem=2048M memmap=1024M pci=routeirq
>>>
>>> When I insert your test module:
>>>
>>> fangorn:~/control/CHAMP/irqTest# insmod test_module.ko
>>>
>>> The trace is:
>>>
>>> rq_test: before request_irq
>>> irq_test: after request_irq (err = 0)
>> Great ! and did the "rtdm test module" behave well ?
>>
>> Could you also send the kernel traces (with the debug messages we added).
>>
>>> When I try the attach procedure:
>>>
>>> analogy_config analogy0 analogy_ni_pcimio
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730
>>> task.ti=f6c48000)
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:I-pipe domain Linux
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:Stack:
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:Call Trace:
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff
>>> 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42
>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> SS:ESP 0068:f6c49dc8
>>>
>>> Message from syslogd@domain.hid at Dec 15 07:39:25 ...
>>>  kernel:CR2: 0000000000000004
>>>
>>> And the trace:
>>>
>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>> mite 0000:04:01.0: setting latency timer to 64
>>> a4l: MITE: 0xd0801000 mapped to f8e32000
>>> a4l: DAQ: 0xd0800000 mapped to f8e36000
>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins =
>>> 2
>>> a4l: analogy_ni_pcimio: pcimio_attach: found irq 48
>>> BUG: unable to handle kernel NULL pointer dereference at 00000004
>>> IP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> *pde = 00000000
>>> Oops: 0000 [#1] PREEMPT SMP
>>> last sysfs file: /sys/class/net/lo/operstate
>>> Modules linked in: test_module xeno_native analogy_ni_pcimio
>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>> ide_core ata_piix e1000 sata_mv libata unix [last unloaded:
>>> scsi_wait_scan]
>>>
>>> Pid: 3556, comm: analogy_config Not tainted (2.6.31.1 #1) X6DA8
>>> EIP: 0060:[<f8c7f029>] EFLAGS: 00010202 CPU: 1
>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>> EAX: 00000000 EBX: f8a24280 ECX: f8c33e6c EDX: f8c33e60
>>> ESI: 00000000 EDI: f8c33e60 EBP: f6c49e38 ESP: f6c49dc8
>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>> Process analogy_config (pid: 3556, ti=f6c48000 task=f790c730
>>> task.ti=f6c48000)
>>> I-pipe domain Linux
>>> Stack:
>>>  f6c49dd0 c10143ee f6c49dd8 f8c33e60 f6c49de0 c105ad27 f6c49dfc f8a10a5d
>>> <0> f8c2de00 00000000 00000001 f8c33e94 fffffff0 f6c49e14 f8c2e118
>>> 00000001
>>> <0> f8c30d0d f8c33e88 f8c33e60 f6c49e38 f8c2eccf 00000001 f8c33e60
>>> 00000030
>>> Call Trace:
>>>  [<c10143ee>] ? unmask_IO_APIC_irq+0xd/0xf
>>>  [<c105ad27>] ? xnintr_enable+0xb/0xd
>>>  [<f8a10a5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>  [<f8c2de00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>  [<f8c2e118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>  [<f8c2eccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>  [<f8c8dd8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
>>>  [<f8c2cfef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>  [<f8c2d2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>  [<c106641a>] ? xnshadow_ppd_get+0x4f/0x58
>>>  [<f8c2d54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>  [<f8c2f36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>  [<f8a0f3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>  [<f8a11e77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>  [<f8a11dde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>  [<c1069ade>] ? losyscall_event+0xa9/0x190
>>>  [<c10567fe>] ? __ipipe_dispatch_event+0xdf/0x201
>>>  [<c1069a35>] ? losyscall_event+0x0/0x190
>>>  [<c10167d1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55
>>> 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b>
>>> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31
>>> EIP: [<f8c7f029>] ni_E_init+0x267/0xff1 [analogy_ni_mio] SS:ESP
>>> 0068:f6c49dc8
>>> CR2: 0000000000000004
>>> ---[ end trace bcff6beb2ba30576 ]---
>>>
>>> Ettore
>>>
>>>
>>> 2009/12/2 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>> Hi,
>>>>
>>>> Ettore Pedretti wrote:
>>>>> Hi,
>>>> Sorry for the late reply.
>>>>
>>>>> I applied your kernel patch before applying the xenomai patch. When I
>>>>> insert the kernel patch I obtain:
>>>>>
>>>>> insmod: error inserting 'test_module.ko': -1 Function not implemented
>>>> Yes. request_irq returns an error because the io_apic did not register
>>>> the interrupt.
>>>>
>>>>> Attached is the content of dmesg from boot to module insertion.
>>>> Thanks to your traces and a look at the x86-specific pci code in the
>>>> kernel (arch/x86/pci), I think I understand the way it works.
>>>>
>>>> The fact that request_irq return -ENOSYS is normal: the irq is not
>>>> "enabled". In order to enable the pci card's irq, we have to enable the
>>>> pci device (thanks to a call to pci_enable()). This operation will route
>>>> the PCI interrupt line to an io_apic irq; after that, the io_apic will
>>>> register the irq. Once this procedure is complete, the irq is made
>>>> available for Linux.
>>>>
>>>> That is the reason why, our little Linux test module failed and our
>>>> little RTDM test module crashed.
>>>>
>>>> If you had the kernel boot argument "pci=routeirq", both test modules
>>>> should insmod fine because all pci interrupt are "enabled" during the
>>>> PCI discovery.
>>>>
>>>> Concerning the analogy driver, that does not explain the problem because
>>>> the pci board enabling is _supposed_ to be ok. Could you also test the
>>>> attach procedure with kernel boot argument specified above ?
>>>>
>>>>> Cheers
>>>>> -ep
>>>>>
>>>>> ps. I am leaving the mountain tomorrow and will be travelling until
>>>>> Friday. I hope I will be able to test the machine at distance without
>>>>> crashing it for good.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2009/11/29 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>> Hi,
>>>>>>
>>>>>> Ettore Pedretti wrote:
>>>>>>> 2009/11/26 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>> On Thu, Nov 26, 2009 at 9:22 AM, Ettore Pedretti <epedrett@domain.hid>
>>>>>>>> wrote:
>>>>>>>>> Hi Alexis,
>>>>>>>>>
>>>>>>>>> I applied the patch to my local git repository:
>>>>>>>>>
>>>>>>>>> fangorn:/usr/src#
>>>>>>>>> cd xenomai-head/
>>>>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>>>>> patch_debug_1.diff
>>>>>>>>> fangorn:/usr/src/xenomai-head# git apply ../patch_debug_1.diff
>>>>>>>>> ../patch_debug_1.diff:14: trailing whitespace.
>>>>>>>>>    rtdm_printk("\t handler=%p, irq=%d, cookie=%p\n",
>>>>>>>>> warning: 1 line adds whitespace errors.
>>>>>>>>>
>>>>>>>>> Then created a debian package:
>>>>>>>>>
>>>>>>>>> git-buildpackage -us -uc -rfakeroot --git-debian-branch=master
>>>>>>>>> --git-upstream-branch=origin/master --git-ignore-new
>>>>>>>>>
>>>>>>>>> built a new kernel package:
>>>>>>>>>
>>>>>>>>> fakeroot make-kpkg --initrd --added-patches xenomai
>>>>>>>>> --revision=ipipeComedi.2.4.06 --config menuconfig binary-arch
>>>>>>>>>
>>>>>>>>> and installed the Debian package with dpkg -i
>>>>>>>>>
>>>>>>>>> This is what happens when i insert the module into the kernel:
>>>>>>>>>
>>>>>>>>> fangorn:~/control/CHAMP/irqTest# insmod irqTest.ko
>>>>>>>>> Killed
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>> fangorn:~/control/CHAMP/irqTest#
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:last sysfs file: /sys/class/net/lo/operstate
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>>>>>> task.ti=f6c02000)
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:Stack:
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:Code:  Bad EIP value.
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>>>>
>>>>>>>>> Message from syslogd@domain.hid at Nov 26 00:09:52 ...
>>>>>>>>>  kernel:CR2: 0000000000000000
>>>>>>>>>
>>>>>>>>> dmesg after insmod:
>>>>>>>>>
>>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at (null)
>>>>>>>>> IP: [<(null)>] (null)
>>>>>>>>> *pde = 00000000
>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>> last sysfs file: /sys/class/net/lo/operstate
>>>>>>>>> Modules linked in: irqTest(+) xeno_native analogy_ni_pcimio
>>>>>>>>> analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite
>>>>>>>>> xeno_analogy xeno_rtdm astropci ext3 jbd mbcache ide_pci_generic
>>>>>>>>> ide_core ata_piix sata_mv e1000 libata unix [last unloaded:
>>>>>>>>> scsi_wait_scan]
>>>>>>>>>
>>>>>>>>> Pid: 3566, comm: insmod Not tainted (2.6.31.1 #1) X6DA8
>>>>>>>>> EIP: 0060:[<00000000>] EFLAGS: 00010246 CPU: 1
>>>>>>>>> EIP is at 0x0
>>>>>>>>> EAX: 00000030 EBX: 00000000 ECX: 00000030 EDX: c1250b80
>>>>>>>>> ESI: f8e24500 EDI: 00000000 EBP: f6c03f1c ESP: f6c03f18
>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>> Process insmod (pid: 3566, ti=f6c02000 task=f78634b0
>>>>>>>>> task.ti=f6c02000)
>>>>>>>>> I-pipe domain Linux
>>>>>>>>> Stack:
>>>>>>>>>  c1154166 f6c03f24 c105abf7 f6c03f40 f8a0ea5d f8e24000 00000000
>>>>>>>>> 00000000
>>>>>>>>> <0> f8e27000 00000000 f6c03f58 f8e2703e 00000000 f8e24066 00000000
>>>>>>>>> f8e27000
>>>>>>>>> <0> f6c03f84 c1001028 f8e243c0 00000001 fffffffc f8e243c0 00000000
>>>>>>>>> f6c03f84
>>>>>>>>> Call Trace:
>>>>>>>>>  [<c1154166>] ? rthal_irq_enable+0x2d/0x31
>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>  [<f8e24000>] ? test_handler+0x0/0x1c [irqTest]
>>>>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>>>>  [<f8e2703e>] ? __test_init+0x3e/0x7e [irqTest]
>>>>>>>>>  [<f8e27000>] ? __test_init+0x0/0x7e [irqTest]
>>>>>>>>>  [<c1001028>] ? do_one_initcall+0x23/0x183
>>>>>>>>>  [<c103a825>] ? blocking_notifier_call_chain+0x1a/0x1c
>>>>>>>>>  [<c10481e9>] ? sys_init_module+0xad/0x1ec
>>>>>>>>>  [<c1092cc5>] ? sys_close+0x71/0xb5
>>>>>>>>>  [<c1002c25>] ? sysenter_do_call+0x12/0x16
>>>>>>>>> Code:  Bad EIP value.
>>>>>>>>> EIP: [<00000000>] 0x0 SS:ESP 0068:f6c03f18
>>>>>>>>> CR2: 0000000000000000
>>>>>>>>> ---[ end trace ac2616367ecf94b2 ]---
>>>>>>>>>
>>>>>>>>> I hope this is what you wanted me to try. Please let me know.
>>>>>>>> So if I understand well, you "insmoded" the little test module which
>>>>>>>> does nothing but calling rtdm_irq_request() and the NULL pointer bug
>>>>>>>> occured.
>>>>>>> Correct
>>>>>>>
>>>>>>>> This bug occurred before calling analogy_config, you did not tried to
>>>>>>>> attach the ni_pcimio driver, right ?
>>>>>>> I insmod-ed the test module that gave that error dump. I later tried
>>>>>>> to attach the driver which causes the usual error. The stack-dumps I
>>>>>>> sent are solely related to insmod of test program.
>>>>>>>
>>>>>>>> If I am right, it seems like the bug is not located in analogy but
>>>>>>>> between Xenomai's nucleus and Ipipe, which is ... weird.
>>>>>>>>
>>>>>>>> What is your kernel configuration ? no IO_APIC ?
>>>>>>> I put back my config to IO_APIC. Should I disable that again?
>>>>>>> attached is my kernel configuration (configAnalogy)
>>>>>>>
>>>>>>>
>>>>>>>> Which irq did you try to request ? 48 or 5 ?
>>>>>>> I do not know. do I have to pass parameters to insmod?
>>>>>>>
>>>>>>> This is my /proc/interrupts if that is helpful
>>>>>>>         CPU0       CPU1
>>>>>>>  0:        222          0   IO-APIC-edge      timer
>>>>>>>  1:          0          9   IO-APIC-edge      i8042
>>>>>>>  2:          0          0    XT-PIC-XT        cascade
>>>>>>>  12:          0        132   IO-APIC-edge      i8042
>>>>>>>  14:          0          8   IO-APIC-edge      ata_piix
>>>>>>>  15:          0      12358   IO-APIC-edge      ata_piix
>>>>>>>  20:          0          0   IO-APIC-fasteoi   astropci0
>>>>>>>  28:          0        235   IO-APIC-fasteoi   sata_mv
>>>>>>>  54:          0      77950   IO-APIC-fasteoi   eth0
>>>>>>> NMI:          0          0   Non-maskable interrupts
>>>>>>> LOC:   45365307   45365133   Local timer interrupts
>>>>>>> SPU:          0          0   Spurious interrupts
>>>>>>> CNT:          0          0   Performance counter interrupts
>>>>>>> PND:          0          0   Performance pending work
>>>>>>> RES:       2555       2212   Rescheduling interrupts
>>>>>>> CAL:         60         58   Function call interrupts
>>>>>>> TLB:        419        200   TLB shootdowns
>>>>>>> TRM:          0          0   Thermal event interrupts
>>>>>>> THR:          0          0   Threshold APIC interrupts
>>>>>>> MCE:          0          0   Machine check exceptions
>>>>>>> MCP:        152        152   Machine check polls
>>>>>>> ERR:          0
>>>>>>> MIS:          0
>>>>>>>
>>>>>>> and my /proc/xenomai/irq
>>>>>>>
>>>>>>> IRQ         CPU0        CPU1
>>>>>>> 516:           0           0         [IPI]
>>>>>>> 519:    46161773    46161772         [timer]
>>>>>>> 520:           0           0         [critical sync]
>>>>>>> 546:           0           0         [virtual]
>>>>>>>
>>>>>>>
>>>>>>>> Which CPU are you using ?
>>>>>>> CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>>>> CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
>>>>>>>
>>>>>>> As Philippe rightly pointed out this is a 32-bit install although the
>>>>>>> CPUs are 64 bit
>>>>>> Following Philippe's advice, I attached a little patch for your kernel
>>>>>> sources. Could you apply it and send the kernel log messages ?
>>>>>>
>>>>>> You will also find attached the sources of a little module which calls
>>>>>> Linux' request_irq(48). Could you insmod the module and send a dump of
>>>>>> /proc/interrupts ?
>>>>>>
>>>>>>>> Thank you for your time.
>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Ettore
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2009/11/24 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>> On Tuesday 24 November 2009 22:34:33 Ettore Pedretti wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> Would it help at this stage if I re-enable IO APIC, run your
>>>>>>>>>>> program
>>>>>>>>>>> and send you the call-stack dump? I am willing to test your patch
>>>>>>>>>>> on
>>>>>>>>>>> our hardware as soon as you got one ready, if that can be of help.
>>>>>>>>>> Sorry, I did not answer your question. The bug occurs in both
>>>>>>>>>> configurations;
>>>>>>>>>> so, do not bother changing your configuration for the moment.
>>>>>>>>>>
>>>>>>>>>>> Cheers
>>>>>>>>>>> Ettore
>>>>>>>>>>>
>>>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> On Monday 23 November 2009 18:26:15 Ettore Pedretti wrote:
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> It is finally working. here is the dmesg after I insert a
>>>>>>>>>>>>> module:
>>>>>>>>>>>>>
>>>>>>>>>>>>> irq_test: before rtdm_irq_request
>>>>>>>>>>>>> irq_test: after rtdm_irq_request (err = -22)
>>>>>>>>>>>>> irq_test: before rtdm_irq_enable
>>>>>>>>>>>>> irq_test: after rtdm_irq_enable (err = -22)
>>>>>>>>>>>> rtdm_irq_request() returns -EINVAL because the IO APIC is
>>>>>>>>>>>> disabled.
>>>>>>>>>>>> So,
>>>>>>>>>>>> the irq 48 turns into the irq 5;
>>>>>>>>>>>>
>>>>>>>>>>>>> Attached are a complete call-stack dump and my present kernel
>>>>>>>>>>>>>  configuration.
>>>>>>>>>>>> With the fact that there is still a NULL pointer bug without IO
>>>>>>>>>>>> APIC,
>>>>>>>>>>>> the
>>>>>>>>>>>> bug is bound to be located in analogy. There may be some wrong
>>>>>>>>>>>> write
>>>>>>>>>>>> access on the interrupt structure.
>>>>>>>>>>>>
>>>>>>>>>>>> I will come back with a patch which dumps the structure's content
>>>>>>>>>>>> at
>>>>>>>>>>>> various locations in the attach code.
>>>>>>>>>>>>
>>>>>>>>>>>>> Cheers
>>>>>>>>>>>>> Ettore
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2009/11/23 Alexis Berlemont <berlemont.hauw@domain.hid>:
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Nov 23, 2009 at 9:28 AM, Ettore Pedretti
>>>>>>>>>>>>>> <ep41@domain.hid>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I have compiled the module using this makefile:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> prefix := $(shell /usr/bin/xeno-config --prefix)
>>>>>>>>>>>>>>> obj-m   := irqTest.o
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ifeq ($(prefix),)
>>>>>>>>>>>>>>> $(error Please add <xeno-install>/bin to your PATH variable)
>>>>>>>>>>>>>>> endif
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> KDIR    := /lib/modules/$(shell uname -r)/build
>>>>>>>>>>>>>>> PWD     := $(shell pwd)
>>>>>>>>>>>>>>> EXTRA_CFLAGS := -I/usr/include/xenomai -I/usr/include/
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> all: default
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> default:
>>>>>>>>>>>>>>>     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> install:
>>>>>>>>>>>>>>>     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> clean:
>>>>>>>>>>>>>>>     rm -fr *.mod.c *.o *.ko irqTest *~ .irqTest* .tmp_versions
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> The module seems to compiles fine:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> make -C /lib/modules/2.6.31.1/build
>>>>>>>>>>>>>>> SUBDIRS=/home/ep41/control/CHAMP/irqTest modules
>>>>>>>>>>>>>>> make[1]: Entering directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>>>>  CC [M]  /home/ep41/control/CHAMP/irqTest/irqTest.o
>>>>>>>>>>>>>>>  Building modules, stage 2.
>>>>>>>>>>>>>>>  MODPOST 1 modules
>>>>>>>>>>>>>>>  CC      /home/ep41/control/CHAMP/irqTest/irqTest.mod.o
>>>>>>>>>>>>>>>  LD [M]  /home/ep41/control/CHAMP/irqTest/irqTest.ko
>>>>>>>>>>>>>>> make[1]: Leaving directory `/usr/src/linux-2.6.31.1'
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> To make sure module dependencies are in place I modprobe
>>>>>>>>>>>>>>> irqbench
>>>>>>>>>>>>>>> (probably not necessary).
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> modprobe xeno_irqbench
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> All the loaded modules:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> fangorn:~# lsmod
>>>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>>>> xeno_irqbench           5152  0
>>>>>>>>>>>>>>> xeno_native            83296  0
>>>>>>>>>>>>>>> analogy_ni_pcimio      15676  0
>>>>>>>>>>>>>>> analogy_ni_mio         41596  1 analogy_ni_pcimio
>>>>>>>>>>>>>>> analogy_ni_tio         21724  1 analogy_ni_mio
>>>>>>>>>>>>>>> analogy_8255            4060  1 analogy_ni_mio
>>>>>>>>>>>>>>> analogy_ni_mite         9980  3
>>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio xeno_analogy
>>>>>>>>>>>>>>> 38876  5
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analogy_
>>>>>>>>>>>>>>> ni_ mite xeno_rtdm              24244  3
>>>>>>>>>>>>>>> xeno_irqbench,analogy_ni_mio,xeno_analogy astropci
>>>>>>>>>>>>>>> 10968 0
>>>>>>>>>>>>>>> ext3                  112900  1
>>>>>>>>>>>>>>> jbd                    44016  1 ext3
>>>>>>>>>>>>>>> mbcache                 6652  1 ext3
>>>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>>>> ide_core               79388  1 ide_pci_generic
>>>>>>>>>>>>>>> e1000                 118204  0
>>>>>>>>>>>>>>> ata_piix               15968  2
>>>>>>>>>>>>>>> sata_mv                27632  0
>>>>>>>>>>>>>>> libata                151468  2 ata_piix,sata_mv
>>>>>>>>>>>>>>> unix                   24460  10
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> When I insert the module it complains about missing symbols:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> insmod irqTest.ko
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> insmod: error inserting 'irqTest.ko': -1 Unknown symbol in
>>>>>>>>>>>>>>> module
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> irqTest: module license 'unspecified' taints kernel.
>>>>>>>>>>>>>>> Disabling lock debugging due to kernel taint
>>>>>>>>>>>>>>> irqTest: Unknown symbol xnintr_enable
>>>>>>>>>>>>>>> irqTest: Unknown symbol xnintr_detach
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> What am I doing wrong?
>>>>>>>>>>>>>> It's me who did wrong. I just tested the compilation inside the
>>>>>>>>>>>>>> kernel.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> xnintr_* symbols are only exported for GPL compliant modules.
>>>>>>>>>>>>>> So,
>>>>>>>>>>>>>> could you add the following line in the test module:
>>>>>>>>>>>>>> MODULE_LICENSE("GPL");
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> With that, the insmod operation should work.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> BTW, I disabled  CONFIG_X86_IO_APIC and  the SMP option: same
>>>>>>>>>>>>>>> problem.
>>>>>>>>>>>>>> Could you send the call-stack dump ? Maybe, that will unveil a
>>>>>>>>>>>>>> clue.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Cheers
>>>>>>>>>>>>>>> Ettore
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> 2009/11/22 Alexis Berlemont <alexis.berlemont@domain.hid>:
>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Sunday 22 November 2009 20:35:51 Ettore Pedretti wrote:
>>>>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I downloaded Xenomai 2.5-rc4 from the xenomai-head.git. I
>>>>>>>>>>>>>>>>> need
>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>> use the comedi drivers for Xenomai for a NI PCI-6711
>>>>>>>>>>>>>>>>> function
>>>>>>>>>>>>>>>>> generator board.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> When I try to use the test program cmd_write (or cmd-read) I
>>>>>>>>>>>>>>>>> obtain
>>>>>>>>>>>>>>>>> the following:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> fangorn:~# cmd_write -vcmd_write: device analogy0 opened
>>>>>>>>>>>>>>>>> (fd=0)
>>>>>>>>>>>>>>>>> cmd_write: basic descriptor retrieved
>>>>>>>>>>>>>>>>>     subdevices count = 0
>>>>>>>>>>>>>>>>>     read subdevice index = 0
>>>>>>>>>>>>>>>>>     write subdevice index = 0
>>>>>>>>>>>>>>>>> cmd_write: a4l_get_desc failed (ret=-22)
>>>>>>>>>>>>>>>>> *** glibc detected *** cmd_write: free(): invalid next size
>>>>>>>>>>>>>>>>> (fast):
>>>>>>>>>>>>>>>>> 0x0804d008 ***
>>>>>>>>>>>>>>>>> ======= Backtrace: =========
>>>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6[0xb7e52624]
>>>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7e54826]
>>>>>>>>>>>>>>>>> cmd_write[0x804927c]
>>>>>>>>>>>>>>>>> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7dfa455]
>>>>>>>>>>>>>>>>> cmd_write[0x8048b01]
>>>>>>>>>>>>>>>>> ======= Memory map: ========
>>>>>>>>>>>>>>>>> 08048000-0804a000 r-xp 00000000 08:01 10855303
>>>>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>>>>> 0804a000-0804b000 rw-p 00002000 08:01 10855303
>>>>>>>>>>>>>>>>> /usr/bin/cmd_write
>>>>>>>>>>>>>>>>> 0804b000-0806e000 rw-p 00000000 00:00 0          [heap]
>>>>>>>>>>>>>>>>> b7c00000-b7c21000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7c21000-b7d00000 ---p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7dce000-b7dda000 r-xp 00000000 08:01 6127619
>>>>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>>>>> b7dda000-b7ddb000 rw-p 0000b000 08:01 6127619
>>>>>>>>>>>>>>>>>  /lib/libgcc_s.so.1
>>>>>>>>>>>>>>>>> b7de0000-b7de3000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>>>>> b7de3000-b7de4000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7de4000-b7f39000 r-xp 00000000 08:01 6144250
>>>>>>>>>>>>>>>>>  /lib/i686/cmov/libc-2.7.so b7f39000-b7f3a000 r--p 00155000
>>>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>>>> 6144250    /lib/i686/cmov/libc-2.7.so b7f3a000-b7f3c000 rw-p
>>>>>>>>>>>>>>>>> 00156000 08:01 6144250    /lib/i686/cmov/libc-2.7.so
>>>>>>>>>>>>>>>>> b7f3c000-b7f3f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7f3f000-b7f54000 r-xp 00000000 08:01 6144264
>>>>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>>>>> b7f54000-b7f56000 rw-p 00014000 08:01 6144264
>>>>>>>>>>>>>>>>> /lib/i686/cmov/libpthread-2.7.so
>>>>>>>>>>>>>>>>> b7f56000-b7f58000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7f58000-b7f5a000 r-xp 00000000 08:01 10808118
>>>>>>>>>>>>>>>>> /usr/lib/librtdm.so.1.0.0 b7f5a000-b7f5b000 rw-p 00001000
>>>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>>>> 10808118   /usr/lib/librtdm.so.1.0.0 b7f5b000-b7f5c000 rw-p
>>>>>>>>>>>>>>>>> 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7f5c000-b7f63000 r-xp 00000000 08:01 10808119
>>>>>>>>>>>>>>>>>  /usr/lib/libnative.so.3.0.0 b7f63000-b7f64000 rw-p 00006000
>>>>>>>>>>>>>>>>> 08:01
>>>>>>>>>>>>>>>>> 10808119 /usr/lib/libnative.so.3.0.0 b7f64000-b7f67000 r-xp
>>>>>>>>>>>>>>>>> 00000000 08:01 10808112   /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>>>>> b7f67000-b7f68000 rw-p 00002000 08:01 10808112
>>>>>>>>>>>>>>>>> /usr/lib/libanalogy.so.1.0.0
>>>>>>>>>>>>>>>>> b7f69000-b7f6a000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7f6a000-b7f6d000 rw-s 00000000 00:0b 426        /dev/rtheap
>>>>>>>>>>>>>>>>> b7f6d000-b7f6f000 rw-p 00000000 00:00 0
>>>>>>>>>>>>>>>>> b7f6f000-b7f89000 r-xp 00000000 08:01 6127618
>>>>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>>>>> b7f89000-b7f8b000 rw-p 0001a000 08:01 6127618
>>>>>>>>>>>>>>>>>  /lib/ld-2.7.so
>>>>>>>>>>>>>>>>> bfab1000-bfac6000 rw-p 00000000 00:00 0          [stack]
>>>>>>>>>>>>>>>>> ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
>>>>>>>>>>>>>>>>> Aborted
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> This is probably because the device /dev/analogy0 does not
>>>>>>>>>>>>>>>>> exist.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> This is the output of uname -a
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Linux fangorn 2.6.31.1 #1 SMP PREEMPT Fri Nov 20 20:42:26
>>>>>>>>>>>>>>>>> PST
>>>>>>>>>>>>>>>>> 2009
>>>>>>>>>>>>>>>>> i686 GNU/Linux
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> And these are the relevant entries in dmesg
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> dmesg:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I-pipe 2.4-06: pipeline enabled.
>>>>>>>>>>>>>>>>> I-pipe: Domain Xenomai registered.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Xenomai: hal/i386 started.
>>>>>>>>>>>>>>>>> Xenomai: scheduling class idle registered.
>>>>>>>>>>>>>>>>> Xenomai: scheduling class rt registered.
>>>>>>>>>>>>>>>>> Xenomai: real-time nucleus v2.5-rc4 (Flying In A Blue Dream)
>>>>>>>>>>>>>>>>> loaded. Xenomai: SMI-enabled chipset found
>>>>>>>>>>>>>>>>> Xenomai: SMI workaround enabled
>>>>>>>>>>>>>>>>> Xenomai: starting RTDM services.
>>>>>>>>>>>>>>>>> Xenomai: starting native API services.
>>>>>>>>>>>>>>>>> Analogy: MITE: Available NI device IDs: 0x1880
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> result of lspci for the relevant board:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> 04:01.0 Class ff00: National Instruments PCI-6711
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> And lsmod:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Module                  Size  Used by
>>>>>>>>>>>>>>>>> xeno_native           105088  0
>>>>>>>>>>>>>>>>> analogy_ni_pcimio      15644  0
>>>>>>>>>>>>>>>>> analogy_ni_mio         44860  1 analogy_ni_pcimio
>>>>>>>>>>>>>>>>> analogy_ni_tio         24956  1 analogy_ni_mio
>>>>>>>>>>>>>>>>> analogy_8255            3900  1 analogy_ni_mio
>>>>>>>>>>>>>>>>> analogy_ni_mite        10140  3
>>>>>>>>>>>>>>>>>  analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio
>>>>>>>>>>>>>>>>> xeno_analogy
>>>>>>>>>>>>>>>>>  40220  5
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> analogy_ni_pcimio,analogy_ni_mio,analogy_ni_tio,analogy_8255,analog
>>>>>>>>>>>>>>>>> y_n i_mit e xeno_rtdm              28436  2
>>>>>>>>>>>>>>>>> analogy_ni_mio,xeno_analogy astropci               10944  0
>>>>>>>>>>>>>>>>> ext3                  109636  1
>>>>>>>>>>>>>>>>> jbd                    43920  1 ext3
>>>>>>>>>>>>>>>>> mbcache                 6272  1 ext3
>>>>>>>>>>>>>>>>> ide_pci_generic         3712  0
>>>>>>>>>>>>>>>>> ide_core               74204  1 ide_pci_generic
>>>>>>>>>>>>>>>>> ata_piix               15748  2
>>>>>>>>>>>>>>>>> sata_mv                26448  0
>>>>>>>>>>>>>>>>> e1000                 114208  0
>>>>>>>>>>>>>>>>> libata                142156  2 ata_piix,sata_mv
>>>>>>>>>>>>>>>>> unix                   22992  10
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> According to this post:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai@xenomai.org
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> The analogy driver "a4l_pcimio" will be registered with
>>>>>>>>>>>>>>>>>> your
>>>>>>>>>>>>>>>>>> last
>>>>>>>>>>>>>>>>>> insmod (analogy_ni_pcimio). You can check that by typing
>>>>>>>>>>>>>>>>>> "cat
>>>>>>>>>>>>>>>>>> /proc/analogy/drivers", you will see only one entry:
>>>>>>>>>>>>>>>>>> a4l_pcimio.
>>>>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/drivers
>>>>>>>>>>>>>>>>> --  Analogy drivers --
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> | idx | driver name
>>>>>>>>>>>>>>>>> |  00 | analogy_ni_pcimio
>>>>>>>>>>>>>>>>> |  01 | analogy_8255
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> There are two entries and the drivers are not attached:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> fangorn:~# cat /proc/analogy/devices
>>>>>>>>>>>>>>>>> --  Analogy devices --
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> | idx | status | driver
>>>>>>>>>>>>>>>>> |  00 | Unused | No driver
>>>>>>>>>>>>>>>>> |  01 | Unused | No driver
>>>>>>>>>>>>>>>>> |  02 | Unused | No driver
>>>>>>>>>>>>>>>>> |  03 | Unused | No driver
>>>>>>>>>>>>>>>>> |  04 | Unused | No driver
>>>>>>>>>>>>>>>>> |  05 | Unused | No driver
>>>>>>>>>>>>>>>>> |  06 | Unused | No driver
>>>>>>>>>>>>>>>>> |  07 | Unused | No driver
>>>>>>>>>>>>>>>>> |  08 | Unused | No driver
>>>>>>>>>>>>>>>>> |  09 | Unused | No driver
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I'm aware of the name change of the drivers:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://www.mail-archive.com/xenomai-git@xenomai.org
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> - a4l_pcimio becomes analogy_ni_pcimio
>>>>>>>>>>>>>>>>>> - 8255 becomes analogy_8255.
>>>>>>>>>>>>>>>>>> Consequently, the command line to attach these drivers has
>>>>>>>>>>>>>>>>>> changed. Starting from now, we have to type:
>>>>>>>>>>>>>>>>>> - analogy_config analogyX analogy_ni_pcimio (instead of
>>>>>>>>>>>>>>>>>> a4l_pcimio)
>>>>>>>>>>>>>>>>> This is what happens when I try to attach the driver to de
>>>>>>>>>>>>>>>>> device:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> fangorn:~# analogy_config analogy0 analogy_ni_pcimio
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:last sysfs file:
>>>>>>>>>>>>>>>>>  /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:Process analogy_config (pid: 3409, ti=f64cc000
>>>>>>>>>>>>>>>>> task=f79013b0 task.ti=f64cc000)
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:I-pipe domain Linux
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:Stack:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:Call Trace:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85
>>>>>>>>>>>>>>>>> d4
>>>>>>>>>>>>>>>>> fe
>>>>>>>>>>>>>>>>> ff
>>>>>>>>>>>>>>>>> ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01
>>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>>> 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84
>>>>>>>>>>>>>>>>> 0b
>>>>>>>>>>>>>>>>> 01
>>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>>> 00 31
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:EIP: [<f8c7d029>] ni_E_init+0x267/0xff1
>>>>>>>>>>>>>>>>> [analogy_ni_mio]
>>>>>>>>>>>>>>>>> SS:ESP 0068:f64cddc8
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Message from syslogd@domain.hid at Nov 21 23:22:37 ...
>>>>>>>>>>>>>>>>>  kernel:CR2: 0000000000000004
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> relevant dmeg:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> a4l: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
>>>>>>>>>>>>>>>>> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
>>>>>>>>>>>>>>>>> mite 0000:04:01.0: setting latency timer to 64
>>>>>>>>>>>>>>>>> a4l: MITE: 0xd0801000 mapped to f8e26000
>>>>>>>>>>>>>>>>> a4l: DAQ: 0xd0800000 mapped to f8e2a000
>>>>>>>>>>>>>>>>> a4l: MITE: version = 1, type = 1, mite mode = 1, interface
>>>>>>>>>>>>>>>>> mode
>>>>>>>>>>>>>>>>> = 3
>>>>>>>>>>>>>>>>> a4l: MITE: num channels = 3, write post fifo depth = 1, wins
>>>>>>>>>>>>>>>>> =
>>>>>>>>>>>>>>>>> 0,
>>>>>>>>>>>>>>>>> iowins = 2 a4l: analogy_ni_pcimio: pcimio_attach: found irq
>>>>>>>>>>>>>>>>> 48
>>>>>>>>>>>>>>>>> BUG: unable to handle kernel NULL pointer dereference at
>>>>>>>>>>>>>>>>> 00000004
>>>>>>>>>>>>>>>>> IP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>>>> *pde = 00000000
>>>>>>>>>>>>>>>>> Oops: 0000 [#1] PREEMPT SMP
>>>>>>>>>>>>>>>>> last sysfs file:
>>>>>>>>>>>>>>>>> /sys/devices/pci0000:00/0000:00:1e.0/0000:06:02.0/class
>>>>>>>>>>>>>>>>> Modules
>>>>>>>>>>>>>>>>> linked in: xeno_native analogy_ni_pcimio analogy_ni_mio
>>>>>>>>>>>>>>>>> analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy
>>>>>>>>>>>>>>>>> xeno_rtdm
>>>>>>>>>>>>>>>>> astropci ext3 jbd mbcache ide_pci_generic ide_core ata_piix
>>>>>>>>>>>>>>>>> sata_mv
>>>>>>>>>>>>>>>>> e1000 libata unix [last unloaded: scsi_wait_scan]
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Pid: 3409, comm: analogy_config Not tainted (2.6.31.1 #1)
>>>>>>>>>>>>>>>>> X6DA8
>>>>>>>>>>>>>>>>> EIP: 0060:[<f8c7d029>] EFLAGS: 00010202 CPU: 1
>>>>>>>>>>>>>>>>> EIP is at ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>>>> EAX: 00000000 EBX: f8a22280 ECX: f8c31e6c EDX: f8c31e60
>>>>>>>>>>>>>>>>> ESI: 00000000 EDI: f8c31e60 EBP: f64cde38 ESP: f64cddc8
>>>>>>>>>>>>>>>>>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
>>>>>>>>>>>>>>>>> Process analogy_config (pid: 3409, ti=f64cc000 task=f79013b0
>>>>>>>>>>>>>>>>>  task.ti=f64cc000) I-pipe domain Linux
>>>>>>>>>>>>>>>>> Stack:
>>>>>>>>>>>>>>>>>  f64cddd0 c10142b6 f64cddd8 f8c31e60 f64cdde0 c105abf7
>>>>>>>>>>>>>>>>> f64cddfc
>>>>>>>>>>>>>>>>> f8a0ea5d <0> f8c2be00 00000000 00000001 f8c31e94 fffffff0
>>>>>>>>>>>>>>>>> f64cde14
>>>>>>>>>>>>>>>>> f8c2c118 00000001 <0> f8c2ed0d f8c31e88 f8c31e60 f64cde38
>>>>>>>>>>>>>>>>> f8c2cccf
>>>>>>>>>>>>>>>>> 00000001 f8c31e60 00000030 Call Trace:
>>>>>>>>>>>>>>>>>  [<c10142b6>] ? unmask_IO_APIC_irq+0xd/0xf
>>>>>>>>>>>>>>>>>  [<c105abf7>] ? xnintr_enable+0xb/0xd
>>>>>>>>>>>>>>>>>  [<f8a0ea5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
>>>>>>>>>>>>>>>>>  [<f8c2be00>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<f8c2c118>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<f8c2cccf>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<f8c8bd8a>] ? pcimio_attach+0x54d/0x664
>>>>>>>>>>>>>>>>> [analogy_ni_pcimio]
>>>>>>>>>>>>>>>>>  [<f8c2afef>] ? a4l_assign_driver+0x61/0x134 [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<f8c2b2ba>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<c10662ea>] ? xnshadow_ppd_get+0x4f/0x58
>>>>>>>>>>>>>>>>>  [<f8c2b54f>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<f8c2d36f>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
>>>>>>>>>>>>>>>>>  [<f8a0d3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
>>>>>>>>>>>>>>>>>  [<f8a0fe77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
>>>>>>>>>>>>>>>>>  [<f8a0fdde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
>>>>>>>>>>>>>>>>>  [<c10699ae>] ? losyscall_event+0xa9/0x190
>>>>>>>>>>>>>>>>>  [<c10566ce>] ? __ipipe_dispatch_event+0xdf/0x201
>>>>>>>>>>>>>>>>>  [<c1069905>] ? losyscall_event+0x0/0x190
>>>>>>>>>>>>>>>>>  [<c10166a1>] ? __ipipe_syscall_root+0x3b/0xc4
>>>>>>>>>>>>>>>>>  [<c1002cfd>] ? system_call+0x2d/0x4f
>>>>>>>>>>>>>>>>> Code: 8b 45 9c e8 f2 f1 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff
>>>>>>>>>>>>>>>>> ff
>>>>>>>>>>>>>>>>> 8b
>>>>>>>>>>>>>>>>> 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00
>>>>>>>>>>>>>>>>> 8b
>>>>>>>>>>>>>>>>> 42
>>>>>>>>>>>>>>>>> 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01
>>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>>> 00
>>>>>>>>>>>>>>>>> 31
>>>>>>>>>>>>>>>>> EIP: [<f8c7d029>] ni_E_init+0x267/0xff1 [analogy_ni_mio]
>>>>>>>>>>>>>>>>> SS:ESP
>>>>>>>>>>>>>>>>> 0068:f64cddc8 CR2: 0000000000000004
>>>>>>>>>>>>>>>>> ---[ end trace c887d49bb5e86cf4 ]---
>>>>>>>>>>>>>>>> Thanks for such a great report.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I keep two things in mind:
>>>>>>>>>>>>>>>> - cmd_write's error handling path is not buggy (that was
>>>>>>>>>>>>>>>> already
>>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>>> my todo list). I will fix that as soon as possible.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - according to the call-stack dump you made, the irq handler
>>>>>>>>>>>>>>>> registering seems to be the source of the trouble. What
>>>>>>>>>>>>>>>> strikes
>>>>>>>>>>>>>>>> me
>>>>>>>>>>>>>>>> is that the oops occurred very low (unmask_IO_APIC_irq: we
>>>>>>>>>>>>>>>> are
>>>>>>>>>>>>>>>> no
>>>>>>>>>>>>>>>> more in the analogy layer).
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> In order to be sure that the problem is located in analogy,
>>>>>>>>>>>>>>>> it
>>>>>>>>>>>>>>>> would
>>>>>>>>>>>>>>>> be great to test that calling rtdm_request_irq(... , 48, ...)
>>>>>>>>>>>>>>>> does
>>>>>>>>>>>>>>>> not trigger the bug.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Here is a little test module you could try to insmod. If you
>>>>>>>>>>>>>>>> do
>>>>>>>>>>>>>>>> not
>>>>>>>>>>>>>>>> want to bother finding out how to compile it, you can replace
>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>> code of an existing rtdm driver (for example:
>>>>>>>>>>>>>>>> xenomai/ksrc/drivers/testing/irqbench.c) with the source
>>>>>>>>>>>>>>>> below.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Another interesting test would be to disable
>>>>>>>>>>>>>>>> CONFIG_X86_IO_APIC
>>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>>> your kernel configuration (in "Processor type and features",
>>>>>>>>>>>>>>>> disable
>>>>>>>>>>>>>>>> the SMP option and disable "IO APIC" under "Local APIC").
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> #include <linux/version.h>
>>>>>>>>>>>>>>>> #include <linux/module.h>
>>>>>>>>>>>>>>>> #include <linux/ioport.h>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> #include <rtdm/rtdm_driver.h>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> int test_handler(rtdm_irq_t *irq_handle)
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     rtdm_printk("irq_test: INTERRUPT!\n");
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     return RTDM_IRQ_HANDLED;
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> static rtdm_irq_t handle;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> static int __init __test_init(void)
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     int err;
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     rtdm_printk("irq_test: before rtdm_irq_request\n");
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     err = rtdm_irq_request(&handle, 48, test_handler, 0,
>>>>>>>>>>>>>>>> "test_irq", NULL);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     rtdm_printk("irq_test: after rtdm_irq_request (err =
>>>>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>>>>> err);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     rtdm_printk("irq_test: before rtdm_irq_enable\n");
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     err = rtdm_irq_enable(&handle);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     rtdm_printk("irq_test: after rtdm_irq_enable (err =
>>>>>>>>>>>>>>>> %d)\n",
>>>>>>>>>>>>>>>> err);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     return err;
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> static void __exit __test_exit(void)
>>>>>>>>>>>>>>>> {
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     rtdm_irq_free(&handle);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> module_init(__test_init);
>>>>>>>>>>>>>>>> module_exit(__test_exit);
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Can anyone help?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Best regards
>>>>>>>>>>>>>>>>> Ettore Pedretti
>>>>>>>>>>>>>> Alexis.
>>>>>>>>>>>> Alexis.
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Xenomai-help mailing list
>>>>>>>>>> Xenomai-help@domain.hid
>>>>>>>>>> https://mail.gna.org/listinfo/xenomai-help
>>>>>>>>>>
>>>>>> Alexis.
>>>>>>
>>>>>
>>>> Alexis.
>>>>
>>>
>>>
>> Alexis.
>>
> 
> 
> 

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2009-12-18 21:32                                 ` Alexis Berlemont
@ 2010-01-05 18:15                                   ` Ettore Pedretti
  2010-01-05 22:34                                     ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2010-01-05 18:15 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

Hi

I have installed Xenomai 2.5.0 and tried to attach the module:
analogy_config analogy0 analogy_ni_pcimio

The error trace is attached as a text file
Regards
Ettore

[-- Attachment #2: dmesg05Jan2010.txt --]
[-- Type: text/plain, Size: 27851 bytes --]

Linux version 2.6.32.2 (root@fangorn) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 SMP PREEMPT Tue Jan 5 09:42:50 PST 2010
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009a800 (usable)
 BIOS-e820: 000000000009a800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 00000000bff70000 (usable)
 BIOS-e820: 00000000bff70000 - 00000000bff77000 (ACPI data)
 BIOS-e820: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ff800000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fffffc00 - 0000000100000000 (reserved)
user-defined physical RAM map:
 user: 0000000000000000 - 000000000009a800 (usable)
 user: 000000000009a800 - 00000000000a0000 (reserved)
 user: 00000000000e4000 - 0000000000100000 (reserved)
 user: 0000000000100000 - 0000000040000000 (usable)
 user: 00000000bff70000 - 00000000bff77000 (ACPI data)
 user: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 user: 00000000bff80000 - 00000000c0000000 (reserved)
 user: 00000000e0000000 - 00000000f0000000 (reserved)
 user: 00000000fec00000 - 00000000fec10000 (reserved)
 user: 00000000fee00000 - 00000000fee01000 (reserved)
 user: 00000000ff800000 - 00000000ffc00000 (reserved)
 user: 00000000fffffc00 - 0000000100000000 (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0x40000 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-C7FFF write-protect
  C8000-DFFFF uncachable
  E0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000 mask F80000000 write-back
  1 base 080000000 mask FC0000000 write-back
  2 base 0BFF80000 mask FFFF80000 uncachable
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
Warning only 895MB will be used.
Use a HIGHMEM enabled kernel.
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000037f1e000
 0000000000 - 0000400000 page 4k
 0000400000 - 0037c00000 page 2M
 0037c00000 - 0037f1e000 page 4k
kernel direct mapping tables up to 37f1e000 @ 10000-15000
RAMDISK: 37e18000 - 37fefd20
Allocated new RAMDISK: 00100000 - 002d7d20
Move RAMDISK from 0000000037e18000 - 0000000037fefd1f to 00100000 - 002d7d1f
895MB LOWMEM available.
  mapped low ram: 0 - 37f1e000
  low ram: 0 - 37f1e000
  node 0 low ram: 00000000 - 37f1e000
  node 0 bootmap 00011000 - 00017fe4
(9 early reservations) ==> bootmem [0000000000 - 0037f1e000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
  #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
  #3 [0001000000 - 0001327338]    TEXT DATA BSS ==> [0001000000 - 0001327338]
  #4 [000009a800 - 0000100000]    BIOS reserved ==> [000009a800 - 0000100000]
  #5 [0001328000 - 000132e170]              BRK ==> [0001328000 - 000132e170]
  #6 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #7 [0000100000 - 00002d7d20]      NEW RAMDISK ==> [0000100000 - 00002d7d20]
  #8 [0000011000 - 0000018000]          BOOTMAP ==> [0000011000 - 0000018000]
found SMP MP-table at [c00f5d90] f5d90
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00037f1e
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x00000100 -> 0x00037f1e
On node 0 totalpages: 229032
free_area_init_node: node 0, pgdat c1269900, node_mem_map c132f200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3946 pages, LIFO batch:0
  Normal zone: 1759 pages used for memmap
  Normal zone: 223295 pages, LIFO batch:31
Using APIC driver default
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
MPTABLE: OEM ID: INTEL   
MPTABLE: Product ID: Lindenhurst 
MPTABLE: APIC at: 0xFEE00000
Processor #0 (Bootup-CPU)
Processor #6
I/O APIC #2 Version 32 at 0xFEC00000.
I/O APIC #3 Version 32 at 0xFEC81000.
I/O APIC #4 Version 32 at 0xFEC81400.
Enabling APIC mode:  Flat.  Using 3 I/O APICs
Processors: 2
SMP: Allowing 2 CPUs, 0 hotplug CPUs
nr_irqs_gsi: 72
Allocating PCI resources starting at 40000000 (gap: 40000000:7ff70000)
NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
PERCPU: Embedded 13 pages/cpu @c1c00000 s30744 r0 d22504 u2097152
pcpu-alloc: s30744 r0 d22504 u2097152 alloc=1*4194304
pcpu-alloc: [0] 0 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227241
Kernel command line: root=LABEL=ROOTFS_TEST ro noht mem=2048M memmap=1024M pci=routeirq
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 902596k/916600k available (1831k kernel code, 13236k reserved, 650k data, 308k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff20000 - 0xfffff000   ( 892 kB)
    vmalloc : 0xf871e000 - 0xfff1e000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xf7f1e000   ( 895 MB)
      .init : 0xc126d000 - 0xc12ba000   ( 308 kB)
      .data : 0xc11c9d7b - 0xc126c618   ( 650 kB)
      .text : 0xc1000000 - 0xc11c9d7b   (1831 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
Hierarchical RCU implementation.
NR_IRQS:512
I-pipe 2.5-00: pipeline enabled.
Console: colour VGA+ 80x25
console [tty0] enabled
Fast TSC calibration using PIT
Detected 3000.216 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 6000.43 BogoMIPS (lpj=3000216)
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 4 MCE banks
CPU0: Thermal monitoring enabled (TM1)
Checking 'hlt' instruction... OK.
Freeing SMP alternatives: 10k freed
ExtINT not setup in hardware but reported by MP table
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 0) ...
....... works.
CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
Booting processor 1 APIC 0x6 ip 0x6000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5999.18 BogoMIPS (lpj=2999591)
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 3
CPU: Processor Core ID: 0
CPU1: Thermal monitoring enabled (TM1)
CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
Total of 2 processors activated (11999.61 BogoMIPS).
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd870, last bus=6
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:04.0: PME# supported from D0 D3hot D3cold
pci 0000:00:04.0: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x1840-0x185f]
pci 0000:00:1d.1: reg 20 io port: [0x1860-0x187f]
pci 0000:00:1d.2: reg 20 io port: [0x1880-0x189f]
pci 0000:00:1d.3: reg 20 io port: [0x18a0-0x18bf]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xd0000000-0xd00003ff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 1180-11bf claimed by ICH4 GPIO
pci 0000:00:1f.2: reg 10 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 14 io port: [0x00-0x03]
pci 0000:00:1f.2: reg 18 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 1c io port: [0x00-0x03]
pci 0000:00:1f.2: reg 20 io port: [0x18f0-0x18ff]
pci 0000:00:1f.3: reg 20 io port: [0x1100-0x111f]
pci 0000:00:1f.5: reg 10 io port: [0x1400-0x14ff]
pci 0000:00:1f.5: reg 14 io port: [0x1800-0x183f]
pci 0000:00:1f.5: reg 18 32bit mmio: [0xd0000c00-0xd0000dff]
pci 0000:00:1f.5: reg 1c 32bit mmio: [0xd0000800-0xd00008ff]
pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1f.5: PME# disabled
pci 0000:02:00.0: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.1: reg 10 32bit mmio: [0xd0100000-0xd0100fff]
pci 0000:02:00.2: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.2: PME# supported from D0 D3hot D3cold
pci 0000:02:00.2: PME# disabled
pci 0000:02:00.3: reg 10 32bit mmio: [0xd0101000-0xd0101fff]
pci 0000:00:03.0: bridge io port: [0x2000-0x3fff]
pci 0000:00:03.0: bridge 32bit mmio: [0xd0100000-0xd08fffff]
pci 0000:03:03.0: reg 10 64bit mmio: [0xd0200000-0xd02fffff]
pci 0000:03:03.0: reg 18 io port: [0x2000-0x20ff]
pci 0000:02:00.0: bridge io port: [0x2000-0x2fff]
pci 0000:02:00.0: bridge 32bit mmio: [0xd0200000-0xd07fffff]
pci 0000:04:01.0: reg 10 32bit mmio: [0xd0801000-0xd0801fff]
pci 0000:04:01.0: reg 14 32bit mmio: [0xd0800000-0xd0800fff]
pci 0000:04:02.0: reg 10 64bit mmio: [0xd0820000-0xd083ffff]
pci 0000:04:02.0: reg 20 io port: [0x3000-0x303f]
pci 0000:04:02.0: PME# supported from D0 D3hot D3cold
pci 0000:04:02.0: PME# disabled
pci 0000:04:02.1: reg 10 64bit mmio: [0xd0840000-0xd085ffff]
pci 0000:04:02.1: reg 20 io port: [0x3040-0x307f]
pci 0000:04:02.1: PME# supported from D0 D3hot D3cold
pci 0000:04:02.1: PME# disabled
pci 0000:02:00.2: bridge io port: [0x3000-0x3fff]
pci 0000:02:00.2: bridge 32bit mmio: [0xd0800000-0xd08fffff]
pci 0000:05:00.0: reg 10 32bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:05:00.0: reg 14 io port: [0x4000-0x40ff]
pci 0000:05:00.0: reg 18 32bit mmio: [0xd0900000-0xd090ffff]
pci 0000:05:00.0: reg 30 32bit mmio pref: [0x000000-0x01ffff]
pci 0000:05:00.0: supports D1 D2
pci 0000:05:00.1: reg 10 32bit mmio: [0xd0910000-0xd091ffff]
pci 0000:05:00.1: supports D1 D2
pci 0000:00:04.0: bridge io port: [0x4000-0x4fff]
pci 0000:00:04.0: bridge 32bit mmio: [0xd0900000-0xd09fffff]
pci 0000:00:04.0: bridge 64bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:06:02.0: reg 10 32bit mmio: [0xd0a00000-0xd0a0ffff]
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge 32bit mmio: [0xd0a00000-0xd0afffff]
vgaarb: device added: PCI:0000:05:00.0,decodes=io+mem,owns=io+mem,locks=none
pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:24d0]
PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.1: PCI->APIC IRQ transform: INT B -> IRQ 19
pci 0000:00:1d.2: PCI->APIC IRQ transform: INT C -> IRQ 18
pci 0000:00:1d.3: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.7: PCI->APIC IRQ transform: INT D -> IRQ 23
pci 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
pci 0000:00:1f.3: PCI->APIC IRQ transform: INT B -> IRQ 17
pci 0000:00:1f.5: PCI->APIC IRQ transform: INT B -> IRQ 17
pci 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
pci 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
pci 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
pci 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
pci 0000:05:00.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:06:02.0: PCI->APIC IRQ transform: INT A -> IRQ 20
Switching to clocksource tsc
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:02:00.0: PCI bridge, secondary bus 0000:03
pci 0000:02:00.0:   IO window: 0x2000-0x2fff
pci 0000:02:00.0:   MEM window: 0xd0200000-0xd07fffff
pci 0000:02:00.0:   PREFETCH window: disabled
pci 0000:02:00.2: PCI bridge, secondary bus 0000:04
pci 0000:02:00.2:   IO window: 0x3000-0x3fff
pci 0000:02:00.2:   MEM window: 0xd0800000-0xd08fffff
pci 0000:02:00.2:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x2000-0x3fff
pci 0000:00:03.0:   MEM window: 0xd0100000-0xd08fffff
pci 0000:00:03.0:   PREFETCH window: disabled
pci 0000:00:04.0: PCI bridge, secondary bus 0000:05
pci 0000:00:04.0:   IO window: 0x4000-0x4fff
pci 0000:00:04.0:   MEM window: 0xd0900000-0xd09fffff
pci 0000:00:04.0:   PREFETCH window: 0x000000d8000000-0x000000dfffffff
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
pci 0000:00:1e.0:   IO window: disabled
pci 0000:00:1e.0:   MEM window: 0xd0a00000-0xd0afffff
pci 0000:00:1e.0:   PREFETCH window: disabled
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: setting latency timer to 64
pci 0000:02:00.0: setting latency timer to 64
pci 0000:02:00.2: setting latency timer to 64
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:02: resource 0 io:  [0x2000-0x3fff]
pci_bus 0000:02: resource 1 mem: [0xd0100000-0xd08fffff]
pci_bus 0000:03: resource 0 io:  [0x2000-0x2fff]
pci_bus 0000:03: resource 1 mem: [0xd0200000-0xd07fffff]
pci_bus 0000:04: resource 0 io:  [0x3000-0x3fff]
pci_bus 0000:04: resource 1 mem: [0xd0800000-0xd08fffff]
pci_bus 0000:05: resource 0 io:  [0x4000-0x4fff]
pci_bus 0000:05: resource 1 mem: [0xd0900000-0xd09fffff]
pci_bus 0000:05: resource 2 pref mem [0xd8000000-0xdfffffff]
pci_bus 0000:06: resource 1 mem: [0xd0a00000-0xd0afffff]
pci_bus 0000:06: resource 3 io:  [0x00-0xffff]
pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
pci 0000:05:00.0: Boot video device
Unpacking initramfs...
Freeing initrd memory: 1887k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
audit: initializing netlink socket (disabled)
type=2000 audit(1262714306.287:1): initialized
I-pipe: Domain Xenomai registered.
Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5.0 (Flying In A Blue Dream) loaded.
msgmni has been set to 1767
io scheduler noop registered
io scheduler deadline registered (default)
pcieport 0000:00:02.0: setting latency timer to 64
pcieport 0000:00:03.0: setting latency timer to 64
pcieport 0000:00:04.0: setting latency timer to 64
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Using IPI Shortcut mode
Freeing unused kernel memory: 308k freed
input: AT Translated Set 2 keyboard as /class/input/input0
NET: Registered protocol family 1
libata version 3.00 loaded.
Intel(R) PRO/1000 Network Driver - version 7.3.21-k5-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e1000 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
ata_piix 0000:00:1f.2: version 2.13
ata_piix 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
ata_piix 0000:00:1f.2: setting latency timer to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x18f0 irq 14
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18f8 irq 15
sata_mv 0000:03:03.0: version 1.28
sata_mv 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
sata_mv 0000:03:03.0: Gen-II 32 slots 8 ports SCSI mode IRQ via INTx
scsi2 : sata_mv
scsi3 : sata_mv
scsi4 : sata_mv
scsi5 : sata_mv
scsi6 : sata_mv
scsi7 : sata_mv
scsi8 : sata_mv
scsi9 : sata_mv
ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 28
ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 28
ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 28
ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 28
ata7: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0232000 irq 28
ata8: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0234000 irq 28
ata9: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0236000 irq 28
ata10: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0238000 irq 28
ata2.00: ATA-7: HDT722525DLA380, V44OA96A, max UDMA/133
ata2.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: ATAPI: SONY    DVD RW DW-Q30A, YYS2, max UDMA/66
ata1.00: limited to UDMA/33 due to 40-wire cable
ata2.01: ATA-8: ST31000333AS, CC1H, max UDMA/133
ata2.01: 1953525168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133
ata1.00: configured for UDMA/33
scsi 0:0:0:0: CD-ROM            SONY     DVD RW DW-Q30A   YYS2 PQ: 0 ANSI: 5
ata2.01: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      HDT722525DLA380  V44O PQ: 0 ANSI: 5
scsi 1:0:1:0: Direct-Access     ATA      ST31000333AS     CC1H PQ: 0 ANSI: 5
sd 1:0:1:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 1:0:1:0: [sdb] Write Protect is off
sd 1:0:1:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 1:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb:
input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
e1000: 0000:04:02.0: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b6
 sdb1 sdb2 sdb3 sdb4
sd 1:0:1:0: [sdb] Attached SCSI disk
 sda: sda1 sda2 <
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
 sda5 >
sd 1:0:0:0: [sda] Attached SCSI disk
ata3: SATA link down (SStatus 0 SControl 300)
e1000: 0000:04:02.1: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b7
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: WDC WD1001FALS-00J7B1, 05.00K05, max UDMA/133
ata4.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 3:0:0:0: Direct-Access     ATA      WDC WD1001FALS-0 05.0 PQ: 0 ANSI: 5
sd 3:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdc: sdc1 sdc2 sdc3
sd 3:0:0:0: [sdc] Attached SCSI disk
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-8: ST32000542AS, CC34, max UDMA/133
ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
scsi 4:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
sd 4:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdd: sdd1
sd 4:0:0:0: [sdd] Attached SCSI disk
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata6.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133
scsi 5:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 5:0:0:0: [sde] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 5:0:0:0: [sde] Write Protect is off
sd 5:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde: sde1 sde2 sde3
sd 5:0:0:0: [sde] Attached SCSI disk
ata7: SATA link down (SStatus 0 SControl 300)
ata8: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata8.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata8.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata8.00: configured for UDMA/133
scsi 7:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 7:0:0:0: [sdf] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 7:0:0:0: [sdf] Write Protect is off
sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdf: sdf1 sdf2 sdf3
sd 7:0:0:0: [sdf] Attached SCSI disk
ata9: SATA link down (SStatus 0 SControl 300)
ata10: SATA link down (SStatus 0 SControl 300)
Uniform Multi-Platform E-IDE driver
EXT3-fs: mounted filesystem with writeback data mode.
kjournald starting.  Commit interval 5 seconds
udevd version 125 started
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
Analogy: MITE: Available NI device IDs: 0x1880(used)
Adding 2650684k swap on /dev/sda5.  Priority:-1 extents:1 across:2650684k 
EXT3 FS on sda1, internal journal
Xenomai: starting native API services.
e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
warning: `ntpd' uses 32-bit capabilities (legacy support in use)
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 58 to 1
set_rtc_mmss: can't update from 59 to 1
set_rtc_mmss: can't update from 59 to 1
set_rtc_mmss: can't update from 59 to 1
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
set_rtc_mmss: can't update from 59 to 2
Analogy: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
mite 0000:04:01.0: setting latency timer to 64
Analogy: MITE: 0xd0801000 mapped to f8e24000 
Analogy: DAQ: 0xd0800000 mapped to f8e28000
Analogy: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
Analogy: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
Analogy: analogy_ni_pcimio: pcimio_attach: found irq 48
BUG: unable to handle kernel NULL pointer dereference at 00000004
IP: [<f8c70061>] ni_E_init+0x267/0x1009 [analogy_ni_mio]
*pde = 00000000 
Oops: 0000 [#1] PREEMPT SMP 
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm ext3 jbd mbcache ide_pci_generic ide_core sata_mv ata_piix e1000 libata unix [last unloaded: scsi_wait_scan]

Pid: 3849, comm: analogy_config Not tainted (2.6.32.2 #1) X6DA8
EIP: 0060:[<f8c70061>] EFLAGS: 00010202 CPU: 1
EIP is at ni_E_init+0x267/0x1009 [analogy_ni_mio]
EAX: 00000000 EBX: f8a15280 ECX: f8c2336c EDX: f8c23360
ESI: 00000000 EDI: f8c23360 EBP: f5831e24 ESP: f5831db4
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process analogy_config (pid: 3849, ti=f5830000 task=f78ff7d0 task.ti=f5830000)
I-pipe domain Linux
Stack:
 f5831dbc c10139e3 f5831dc4 f8c23360 f5831dcc c105d577 f5831de8 f8a00a5d
<0> f8c1ef30 00000000 00000001 f8c23394 fffffff0 f5831e00 f8c1f240 00000001
<0> f8c2251d f8c23388 f8c23360 f5831e24 f8c1fdef 00000001 f8c23360 00000030
Call Trace:
 [<c10139e3>] ? unmask_IO_APIC_irq+0xd/0xf
 [<c105d577>] ? xnintr_enable+0xb/0xd
 [<f8a00a5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
 [<f8c1ef30>] ? a4l_handle_irq+0x0/0x1a [xeno_analogy]
 [<f8c1f240>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
 [<f8c1fdef>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
 [<f8c82d8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
 [<f8c1e0af>] ? a4l_assign_driver+0x61/0x13c [xeno_analogy]
 [<f8c1e382>] ? a4l_device_attach+0x54/0x6d [xeno_analogy]
 [<c1068ca8>] ? xnshadow_ppd_get+0x4f/0x58
 [<f8c1e617>] ? a4l_ioctl_devcfg+0x57/0x104 [xeno_analogy]
 [<f8c204af>] ? a4l_rt_ioctl+0x33/0x3a [xeno_analogy]
 [<f89ff3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
 [<f8a01e77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
 [<f8a01dde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
 [<c106c584>] ? losyscall_event+0xa7/0x2c7
 [<c105925e>] ? __ipipe_dispatch_event+0xdf/0x201
 [<c106c4dd>] ? losyscall_event+0x0/0x2c7
 [<c10169f1>] ? __ipipe_syscall_root+0x3b/0xc4
 [<c1002d7d>] ? system_call+0x2d/0x4f
Code: 8b 45 9c e8 da f2 fa ff 89 c2 83 f8 01 0f 85 d4 fe ff ff 8b 55 9c 8b 82 74 01 00 00 8b 00 f6 40 3c 06 0f 84 22 01 00 00 8b 42 18 <8b> 40 04 89 45 b0 8b 40 14 8b 40 04 85 c0 0f 84 0b 01 00 00 31 
EIP: [<f8c70061>] ni_E_init+0x267/0x1009 [analogy_ni_mio] SS:ESP 0068:f5831db4
CR2: 0000000000000004
---[ end trace 9c888f2ba4161d5a ]---

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-05 18:15                                   ` Ettore Pedretti
@ 2010-01-05 22:34                                     ` Alexis Berlemont
  2010-01-06 13:57                                       ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2010-01-05 22:34 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

Ettore Pedretti wrote:
> Hi
> 
> I have installed Xenomai 2.5.0 and tried to attach the module:
> analogy_config analogy0 analogy_ni_pcimio
> 
> The error trace is attached as a text file
I do not see any analogy debug traces. In your kernel configuration,
have you configured the following options like this:
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=1
CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1

> Regards
> Ettore
> 
Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-05 22:34                                     ` Alexis Berlemont
@ 2010-01-06 13:57                                       ` Ettore Pedretti
  2010-01-06 22:15                                         ` Alexis Berlemont
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2010-01-06 13:57 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

Hi,

There was no option in menuconfig for enabling
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=1
CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1

I edited .config manually and that worked (I hope).

Error trace attached. I hope this will narrow-down the problem

Ettore

2010/1/5 Alexis Berlemont <berlemont.hauw@domain.hid>:
> Hi,
>
> Ettore Pedretti wrote:
>>
>> Hi
>>
>> I have installed Xenomai 2.5.0 and tried to attach the module:
>> analogy_config analogy0 analogy_ni_pcimio
>>
>> The error trace is attached as a text file
>
> I do not see any analogy debug traces. In your kernel configuration,
> have you configured the following options like this:
> CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
> CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=1
> CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1
>
>> Regards
>> Ettore
>>
> Alexis.
>



-- 
Ettore Pedretti, SUPA
School of Physics and Astronomy
University of St Andrews, North Haugh,
St Andrews, Fife, KY16 9SS, Scotland
Ph: +44-1334-461666, Fax: +44-1334-463104
The University of St Andrews is a charity registered in Scotland : No SC013532

[-- Attachment #2: dmesg06Jan2010.txt --]
[-- Type: text/plain, Size: 26229 bytes --]

Linux version 2.6.32.2 (root@fangorn) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 SMP PREEMPT Wed Jan 6 04:18:06 PST 2010
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009a800 (usable)
 BIOS-e820: 000000000009a800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 00000000bff70000 (usable)
 BIOS-e820: 00000000bff70000 - 00000000bff77000 (ACPI data)
 BIOS-e820: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ff800000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fffffc00 - 0000000100000000 (reserved)
user-defined physical RAM map:
 user: 0000000000000000 - 000000000009a800 (usable)
 user: 000000000009a800 - 00000000000a0000 (reserved)
 user: 00000000000e4000 - 0000000000100000 (reserved)
 user: 0000000000100000 - 0000000040000000 (usable)
 user: 00000000bff70000 - 00000000bff77000 (ACPI data)
 user: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 user: 00000000bff80000 - 00000000c0000000 (reserved)
 user: 00000000e0000000 - 00000000f0000000 (reserved)
 user: 00000000fec00000 - 00000000fec10000 (reserved)
 user: 00000000fee00000 - 00000000fee01000 (reserved)
 user: 00000000ff800000 - 00000000ffc00000 (reserved)
 user: 00000000fffffc00 - 0000000100000000 (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0x40000 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-C7FFF write-protect
  C8000-DFFFF uncachable
  E0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000 mask F80000000 write-back
  1 base 080000000 mask FC0000000 write-back
  2 base 0BFF80000 mask FFFF80000 uncachable
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
Warning only 895MB will be used.
Use a HIGHMEM enabled kernel.
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000037f1e000
 0000000000 - 0000400000 page 4k
 0000400000 - 0037c00000 page 2M
 0037c00000 - 0037f1e000 page 4k
kernel direct mapping tables up to 37f1e000 @ 10000-15000
RAMDISK: 37e18000 - 37feffc5
Allocated new RAMDISK: 00100000 - 002d7fc5
Move RAMDISK from 0000000037e18000 - 0000000037feffc4 to 00100000 - 002d7fc4
895MB LOWMEM available.
  mapped low ram: 0 - 37f1e000
  low ram: 0 - 37f1e000
  node 0 low ram: 00000000 - 37f1e000
  node 0 bootmap 00011000 - 00017fe4
(9 early reservations) ==> bootmem [0000000000 - 0037f1e000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
  #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
  #3 [0001000000 - 0001327338]    TEXT DATA BSS ==> [0001000000 - 0001327338]
  #4 [000009a800 - 0000100000]    BIOS reserved ==> [000009a800 - 0000100000]
  #5 [0001328000 - 000132e170]              BRK ==> [0001328000 - 000132e170]
  #6 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #7 [0000100000 - 00002d7fc5]      NEW RAMDISK ==> [0000100000 - 00002d7fc5]
  #8 [0000011000 - 0000018000]          BOOTMAP ==> [0000011000 - 0000018000]
found SMP MP-table at [c00f5d90] f5d90
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00037f1e
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x00000100 -> 0x00037f1e
On node 0 totalpages: 229032
free_area_init_node: node 0, pgdat c1269900, node_mem_map c132f200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3946 pages, LIFO batch:0
  Normal zone: 1759 pages used for memmap
  Normal zone: 223295 pages, LIFO batch:31
Using APIC driver default
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
MPTABLE: OEM ID: INTEL   
MPTABLE: Product ID: Lindenhurst 
MPTABLE: APIC at: 0xFEE00000
Processor #0 (Bootup-CPU)
Processor #6
I/O APIC #2 Version 32 at 0xFEC00000.
I/O APIC #3 Version 32 at 0xFEC81000.
I/O APIC #4 Version 32 at 0xFEC81400.
Enabling APIC mode:  Flat.  Using 3 I/O APICs
Processors: 2
SMP: Allowing 2 CPUs, 0 hotplug CPUs
nr_irqs_gsi: 72
Allocating PCI resources starting at 40000000 (gap: 40000000:7ff70000)
NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
PERCPU: Embedded 13 pages/cpu @c1c00000 s30744 r0 d22504 u2097152
pcpu-alloc: s30744 r0 d22504 u2097152 alloc=1*4194304
pcpu-alloc: [0] 0 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227241
Kernel command line: root=LABEL=ROOTFS_TEST ro noht mem=2048M memmap=1024M pci=routeirq
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 902596k/916600k available (1830k kernel code, 13236k reserved, 650k data, 308k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff20000 - 0xfffff000   ( 892 kB)
    vmalloc : 0xf871e000 - 0xfff1e000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xf7f1e000   ( 895 MB)
      .init : 0xc126d000 - 0xc12ba000   ( 308 kB)
      .data : 0xc11c9a6b - 0xc126c618   ( 650 kB)
      .text : 0xc1000000 - 0xc11c9a6b   (1830 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
Hierarchical RCU implementation.
NR_IRQS:512
I-pipe 2.5-00: pipeline enabled.
Console: colour VGA+ 80x25
console [tty0] enabled
Fast TSC calibration using PIT
Detected 2999.916 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 5999.83 BogoMIPS (lpj=2999916)
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 4 MCE banks
CPU0: Thermal monitoring enabled (TM1)
Checking 'hlt' instruction... OK.
Freeing SMP alternatives: 10k freed
ExtINT not setup in hardware but reported by MP table
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 0) ...
....... works.
CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
Booting processor 1 APIC 0x6 ip 0x6000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5999.17 BogoMIPS (lpj=2999588)
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 3
CPU: Processor Core ID: 0
CPU1: Thermal monitoring enabled (TM1)
CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
Total of 2 processors activated (11999.00 BogoMIPS).
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd870, last bus=6
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:04.0: PME# supported from D0 D3hot D3cold
pci 0000:00:04.0: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x1840-0x185f]
pci 0000:00:1d.1: reg 20 io port: [0x1860-0x187f]
pci 0000:00:1d.2: reg 20 io port: [0x1880-0x189f]
pci 0000:00:1d.3: reg 20 io port: [0x18a0-0x18bf]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xd0000000-0xd00003ff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 1180-11bf claimed by ICH4 GPIO
pci 0000:00:1f.2: reg 10 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 14 io port: [0x00-0x03]
pci 0000:00:1f.2: reg 18 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 1c io port: [0x00-0x03]
pci 0000:00:1f.2: reg 20 io port: [0x18f0-0x18ff]
pci 0000:00:1f.3: reg 20 io port: [0x1100-0x111f]
pci 0000:00:1f.5: reg 10 io port: [0x1400-0x14ff]
pci 0000:00:1f.5: reg 14 io port: [0x1800-0x183f]
pci 0000:00:1f.5: reg 18 32bit mmio: [0xd0000c00-0xd0000dff]
pci 0000:00:1f.5: reg 1c 32bit mmio: [0xd0000800-0xd00008ff]
pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1f.5: PME# disabled
pci 0000:02:00.0: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.1: reg 10 32bit mmio: [0xd0100000-0xd0100fff]
pci 0000:02:00.2: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.2: PME# supported from D0 D3hot D3cold
pci 0000:02:00.2: PME# disabled
pci 0000:02:00.3: reg 10 32bit mmio: [0xd0101000-0xd0101fff]
pci 0000:00:03.0: bridge io port: [0x2000-0x3fff]
pci 0000:00:03.0: bridge 32bit mmio: [0xd0100000-0xd08fffff]
pci 0000:03:03.0: reg 10 64bit mmio: [0xd0200000-0xd02fffff]
pci 0000:03:03.0: reg 18 io port: [0x2000-0x20ff]
pci 0000:02:00.0: bridge io port: [0x2000-0x2fff]
pci 0000:02:00.0: bridge 32bit mmio: [0xd0200000-0xd07fffff]
pci 0000:04:01.0: reg 10 32bit mmio: [0xd0801000-0xd0801fff]
pci 0000:04:01.0: reg 14 32bit mmio: [0xd0800000-0xd0800fff]
pci 0000:04:02.0: reg 10 64bit mmio: [0xd0820000-0xd083ffff]
pci 0000:04:02.0: reg 20 io port: [0x3000-0x303f]
pci 0000:04:02.0: PME# supported from D0 D3hot D3cold
pci 0000:04:02.0: PME# disabled
pci 0000:04:02.1: reg 10 64bit mmio: [0xd0840000-0xd085ffff]
pci 0000:04:02.1: reg 20 io port: [0x3040-0x307f]
pci 0000:04:02.1: PME# supported from D0 D3hot D3cold
pci 0000:04:02.1: PME# disabled
pci 0000:02:00.2: bridge io port: [0x3000-0x3fff]
pci 0000:02:00.2: bridge 32bit mmio: [0xd0800000-0xd08fffff]
pci 0000:05:00.0: reg 10 32bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:05:00.0: reg 14 io port: [0x4000-0x40ff]
pci 0000:05:00.0: reg 18 32bit mmio: [0xd0900000-0xd090ffff]
pci 0000:05:00.0: reg 30 32bit mmio pref: [0x000000-0x01ffff]
pci 0000:05:00.0: supports D1 D2
pci 0000:05:00.1: reg 10 32bit mmio: [0xd0910000-0xd091ffff]
pci 0000:05:00.1: supports D1 D2
pci 0000:00:04.0: bridge io port: [0x4000-0x4fff]
pci 0000:00:04.0: bridge 32bit mmio: [0xd0900000-0xd09fffff]
pci 0000:00:04.0: bridge 64bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:06:02.0: reg 10 32bit mmio: [0xd0a00000-0xd0a0ffff]
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge 32bit mmio: [0xd0a00000-0xd0afffff]
vgaarb: device added: PCI:0000:05:00.0,decodes=io+mem,owns=io+mem,locks=none
pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:24d0]
PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.1: PCI->APIC IRQ transform: INT B -> IRQ 19
pci 0000:00:1d.2: PCI->APIC IRQ transform: INT C -> IRQ 18
pci 0000:00:1d.3: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.7: PCI->APIC IRQ transform: INT D -> IRQ 23
pci 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
pci 0000:00:1f.3: PCI->APIC IRQ transform: INT B -> IRQ 17
pci 0000:00:1f.5: PCI->APIC IRQ transform: INT B -> IRQ 17
pci 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
pci 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
pci 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
pci 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
pci 0000:05:00.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:06:02.0: PCI->APIC IRQ transform: INT A -> IRQ 20
Switching to clocksource tsc
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:02:00.0: PCI bridge, secondary bus 0000:03
pci 0000:02:00.0:   IO window: 0x2000-0x2fff
pci 0000:02:00.0:   MEM window: 0xd0200000-0xd07fffff
pci 0000:02:00.0:   PREFETCH window: disabled
pci 0000:02:00.2: PCI bridge, secondary bus 0000:04
pci 0000:02:00.2:   IO window: 0x3000-0x3fff
pci 0000:02:00.2:   MEM window: 0xd0800000-0xd08fffff
pci 0000:02:00.2:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x2000-0x3fff
pci 0000:00:03.0:   MEM window: 0xd0100000-0xd08fffff
pci 0000:00:03.0:   PREFETCH window: disabled
pci 0000:00:04.0: PCI bridge, secondary bus 0000:05
pci 0000:00:04.0:   IO window: 0x4000-0x4fff
pci 0000:00:04.0:   MEM window: 0xd0900000-0xd09fffff
pci 0000:00:04.0:   PREFETCH window: 0x000000d8000000-0x000000dfffffff
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
pci 0000:00:1e.0:   IO window: disabled
pci 0000:00:1e.0:   MEM window: 0xd0a00000-0xd0afffff
pci 0000:00:1e.0:   PREFETCH window: disabled
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: setting latency timer to 64
pci 0000:02:00.0: setting latency timer to 64
pci 0000:02:00.2: setting latency timer to 64
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:02: resource 0 io:  [0x2000-0x3fff]
pci_bus 0000:02: resource 1 mem: [0xd0100000-0xd08fffff]
pci_bus 0000:03: resource 0 io:  [0x2000-0x2fff]
pci_bus 0000:03: resource 1 mem: [0xd0200000-0xd07fffff]
pci_bus 0000:04: resource 0 io:  [0x3000-0x3fff]
pci_bus 0000:04: resource 1 mem: [0xd0800000-0xd08fffff]
pci_bus 0000:05: resource 0 io:  [0x4000-0x4fff]
pci_bus 0000:05: resource 1 mem: [0xd0900000-0xd09fffff]
pci_bus 0000:05: resource 2 pref mem [0xd8000000-0xdfffffff]
pci_bus 0000:06: resource 1 mem: [0xd0a00000-0xd0afffff]
pci_bus 0000:06: resource 3 io:  [0x00-0xffff]
pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
pci 0000:05:00.0: Boot video device
Unpacking initramfs...
Freeing initrd memory: 1887k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
audit: initializing netlink socket (disabled)
type=2000 audit(1262785485.289:1): initialized
I-pipe: Domain Xenomai registered.
Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5.0 (Flying In A Blue Dream) loaded.
msgmni has been set to 1767
io scheduler noop registered
io scheduler deadline registered (default)
pcieport 0000:00:02.0: setting latency timer to 64
pcieport 0000:00:03.0: setting latency timer to 64
pcieport 0000:00:04.0: setting latency timer to 64
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Using IPI Shortcut mode
Freeing unused kernel memory: 308k freed
input: AT Translated Set 2 keyboard as /class/input/input0
NET: Registered protocol family 1
Intel(R) PRO/1000 Network Driver - version 7.3.21-k5-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e1000 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
libata version 3.00 loaded.
ata_piix 0000:00:1f.2: version 2.13
ata_piix 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
ata_piix 0000:00:1f.2: setting latency timer to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x18f0 irq 14
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18f8 irq 15
sata_mv 0000:03:03.0: version 1.28
sata_mv 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
sata_mv 0000:03:03.0: Gen-II 32 slots 8 ports SCSI mode IRQ via INTx
scsi2 : sata_mv
scsi3 : sata_mv
scsi4 : sata_mv
scsi5 : sata_mv
scsi6 : sata_mv
scsi7 : sata_mv
scsi8 : sata_mv
scsi9 : sata_mv
ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 28
ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 28
ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 28
ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 28
ata7: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0232000 irq 28
ata8: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0234000 irq 28
ata9: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0236000 irq 28
ata10: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0238000 irq 28
ata2.00: ATA-7: HDT722525DLA380, V44OA96A, max UDMA/133
ata2.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: ATAPI: SONY    DVD RW DW-Q30A, YYS2, max UDMA/66
ata1.00: limited to UDMA/33 due to 40-wire cable
ata2.01: ATA-8: ST31000333AS, CC1H, max UDMA/133
ata2.01: 1953525168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133
ata1.00: configured for UDMA/33
scsi 0:0:0:0: CD-ROM            SONY     DVD RW DW-Q30A   YYS2 PQ: 0 ANSI: 5
input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
ata2.01: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      HDT722525DLA380  V44O PQ: 0 ANSI: 5
scsi 1:0:1:0: Direct-Access     ATA      ST31000333AS     CC1H PQ: 0 ANSI: 5
sd 1:0:1:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 1:0:1:0: [sdb] Write Protect is off
sd 1:0:1:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 1:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sdb1 sdb2 sdb3 sdb4
 sda:
e1000: 0000:04:02.0: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b6
 sda1 sda2 <
sd 1:0:1:0: [sdb] Attached SCSI disk
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
 sda5 >
sd 1:0:0:0: [sda] Attached SCSI disk
ata3: SATA link down (SStatus 0 SControl 300)
e1000: 0000:04:02.1: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b7
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: WDC WD1001FALS-00J7B1, 05.00K05, max UDMA/133
ata4.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 3:0:0:0: Direct-Access     ATA      WDC WD1001FALS-0 05.0 PQ: 0 ANSI: 5
sd 3:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdc: sdc1 sdc2 sdc3
sd 3:0:0:0: [sdc] Attached SCSI disk
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-8: ST32000542AS, CC34, max UDMA/133
ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
scsi 4:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
sd 4:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdd: sdd1
sd 4:0:0:0: [sdd] Attached SCSI disk
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata6.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133
scsi 5:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 5:0:0:0: [sde] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 5:0:0:0: [sde] Write Protect is off
sd 5:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde: sde1 sde2 sde3
sd 5:0:0:0: [sde] Attached SCSI disk
ata7: SATA link down (SStatus 0 SControl 300)
ata8: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata8.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata8.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata8.00: configured for UDMA/133
scsi 7:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 7:0:0:0: [sdf] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 7:0:0:0: [sdf] Write Protect is off
sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdf: sdf1 sdf2 sdf3
sd 7:0:0:0: [sdf] Attached SCSI disk
ata9: SATA link down (SStatus 0 SControl 300)
ata10: SATA link down (SStatus 0 SControl 300)
Uniform Multi-Platform E-IDE driver
EXT3-fs: mounted filesystem with writeback data mode.
kjournald starting.  Commit interval 5 seconds
udevd version 125 started
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
Analogy: MITE: Available NI device IDs: 0x1880
Analogy: a4l_add_drv: name=analogy_8255
Analogy: a4l_lct_drv: name=analogy_8255
Analogy: a4l_add_drv: name=analogy_ni_pcimio
Analogy: a4l_lct_drv: name=analogy_ni_pcimio
Adding 2650684k swap on /dev/sda5.  Priority:-1 extents:1 across:2650684k 
EXT3 FS on sda1, internal journal
Xenomai: starting native API services.
e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
warning: `ntpd' uses 32-bit capabilities (legacy support in use)
Analogy: a4l_rt_open: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_ioctl_devcfg: minor=0
Analogy: a4l_presetup_transfer: minor=0
Analogy: a4l_device_attach: minor=0
Analogy: a4l_fill_lnkdesc: minor=0
Analogy: a4l_lct_drv: name=analogy_ni_pcimio
Analogy: a4l_assign_driver: minor=0
Analogy: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
mite 0000:04:01.0: setting latency timer to 64
Analogy: MITE: 0xd0801000 mapped to f8e26000 
Analogy: DAQ: 0xd0800000 mapped to f8e2a000
Analogy: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
Analogy: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
Analogy: analogy_ni_pcimio: pcimio_attach: found irq 48
Analogy: analogy_ni_pcimio: mio_common: starting attach procedure...
Analogy: analogy_ni_pcimio: mio_common: registering AI subdevice...
Analogy: analogy_ni_pcimio: mio_common: AI subdevice not present
Analogy: analogy_ni_pcimio: mio_common: AI subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering AO subdevice...
Analogy: analogy_ni_pcimio: mio_common: AO: 4 channels
Analogy: analogy_ni_pcimio: mio_common: AO subdevice registered
BUG: unable to handle kernel NULL pointer dereference at 00000004
IP: [<f8c73162>] ni_E_init+0x368/0x1565 [analogy_ni_mio]
*pde = 00000000 
Oops: 0000 [#1] PREEMPT SMP 
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: xeno_native analogy_ni_pcimio analogy_ni_mio analogy_ni_tio analogy_8255 analogy_ni_mite xeno_analogy xeno_rtdm ext3 jbd mbcache ide_pci_generic ide_core sata_mv ata_piix e1000 libata unix [last unloaded: scsi_wait_scan]

Pid: 3705, comm: analogy_config Not tainted (2.6.32.2 #1) X6DA8
EIP: 0060:[<f8c73162>] EFLAGS: 00010202 CPU: 0
EIP is at ni_E_init+0x368/0x1565 [analogy_ni_mio]
EAX: 00000000 EBX: f8a15280 ECX: f8c24d80 EDX: 0094e000
ESI: c0c00380 EDI: f8c24d80 EBP: f6be3e18 ESP: f6be3db8
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process analogy_config (pid: 3705, ti=f6be2000 task=f78767d0 task.ti=f6be2000)
I-pipe domain Linux
Stack:
 f8c75554 f8c864f9 00000004 f8a00a5d f8c24d80 00000000 00000001 f8c24db4
<0> fffffff0 f6be3df4 f8c204b0 00000001 f8c23f35 f8c24da8 f8c24d80 f6be3e18
<0> f8c210af 00000001 f8c24d80 00000030 00000000 00000030 c0c00380 c0c003a0
Call Trace:
 [<f8a00a5d>] ? rtdm_irq_request+0x48/0x5e [xeno_rtdm]
 [<f8c204b0>] ? __a4l_request_irq+0x33/0x39 [xeno_analogy]
 [<f8c210af>] ? a4l_request_irq+0x98/0xaf [xeno_analogy]
 [<f8c85d8a>] ? pcimio_attach+0x54d/0x664 [analogy_ni_pcimio]
 [<f8c1f26c>] ? a4l_assign_driver+0x81/0x170 [xeno_analogy]
 [<f8c1f592>] ? a4l_device_attach+0x74/0x8d [xeno_analogy]
 [<f8c1f843>] ? a4l_ioctl_devcfg+0x73/0x11c [xeno_analogy]
 [<f8c217ef>] ? a4l_rt_ioctl+0x4f/0x56 [xeno_analogy]
 [<f89ff3e6>] ? __rt_dev_ioctl+0xd1/0xd8 [xeno_rtdm]
 [<f8a01e77>] ? sys_rtdm_open+0x5c/0x64 [xeno_rtdm]
 [<f8a01dde>] ? sys_rtdm_ioctl+0x29/0x2b [xeno_rtdm]
 [<c106c584>] ? losyscall_event+0xa7/0x2c7
 [<c105925e>] ? __ipipe_dispatch_event+0xdf/0x201
 [<c106c4dd>] ? losyscall_event+0x0/0x2c7
 [<c10169f1>] ? __ipipe_syscall_root+0x3b/0xc4
 [<c1002d7d>] ? system_call+0x2d/0x4f
Code: 8b 50 10 89 54 24 04 c7 04 24 54 55 c7 f8 e8 8a 30 55 c8 8b 4d b0 8b 81 74 01 00 00 8b 00 f6 40 3c 06 0f 84 c9 00 00 00 8b 41 18 <8b> 40 04 89 45 bc 8b 40 14 8b 40 04 85 c0 0f 84 b2 00 00 00 31 
EIP: [<f8c73162>] ni_E_init+0x368/0x1565 [analogy_ni_mio] SS:ESP 0068:f6be3db8
CR2: 0000000000000004
---[ end trace 4ab8cafb94eb805d ]---
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_close: minor=0

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-06 13:57                                       ` Ettore Pedretti
@ 2010-01-06 22:15                                         ` Alexis Berlemont
  2010-01-07 19:24                                           ` Ettore Pedretti
  0 siblings, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2010-01-06 22:15 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Ettore Pedretti wrote:
> Hi,
> 
> There was no option in menuconfig for enabling
> CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=1
> CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1
That's weird. There must be a bug somewhere. Could you send me your last
.config file?
> 
> I edited .config manually and that worked (I hope).
> 
> Error trace attached. I hope this will narrow-down the problem
Thank you. I think I fixed the bug. I updated my git repository (branch
analogy). Could you test it ?

If you do not want to bother with git. Here is the patch:

diff --git a/ksrc/drivers/analogy/national_instruments/mio_common.c 
b/ksrc/drive
index c722384..db9762a 100644
--- a/ksrc/drivers/analogy/national_instruments/mio_common.c
+++ b/ksrc/drivers/analogy/national_instruments/mio_common.c
@@ -3732,9 +3732,14 @@ void mio_common_detach(a4l_dev_t * dev)

  static void init_ao_67xx(a4l_dev_t * dev)
  {
-       a4l_subd_t *subd = dev->transfer.subds[NI_AO_SUBDEV];
+       a4l_subd_t *subd = a4l_get_subd(dev, NI_AO_SUBDEV);
         int i;

+       if (subd == NULL) {
+               a4l_err(dev, "%s: unable to find AO subdevice\n", 
__FUNCTION__);
+               return;
+       }
+
         for (i = 0; i < subd->chan_desc->length; i++)
                 ni_ao_win_outw(dev, AO_Channel(i) | 0x0,
                                AO_Configuration_2_67xx);

> 
> Ettore
> 
> 2010/1/5 Alexis Berlemont <berlemont.hauw@domain.hid>:
>> Hi,
>>
>> Ettore Pedretti wrote:
>>> Hi
>>>
>>> I have installed Xenomai 2.5.0 and tried to attach the module:
>>> analogy_config analogy0 analogy_ni_pcimio
>>>
>>> The error trace is attached as a text file
>> I do not see any analogy debug traces. In your kernel configuration,
>> have you configured the following options like this:
>> CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
>> CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=1
>> CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1
>>
>>> Regards
>>> Ettore
>>>
>> Alexis.
>>
> 
> 
> 
Alexis.


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-06 22:15                                         ` Alexis Berlemont
@ 2010-01-07 19:24                                           ` Ettore Pedretti
  2010-01-07 21:58                                             ` Alexis Berlemont
  2010-01-07 22:18                                             ` Alexis Berlemont
  0 siblings, 2 replies; 35+ messages in thread
From: Ettore Pedretti @ 2010-01-07 19:24 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

Hi,

I did not quite understand how to checkout  the analogy branch. When I
do git branch -a either in xenomai-head or in xenomai-2.5 I get only:

* master
  origin/HEAD
  origin/master

no other branch is available for checkout. I'm obviously missing something.

I tried to apply the patch but it failed. At the end I edited
mio_common.c directly. I hope I did not introduce any error.
Everything compiled and installed fine.

The attach command did not complain this time:

analogy_config analogy0 analogy_ni_pcimio

The error trace is attached (dmesg_07Jan2010.txt). I also attached the
kernel config as you asked: (config_analogy).

However the device /dev/analogy0 does not seem to be created.

The content of /proc/analogy/drivers is:

--  Analogy drivers --

| idx | driver name
|  00 | analogy_ni_pcimio
|  01 | analogy_8255

/proc/analogy/devices is:

--  Analogy devices --

| idx | status | driver
|  00 | Linked | analogy_ni_pcimio
|  01 | Unused | No driver
|  02 | Unused | No driver
|  03 | Unused | No driver
|  04 | Unused | No driver
|  05 | Unused | No driver
|  06 | Unused | No driver
|  07 | Unused | No driver
|  08 | Unused | No driver
|  09 | Unused | No driver

/proc/analogy/00-analogy_ni_pcimio

--  Subdevices --

| idx | type
|  00 | Unused subdevice
|  01 | Analog output subdevice
|  02 | Digital input/output subdevice
|  03 | Unused subdevice
|  04 | Unused subdevice
|  05 | Calibration subdevice
|  06 | Memory subdevice
|  07 | Digital input/output subdevice
|  08 | Unused subdevice
|  09 | Serial subdevice
|  10 | Unused subdevice
|  11 | Counter subdevice
|  12 | Counter subdevice
|  13 | Counter subdevice

When I try cmd_write I get this

cmd_write: triggering failed (ret=-16)

I was expecting complaints about /dev/analogy0 not existing. I'm confused.

Progress though!

Ettore

[-- Attachment #2: dmesg07Jan2010.txt --]
[-- Type: text/plain, Size: 25844 bytes --]

Linux version 2.6.32.2 (root@fangorn) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 SMP PREEMPT Thu Jan 7 09:49:39 PST 2010
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009a800 (usable)
 BIOS-e820: 000000000009a800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 00000000bff70000 (usable)
 BIOS-e820: 00000000bff70000 - 00000000bff77000 (ACPI data)
 BIOS-e820: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ff800000 - 00000000ffc00000 (reserved)
 BIOS-e820: 00000000fffffc00 - 0000000100000000 (reserved)
user-defined physical RAM map:
 user: 0000000000000000 - 000000000009a800 (usable)
 user: 000000000009a800 - 00000000000a0000 (reserved)
 user: 00000000000e4000 - 0000000000100000 (reserved)
 user: 0000000000100000 - 0000000040000000 (usable)
 user: 00000000bff70000 - 00000000bff77000 (ACPI data)
 user: 00000000bff77000 - 00000000bff80000 (ACPI NVS)
 user: 00000000bff80000 - 00000000c0000000 (reserved)
 user: 00000000e0000000 - 00000000f0000000 (reserved)
 user: 00000000fec00000 - 00000000fec10000 (reserved)
 user: 00000000fee00000 - 00000000fee01000 (reserved)
 user: 00000000ff800000 - 00000000ffc00000 (reserved)
 user: 00000000fffffc00 - 0000000100000000 (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0x40000 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-C7FFF write-protect
  C8000-DFFFF uncachable
  E0000-FFFFF write-protect
MTRR variable ranges enabled:
  0 base 000000000 mask F80000000 write-back
  1 base 080000000 mask FC0000000 write-back
  2 base 0BFF80000 mask FFFF80000 uncachable
  3 disabled
  4 disabled
  5 disabled
  6 disabled
  7 disabled
Warning only 895MB will be used.
Use a HIGHMEM enabled kernel.
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000037f1e000
 0000000000 - 0000400000 page 4k
 0000400000 - 0037c00000 page 2M
 0037c00000 - 0037f1e000 page 4k
kernel direct mapping tables up to 37f1e000 @ 10000-15000
RAMDISK: 37e17000 - 37fef043
Allocated new RAMDISK: 00100000 - 002d8043
Move RAMDISK from 0000000037e17000 - 0000000037fef042 to 00100000 - 002d8042
895MB LOWMEM available.
  mapped low ram: 0 - 37f1e000
  low ram: 0 - 37f1e000
  node 0 low ram: 00000000 - 37f1e000
  node 0 bootmap 00011000 - 00017fe4
(9 early reservations) ==> bootmem [0000000000 - 0037f1e000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
  #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
  #3 [0001000000 - 0001327338]    TEXT DATA BSS ==> [0001000000 - 0001327338]
  #4 [000009a800 - 0000100000]    BIOS reserved ==> [000009a800 - 0000100000]
  #5 [0001328000 - 000132e170]              BRK ==> [0001328000 - 000132e170]
  #6 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #7 [0000100000 - 00002d8043]      NEW RAMDISK ==> [0000100000 - 00002d8043]
  #8 [0000011000 - 0000018000]          BOOTMAP ==> [0000011000 - 0000018000]
found SMP MP-table at [c00f5d90] f5d90
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00037f1e
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x00000100 -> 0x00037f1e
On node 0 totalpages: 229032
free_area_init_node: node 0, pgdat c1269900, node_mem_map c132f200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3946 pages, LIFO batch:0
  Normal zone: 1759 pages used for memmap
  Normal zone: 223295 pages, LIFO batch:31
Using APIC driver default
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
MPTABLE: OEM ID: INTEL   
MPTABLE: Product ID: Lindenhurst 
MPTABLE: APIC at: 0xFEE00000
Processor #0 (Bootup-CPU)
Processor #6
I/O APIC #2 Version 32 at 0xFEC00000.
I/O APIC #3 Version 32 at 0xFEC81000.
I/O APIC #4 Version 32 at 0xFEC81400.
Enabling APIC mode:  Flat.  Using 3 I/O APICs
Processors: 2
SMP: Allowing 2 CPUs, 0 hotplug CPUs
nr_irqs_gsi: 72
Allocating PCI resources starting at 40000000 (gap: 40000000:7ff70000)
NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
PERCPU: Embedded 13 pages/cpu @c1c00000 s30744 r0 d22504 u2097152
pcpu-alloc: s30744 r0 d22504 u2097152 alloc=1*4194304
pcpu-alloc: [0] 0 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227241
Kernel command line: root=LABEL=ROOTFS_TEST ro noht mem=2048M memmap=1024M pci=routeirq
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 902592k/916600k available (1830k kernel code, 13240k reserved, 650k data, 308k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff20000 - 0xfffff000   ( 892 kB)
    vmalloc : 0xf871e000 - 0xfff1e000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xf7f1e000   ( 895 MB)
      .init : 0xc126d000 - 0xc12ba000   ( 308 kB)
      .data : 0xc11c9a6b - 0xc126c618   ( 650 kB)
      .text : 0xc1000000 - 0xc11c9a6b   (1830 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
Hierarchical RCU implementation.
NR_IRQS:512
I-pipe 2.5-00: pipeline enabled.
Console: colour VGA+ 80x25
console [tty0] enabled
Fast TSC calibration using PIT
Detected 2999.720 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 5999.44 BogoMIPS (lpj=2999720)
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 4 MCE banks
CPU0: Thermal monitoring enabled (TM1)
Checking 'hlt' instruction... OK.
Freeing SMP alternatives: 10k freed
ExtINT not setup in hardware but reported by MP table
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 0) ...
....... works.
CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
Booting processor 1 APIC 0x6 ip 0x6000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5999.16 BogoMIPS (lpj=2999582)
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 3
CPU: Processor Core ID: 0
CPU1: Thermal monitoring enabled (TM1)
CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
Total of 2 processors activated (11998.60 BogoMIPS).
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd870, last bus=6
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:02.0: PME# disabled
pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
pci 0000:00:03.0: PME# disabled
pci 0000:00:04.0: PME# supported from D0 D3hot D3cold
pci 0000:00:04.0: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x1840-0x185f]
pci 0000:00:1d.1: reg 20 io port: [0x1860-0x187f]
pci 0000:00:1d.2: reg 20 io port: [0x1880-0x189f]
pci 0000:00:1d.3: reg 20 io port: [0x18a0-0x18bf]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xd0000000-0xd00003ff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 1180-11bf claimed by ICH4 GPIO
pci 0000:00:1f.2: reg 10 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 14 io port: [0x00-0x03]
pci 0000:00:1f.2: reg 18 io port: [0x00-0x07]
pci 0000:00:1f.2: reg 1c io port: [0x00-0x03]
pci 0000:00:1f.2: reg 20 io port: [0x18f0-0x18ff]
pci 0000:00:1f.3: reg 20 io port: [0x1100-0x111f]
pci 0000:00:1f.5: reg 10 io port: [0x1400-0x14ff]
pci 0000:00:1f.5: reg 14 io port: [0x1800-0x183f]
pci 0000:00:1f.5: reg 18 32bit mmio: [0xd0000c00-0xd0000dff]
pci 0000:00:1f.5: reg 1c 32bit mmio: [0xd0000800-0xd00008ff]
pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1f.5: PME# disabled
pci 0000:02:00.0: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.1: reg 10 32bit mmio: [0xd0100000-0xd0100fff]
pci 0000:02:00.2: PXH quirk detected; SHPC device MSI disabled
pci 0000:02:00.2: PME# supported from D0 D3hot D3cold
pci 0000:02:00.2: PME# disabled
pci 0000:02:00.3: reg 10 32bit mmio: [0xd0101000-0xd0101fff]
pci 0000:00:03.0: bridge io port: [0x2000-0x3fff]
pci 0000:00:03.0: bridge 32bit mmio: [0xd0100000-0xd08fffff]
pci 0000:03:03.0: reg 10 64bit mmio: [0xd0200000-0xd02fffff]
pci 0000:03:03.0: reg 18 io port: [0x2000-0x20ff]
pci 0000:02:00.0: bridge io port: [0x2000-0x2fff]
pci 0000:02:00.0: bridge 32bit mmio: [0xd0200000-0xd07fffff]
pci 0000:04:01.0: reg 10 32bit mmio: [0xd0801000-0xd0801fff]
pci 0000:04:01.0: reg 14 32bit mmio: [0xd0800000-0xd0800fff]
pci 0000:04:02.0: reg 10 64bit mmio: [0xd0820000-0xd083ffff]
pci 0000:04:02.0: reg 20 io port: [0x3000-0x303f]
pci 0000:04:02.0: PME# supported from D0 D3hot D3cold
pci 0000:04:02.0: PME# disabled
pci 0000:04:02.1: reg 10 64bit mmio: [0xd0840000-0xd085ffff]
pci 0000:04:02.1: reg 20 io port: [0x3040-0x307f]
pci 0000:04:02.1: PME# supported from D0 D3hot D3cold
pci 0000:04:02.1: PME# disabled
pci 0000:02:00.2: bridge io port: [0x3000-0x3fff]
pci 0000:02:00.2: bridge 32bit mmio: [0xd0800000-0xd08fffff]
pci 0000:05:00.0: reg 10 32bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:05:00.0: reg 14 io port: [0x4000-0x40ff]
pci 0000:05:00.0: reg 18 32bit mmio: [0xd0900000-0xd090ffff]
pci 0000:05:00.0: reg 30 32bit mmio pref: [0x000000-0x01ffff]
pci 0000:05:00.0: supports D1 D2
pci 0000:05:00.1: reg 10 32bit mmio: [0xd0910000-0xd091ffff]
pci 0000:05:00.1: supports D1 D2
pci 0000:00:04.0: bridge io port: [0x4000-0x4fff]
pci 0000:00:04.0: bridge 32bit mmio: [0xd0900000-0xd09fffff]
pci 0000:00:04.0: bridge 64bit mmio pref: [0xd8000000-0xdfffffff]
pci 0000:06:02.0: reg 10 32bit mmio: [0xd0a00000-0xd0a0ffff]
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge 32bit mmio: [0xd0a00000-0xd0afffff]
vgaarb: device added: PCI:0000:05:00.0,decodes=io+mem,owns=io+mem,locks=none
pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:24d0]
PCI: Routing PCI interrupts for all devices because "pci=routeirq" specified
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.1: PCI->APIC IRQ transform: INT B -> IRQ 19
pci 0000:00:1d.2: PCI->APIC IRQ transform: INT C -> IRQ 18
pci 0000:00:1d.3: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:1d.7: PCI->APIC IRQ transform: INT D -> IRQ 23
pci 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
pci 0000:00:1f.3: PCI->APIC IRQ transform: INT B -> IRQ 17
pci 0000:00:1f.5: PCI->APIC IRQ transform: INT B -> IRQ 17
pci 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
pci 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
pci 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
pci 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
pci 0000:05:00.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:06:02.0: PCI->APIC IRQ transform: INT A -> IRQ 20
Switching to clocksource tsc
pci 0000:00:02.0: PCI bridge, secondary bus 0000:01
pci 0000:00:02.0:   IO window: disabled
pci 0000:00:02.0:   MEM window: disabled
pci 0000:00:02.0:   PREFETCH window: disabled
pci 0000:02:00.0: PCI bridge, secondary bus 0000:03
pci 0000:02:00.0:   IO window: 0x2000-0x2fff
pci 0000:02:00.0:   MEM window: 0xd0200000-0xd07fffff
pci 0000:02:00.0:   PREFETCH window: disabled
pci 0000:02:00.2: PCI bridge, secondary bus 0000:04
pci 0000:02:00.2:   IO window: 0x3000-0x3fff
pci 0000:02:00.2:   MEM window: 0xd0800000-0xd08fffff
pci 0000:02:00.2:   PREFETCH window: disabled
pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
pci 0000:00:03.0:   IO window: 0x2000-0x3fff
pci 0000:00:03.0:   MEM window: 0xd0100000-0xd08fffff
pci 0000:00:03.0:   PREFETCH window: disabled
pci 0000:00:04.0: PCI bridge, secondary bus 0000:05
pci 0000:00:04.0:   IO window: 0x4000-0x4fff
pci 0000:00:04.0:   MEM window: 0xd0900000-0xd09fffff
pci 0000:00:04.0:   PREFETCH window: 0x000000d8000000-0x000000dfffffff
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
pci 0000:00:1e.0:   IO window: disabled
pci 0000:00:1e.0:   MEM window: 0xd0a00000-0xd0afffff
pci 0000:00:1e.0:   PREFETCH window: disabled
pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:03.0: setting latency timer to 64
pci 0000:02:00.0: setting latency timer to 64
pci 0000:02:00.2: setting latency timer to 64
pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 16
pci 0000:00:04.0: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:02: resource 0 io:  [0x2000-0x3fff]
pci_bus 0000:02: resource 1 mem: [0xd0100000-0xd08fffff]
pci_bus 0000:03: resource 0 io:  [0x2000-0x2fff]
pci_bus 0000:03: resource 1 mem: [0xd0200000-0xd07fffff]
pci_bus 0000:04: resource 0 io:  [0x3000-0x3fff]
pci_bus 0000:04: resource 1 mem: [0xd0800000-0xd08fffff]
pci_bus 0000:05: resource 0 io:  [0x4000-0x4fff]
pci_bus 0000:05: resource 1 mem: [0xd0900000-0xd09fffff]
pci_bus 0000:05: resource 2 pref mem [0xd8000000-0xdfffffff]
pci_bus 0000:06: resource 1 mem: [0xd0a00000-0xd0afffff]
pci_bus 0000:06: resource 3 io:  [0x00-0xffff]
pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
pci 0000:05:00.0: Boot video device
Unpacking initramfs...
Freeing initrd memory: 1888k freed
platform rtc_cmos: registered platform RTC device (no PNP device found)
audit: initializing netlink socket (disabled)
type=2000 audit(1262889524.287:1): initialized
I-pipe: Domain Xenomai registered.
Xenomai: hal/i386 started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.5.0 (Flying In A Blue Dream) loaded.
msgmni has been set to 1767
io scheduler noop registered
io scheduler deadline registered (default)
pcieport 0000:00:02.0: setting latency timer to 64
pcieport 0000:00:03.0: setting latency timer to 64
pcieport 0000:00:04.0: setting latency timer to 64
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Using IPI Shortcut mode
Freeing unused kernel memory: 308k freed
input: AT Translated Set 2 keyboard as /class/input/input0
NET: Registered protocol family 1
Intel(R) PRO/1000 Network Driver - version 7.3.21-k5-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e1000 0000:04:02.0: PCI->APIC IRQ transform: INT A -> IRQ 54
libata version 3.00 loaded.
sata_mv 0000:03:03.0: version 1.28
ata_piix 0000:00:1f.2: version 2.13
ata_piix 0000:00:1f.2: PCI->APIC IRQ transform: INT A -> IRQ 18
ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
ata_piix 0000:00:1f.2: setting latency timer to 64
sata_mv 0000:03:03.0: PCI->APIC IRQ transform: INT A -> IRQ 28
sata_mv 0000:03:03.0: Gen-II 32 slots 8 ports SCSI mode IRQ via INTx
scsi0 : ata_piix
scsi2 : ata_piix
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x18f0 irq 14
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x18f8 irq 15
scsi1 : sata_mv
scsi3 : sata_mv
scsi4 : sata_mv
scsi5 : sata_mv
scsi6 : sata_mv
scsi7 : sata_mv
scsi8 : sata_mv
scsi9 : sata_mv
ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 28
ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 28
ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 28
ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 28
ata7: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0232000 irq 28
ata8: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0234000 irq 28
ata9: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0236000 irq 28
ata10: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0238000 irq 28
ata2.00: ATA-7: HDT722525DLA380, V44OA96A, max UDMA/133
ata2.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: ATAPI: SONY    DVD RW DW-Q30A, YYS2, max UDMA/66
ata1.00: limited to UDMA/33 due to 40-wire cable
ata2.01: ATA-8: ST31000333AS, CC1H, max UDMA/133
ata2.01: 1953525168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133
ata1.00: configured for UDMA/33
scsi 0:0:0:0: CD-ROM            SONY     DVD RW DW-Q30A   YYS2 PQ: 0 ANSI: 5
ata2.01: configured for UDMA/133
scsi 2:0:0:0: Direct-Access     ATA      HDT722525DLA380  V44O PQ: 0 ANSI: 5
scsi 2:0:1:0: Direct-Access     ATA      ST31000333AS     CC1H PQ: 0 ANSI: 5
sd 2:0:1:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 2:0:1:0: [sdb] Write Protect is off
sd 2:0:1:0: [sdb] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb:
input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
e1000: 0000:04:02.0: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b6
 sdb1 sdb2 sdb3 sdb4
 sda:
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000 0000:04:02.1: PCI->APIC IRQ transform: INT B -> IRQ 55
 sda1 sda2 < sda5 >
sd 2:0:1:0: [sdb] Attached SCSI disk
sd 2:0:0:0: [sda] Attached SCSI disk
ata3: SATA link down (SStatus 0 SControl 300)
e1000: 0000:04:02.1: e1000_probe: (PCI:33MHz:64-bit) 00:30:48:2e:94:b7
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: WDC WD1001FALS-00J7B1, 05.00K05, max UDMA/133
ata4.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 3:0:0:0: Direct-Access     ATA      WDC WD1001FALS-0 05.0 PQ: 0 ANSI: 5
sd 3:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdc: sdc1 sdc2 sdc3
sd 3:0:0:0: [sdc] Attached SCSI disk
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-8: ST32000542AS, CC34, max UDMA/133
ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
scsi 4:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
sd 4:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 4:0:0:0: [sdd] Write Protect is off
sd 4:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdd: sdd1
sd 4:0:0:0: [sdd] Attached SCSI disk
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata6.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133
scsi 5:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 5:0:0:0: [sde] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 5:0:0:0: [sde] Write Protect is off
sd 5:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde: sde1 sde2 sde3
sd 5:0:0:0: [sde] Attached SCSI disk
ata7: SATA link down (SStatus 0 SControl 300)
ata8: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata8.00: ATA-7: ST3120813AS, 2AAA, max UDMA/133
ata8.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata8.00: configured for UDMA/133
scsi 7:0:0:0: Direct-Access     ATA      ST3120813AS      2AAA PQ: 0 ANSI: 5
sd 7:0:0:0: [sdf] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 7:0:0:0: [sdf] Write Protect is off
sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdf: sdf1 sdf2 sdf3
sd 7:0:0:0: [sdf] Attached SCSI disk
ata9: SATA link down (SStatus 0 SControl 300)
ata10: SATA link down (SStatus 0 SControl 300)
Uniform Multi-Platform E-IDE driver
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with writeback data mode.
udevd version 125 started
Xenomai: SMI-enabled chipset found
Xenomai: SMI workaround enabled
Xenomai: starting RTDM services.
Analogy: MITE: Available NI device IDs: 0x1880(used)
Analogy: a4l_add_drv: name=analogy_8255
Analogy: a4l_lct_drv: name=analogy_8255
Analogy: a4l_add_drv: name=analogy_ni_pcimio
Analogy: a4l_lct_drv: name=analogy_ni_pcimio
Adding 2650684k swap on /dev/sda5.  Priority:-1 extents:1 across:2650684k 
EXT3 FS on sda1, internal journal
Xenomai: starting native API services.
e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
warning: `ntpd' uses 32-bit capabilities (legacy support in use)
Analogy: a4l_rt_open: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_ioctl_devcfg: minor=0
Analogy: a4l_presetup_transfer: minor=0
Analogy: a4l_device_attach: minor=0
Analogy: a4l_fill_lnkdesc: minor=0
Analogy: a4l_lct_drv: name=analogy_ni_pcimio
Analogy: a4l_assign_driver: minor=0
Analogy: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
mite 0000:04:01.0: setting latency timer to 64
Analogy: MITE: 0xd0801000 mapped to f8e26000 
Analogy: DAQ: 0xd0800000 mapped to f8e2a000
Analogy: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
Analogy: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
Analogy: analogy_ni_pcimio: pcimio_attach: found irq 48
Analogy: analogy_ni_pcimio: mio_common: starting attach procedure...
Analogy: analogy_ni_pcimio: mio_common: registering AI subdevice...
Analogy: analogy_ni_pcimio: mio_common: AI subdevice not present
Analogy: analogy_ni_pcimio: mio_common: AI subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering AO subdevice...
Analogy: analogy_ni_pcimio: mio_common: AO: 4 channels
Analogy: analogy_ni_pcimio: mio_common: AO subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering DIO subdevice...
Analogy: analogy_ni_pcimio: mio_common: DIO: 8 channels
Analogy: analogy_ni_pcimio: mio_common: DIO subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering 8255 subdevice...
Analogy: analogy_ni_pcimio: mio_common: 8255 subdevice not present
Analogy: analogy_ni_pcimio: mio_common: 8255 subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering calib subdevice...
Analogy: analogy_ni_pcimio: mio_common: calib: common calibration
Analogy: analogy_ni_pcimio: mio_common: calib subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering EEPROM subdevice...
Analogy: analogy_ni_pcimio: mio_common: EEPROM: size = 512
Analogy: analogy_ni_pcimio: mio_common: EEPROM subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering PFI(DIO) subdevice...
Analogy: analogy_ni_pcimio: mio_common: PFI: 10 bits...
Analogy: analogy_ni_pcimio: mio_common: PFI subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering serial subdevice...
Analogy: analogy_ni_pcimio: mio_common: serial subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering GPCT[0] subdevice...
Analogy: analogy_ni_pcimio: mio_common: GPCT[0]: 24 bits
Analogy: analogy_ni_pcimio: mio_common: GPCT[0]: command feature available
Analogy: analogy_ni_pcimio: mio_common: GCPT[0] subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering GPCT[1] subdevice...
Analogy: analogy_ni_pcimio: mio_common: GPCT[1]: 24 bits
Analogy: analogy_ni_pcimio: mio_common: GPCT[1]: command feature available
Analogy: analogy_ni_pcimio: mio_common: GCPT[1] subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering counter subdevice...
Analogy: analogy_ni_pcimio: mio_common: counter subdevice registered
Analogy: analogy_ni_pcimio: mio_common: initializing AI...
Analogy: analogy_ni_pcimio: mio_common: AI initialization OK
Analogy: analogy_ni_pcimio: mio_common: initializing A0...
Analogy: analogy_ni_pcimio: mio_common: A0 initialization OK
Analogy: analogy_ni_pcimio: mio_common: DMA setup
Analogy: analogy_ni_pcimio: mio_common: attach procedure complete
Analogy: a4l_free_lnkdesc: minor=0
Analogy: a4l_setup_transfer: minor=0
Analogy: a4l_rt_close: minor=0

[-- Attachment #3: config_analogy_debug --]
[-- Type: application/octet-stream, Size: 41058 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.2
# Wed Jan  6 03:51:23 2010
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_X86_32_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_X86_32_LAZY_GS=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_TREE_PREEMPT_RCU is not set
# CONFIG_RCU_TRACE is not set
CONFIG_RCU_FANOUT=32
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=15
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
# CONFIG_GROUP_SCHED is not set
# CONFIG_CGROUPS is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
# CONFIG_PERF_EVENTS is not set
# CONFIG_PERF_COUNTERS is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_API_DEBUG=y

#
# GCOV-based kernel profiling
#
# CONFIG_SLOW_WORK is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"

#
# Real-time sub-system
#
CONFIG_XENOMAI=y
CONFIG_XENO_GENERIC_STACKPOOL=y
CONFIG_XENO_FASTSYNCH=y
CONFIG_XENO_OPT_NUCLEUS=y
CONFIG_XENO_OPT_PERVASIVE=y
CONFIG_XENO_OPT_PRIOCPL=y
CONFIG_XENO_OPT_PIPELINE_HEAD=y
# CONFIG_XENO_OPT_SCHED_CLASSES is not set
CONFIG_XENO_OPT_PIPE=y
CONFIG_XENO_OPT_PIPE_NRDEV=32
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512
CONFIG_XENO_OPT_SYS_HEAPSZ=2048
CONFIG_XENO_OPT_SYS_STACKPOOLSZ=32
CONFIG_XENO_OPT_SEM_HEAPSZ=12
CONFIG_XENO_OPT_GLOBAL_SEM_HEAPSZ=12
CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
# CONFIG_XENO_OPT_SHIRQ is not set
CONFIG_XENO_OPT_SELECT=y

#
# Timing
#
# CONFIG_XENO_OPT_TIMING_PERIODIC is not set
CONFIG_XENO_OPT_TIMING_VIRTICK=1000
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0

#
# Scalability
#
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set
# CONFIG_XENO_OPT_TIMER_WHEEL is not set

#
# Machine
#
CONFIG_XENO_HW_FPU=y

#
# NMI watchdog
#
# CONFIG_XENO_HW_NMI_DEBUG_LATENCY is not set

#
# SMI workaround
#
# CONFIG_XENO_HW_SMI_DETECT_DISABLE is not set
CONFIG_XENO_HW_SMI_DETECT=y
CONFIG_XENO_HW_SMI_WORKAROUND=y
CONFIG_XENO_HW_SMI_ALL=y

#
# Interfaces
#
CONFIG_XENO_SKIN_NATIVE=m
CONFIG_XENO_OPT_NATIVE_PERIOD=0
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=65536
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_BUFFER=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
CONFIG_XENO_OPT_NATIVE_INTR=y
CONFIG_XENO_SKIN_POSIX=m
CONFIG_XENO_OPT_POSIX_PERIOD=0
# CONFIG_XENO_OPT_POSIX_SHM is not set
# CONFIG_XENO_OPT_POSIX_INTR is not set
# CONFIG_XENO_OPT_POSIX_SELECT is not set
CONFIG_XENO_OPT_DEBUG_POSIX=y
# CONFIG_XENO_SKIN_PSOS is not set
# CONFIG_XENO_SKIN_UITRON is not set
# CONFIG_XENO_SKIN_VRTX is not set
# CONFIG_XENO_SKIN_VXWORKS is not set
# CONFIG_XENO_SKIN_RTAI is not set
# CONFIG_XENO_OPT_NOWARN_DEPRECATED is not set
CONFIG_XENO_SKIN_RTDM=m
CONFIG_XENO_OPT_RTDM_PERIOD=0
CONFIG_XENO_OPT_RTDM_FILDES=128
CONFIG_XENO_OPT_RTDM_SELECT=y

#
# Drivers
#

#
# Serial drivers
#
# CONFIG_XENO_DRIVERS_16550A is not set

#
# Testing drivers
#
CONFIG_XENO_TESTING_MODULE=m
# CONFIG_XENO_DRIVERS_TIMERBENCH is not set
# CONFIG_XENO_DRIVERS_IRQBENCH is not set
# CONFIG_XENO_DRIVERS_SWITCHTEST is not set
# CONFIG_XENO_DRIVERS_SIGTEST is not set

#
# CAN drivers
#
# CONFIG_XENO_DRIVERS_CAN is not set

#
# ANALOGY drivers
#
CONFIG_XENO_DRIVERS_ANALOGY=m
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=1
CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1
# CONFIG_XENO_DRIVERS_ANALOGY_FAKE is not set
# CONFIG_XENO_DRIVERS_ANALOGY_LOOP is not set
CONFIG_XENO_DRIVERS_ANALOGY_8255=m
# CONFIG_XENO_DRIVERS_ANALOGY_PARPORT is not set
CONFIG_XENO_DRIVERS_ANALOGY_NI_MITE=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_TIO=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_MIO=m
CONFIG_XENO_DRIVERS_ANALOGY_NI_PCIMIO=m

#
# Real-time IPC drivers
#
# CONFIG_XENO_DRIVERS_RTIPC is not set
# CONFIG_FREEZER is not set

#
# Processor type and features
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
# CONFIG_SPARSE_IRQ is not set
CONFIG_X86_MPPARSE=y
# CONFIG_X86_BIGSMP is not set
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_MRST is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_32_NON_STANDARD is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_MEMTEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CPU=y
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=5
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_CYRIX_32=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_CPU_SUP_UMC_32=y
# CONFIG_X86_DS is not set
# CONFIG_HPET_TIMER is not set
CONFIG_DMI=y
# CONFIG_IOMMU_HELPER is not set
# CONFIG_IOMMU_API is not set
CONFIG_NR_CPUS=8
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_IPIPE=y
CONFIG_IPIPE_DOMAINS=4
CONFIG_IPIPE_COMPAT=y
CONFIG_IPIPE_DELAYED_ATOMICSW=y
# CONFIG_IPIPE_UNMASKED_CONTEXT_SWITCH is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
# CONFIG_X86_MCE_AMD is not set
# CONFIG_X86_ANCIENT_MCE is not set
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_X86_CPU_DEBUG is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_X86_PAE is not set
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
# CONFIG_KSM is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_MEMORY_FAILURE is not set
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW_64K=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
# CONFIG_X86_PAT is not set
CONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
# CONFIG_SCHED_HRTICK is not set
# CONFIG_KEXEC is not set
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
# CONFIG_HOTPLUG_CPU is not set
CONFIG_COMPAT_VDSO=y
# CONFIG_CMDLINE_BOOL is not set

#
# Power management and ACPI options
#
# CONFIG_PM is not set
# CONFIG_SFI is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
# CONFIG_CPU_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
# CONFIG_PCI_GOOLPC is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
# CONFIG_PCIE_ECRC is not set
# CONFIG_PCIEAER_INJECT is not set
# CONFIG_PCIEASPM is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_STUB is not set
CONFIG_HT_IRQ=y
# CONFIG_PCI_IOV is not set
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
# CONFIG_OLPC is not set
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_HAVE_AOUT=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y
CONFIG_HAVE_ATOMIC_IOMAP=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=m
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_XFRM_MODE_BEET=m
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
# CONFIG_NF_CONNTRACK is not set
# CONFIG_NETFILTER_XTABLES is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV4 is not set
CONFIG_IP_NF_QUEUE=y
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_DEVTMPFS is not set
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
# CONFIG_BLK_DEV is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=m

#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_XFER_MODE=y
CONFIG_IDE_TIMINGS=y
CONFIG_IDE_ATAPI=y
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_IDE_GD=m
CONFIG_IDE_GD_ATA=y
# CONFIG_IDE_GD_ATAPI is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_PLATFORM is not set
CONFIG_BLK_DEV_CMD640=m
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=m
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_RZ1000=m
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_CS5536 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8172 is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
# CONFIG_BLK_DEV_IDEDMA is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_SATA_PMP=y
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
# CONFIG_SATA_SVW is not set
CONFIG_ATA_PIIX=m
CONFIG_SATA_MV=m
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_SCH is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#

#
# You can enable one or both FireWire driver stacks.
#

#
# See the help texts for more information.
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_ETHOC is not set
# CONFIG_DNET is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
CONFIG_8139TOO=m
CONFIG_8139TOO_PIO=y
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SMSC9420 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_KS8842 is not set
# CONFIG_KS8851_MLL is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NET_POCKET is not set
# CONFIG_ATL2 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=m
# CONFIG_E1000E is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
CONFIG_WLAN=y
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_VMXNET3 is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_DEVKMEM=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=m
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=m
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
# CONFIG_I2C_CHARDEV is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_SIMTEC is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set

#
# Graphics adapter I2C/DDC channel drivers
#
# CONFIG_I2C_VOODOO3 is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_STUB is not set
# CONFIG_SCx200_ACB is not set

#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_SPI is not set

#
# PPS support
#
# CONFIG_PPS is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7473 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_AB3100_CORE is not set
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set

#
# Graphics support
#
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_VGA_ARB=y
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
# CONFIG_HIDRAW is not set
# CONFIG_HID_PID is not set

#
# Special HID drivers
#
# CONFIG_USB_SUPPORT is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set

#
# TI VLYNQ
#
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_ISCSI_IBFT_FIND is not set

#
# File systems
#
CONFIG_EXT2_FS=m
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
# CONFIG_EXT4_FS is not set
CONFIG_JBD=m
CONFIG_FS_MBCACHE=m
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
# CONFIG_FUSE_FS is not set

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
# CONFIG_DLM is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_UNUSED_SYMBOLS=y
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
# CONFIG_IPIPE_DEBUG is not set
# CONFIG_DEBUG_KERNEL is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_STRICT_DEVMEM is not set
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_4KSTACKS is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_IOMMU_STRESS is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_OPTIMIZE_INLINING is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_ALGAPI2=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_HASH2=m
# CONFIG_CRYPTO_MANAGER is not set
# CONFIG_CRYPTO_MANAGER2 is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
# CONFIG_CRYPTO_CBC is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set
# CONFIG_BINARY_PRINTF is not set

#
# Library routines
#
CONFIG_BITREVERSE=m
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_FIND_LAST_BIT=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=m
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-07 19:24                                           ` Ettore Pedretti
@ 2010-01-07 21:58                                             ` Alexis Berlemont
  2010-01-08 11:14                                               ` Ettore Pedretti
  2010-01-07 22:18                                             ` Alexis Berlemont
  1 sibling, 1 reply; 35+ messages in thread
From: Alexis Berlemont @ 2010-01-07 21:58 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Hi,

Ettore Pedretti wrote:
> Hi,
> 
> I did not quite understand how to checkout  the analogy branch. When I
> do git branch -a either in xenomai-head or in xenomai-2.5 I get only:
> 
> * master
>   origin/HEAD
>   origin/master
> 
> no other branch is available for checkout. I'm obviously missing something.
> 
> I tried to apply the patch but it failed. At the end I edited
> mio_common.c directly. I hope I did not introduce any error.
> Everything compiled and installed fine.
> 
> The attach command did not complain this time:
> 
> analogy_config analogy0 analogy_ni_pcimio
> 
> The error trace is attached (dmesg_07Jan2010.txt). I also attached the
> kernel config as you asked: (config_analogy).
> 
> However the device /dev/analogy0 does not seem to be created.

That's the common behaviour. The dev files you find in the /dev
directory belong to the Linux drivers. The RTDM dev nodes can be listed
in the following proc file:

# cat /proc/xenomai/rtdm/named_devices
Hash Name Driver /proc
1B analogy0 rtdm_analogy analogy0
1C analogy1 rtdm_analogy analogy1
1D analogy2 rtdm_analogy analogy2
1E analogy3 rtdm_analogy analogy3
1F analogy4 rtdm_analogy analogy4
20 analogy5 rtdm_analogy analogy5
21 analogy6 rtdm_analogy analogy6
22 analogy7 rtdm_analogy analogy7
23 analogy8 rtdm_analogy analogy8
24 analogy9 rtdm_analogy analogy9

Roughly, a user application which communicates with RTDM drivers does
not use the same channels as a user application which communicates with
Linux drivers. Unlike Linux' ones, the RTDM devices are not reachable
through specific files.

So, instead of calling open("/dev/analogy0",...), we call
rtdm_open("analogy0", ...).

> 
> The content of /proc/analogy/drivers is:
> 
> --  Analogy drivers --
> 
> | idx | driver name
> |  00 | analogy_ni_pcimio
> |  01 | analogy_8255
> 
> /proc/analogy/devices is:
> 
> --  Analogy devices --
> 
> | idx | status | driver
> |  00 | Linked | analogy_ni_pcimio
> |  01 | Unused | No driver
> |  02 | Unused | No driver
> |  03 | Unused | No driver
> |  04 | Unused | No driver
> |  05 | Unused | No driver
> |  06 | Unused | No driver
> |  07 | Unused | No driver
> |  08 | Unused | No driver
> |  09 | Unused | No driver
Ok. The attach procedure went well.

> 
> /proc/analogy/00-analogy_ni_pcimio
> 
> --  Subdevices --
> 
> | idx | type
> |  00 | Unused subdevice
> |  01 | Analog output subdevice
> |  02 | Digital input/output subdevice
> |  03 | Unused subdevice
> |  04 | Unused subdevice
> |  05 | Calibration subdevice
> |  06 | Memory subdevice
> |  07 | Digital input/output subdevice
> |  08 | Unused subdevice
> |  09 | Serial subdevice
> |  10 | Unused subdevice
> |  11 | Counter subdevice
> |  12 | Counter subdevice
> |  13 | Counter subdevice
> 
> When I try cmd_write I get this
> 
> cmd_write: triggering failed (ret=-16)
-16 means -EBUSY. Did you get this error at the first launch?

Before checking asynchronous writes (with cmd_write), could you test the
synchronous writes (with insn_write)?

> 
> I was expecting complaints about /dev/analogy0 not existing. I'm confused.
> 
> Progress though!
> 
> Ettore
> 

Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-07 19:24                                           ` Ettore Pedretti
  2010-01-07 21:58                                             ` Alexis Berlemont
@ 2010-01-07 22:18                                             ` Alexis Berlemont
  1 sibling, 0 replies; 35+ messages in thread
From: Alexis Berlemont @ 2010-01-07 22:18 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

Ettore Pedretti wrote:
> Hi,
> 
> I did not quite understand how to checkout  the analogy branch. When I
> do git branch -a either in xenomai-head or in xenomai-2.5 I get only:
> 
> * master
>   origin/HEAD
>   origin/master
> 
> no other branch is available for checkout. I'm obviously missing something.
The analogy branch is located in my repository. So you need to add my
repository as a remote one:
git remote add xenomai-abe git://xenomai.org/xenomai-abe.git
git fetch xenomai-abe


Now, the branch should be available:
git branch -r
...
    xenomai-abe/analogy
...

You just have to create a new branch on your repo:
git branch --track xenomai-abe/analogy analogy

> 
> I tried to apply the patch but it failed. At the end I edited
> mio_common.c directly. I hope I did not introduce any error.
> Everything compiled and installed fine.
> 
> The attach command did not complain this time:
> 
> analogy_config analogy0 analogy_ni_pcimio
> 
> The error trace is attached (dmesg_07Jan2010.txt). I also attached the
> kernel config as you asked: (config_analogy).
> 
> However the device /dev/analogy0 does not seem to be created.
> 
> The content of /proc/analogy/drivers is:
> 
> --  Analogy drivers --
> 
> | idx | driver name
> |  00 | analogy_ni_pcimio
> |  01 | analogy_8255
> 
> /proc/analogy/devices is:
> 
> --  Analogy devices --
> 
> | idx | status | driver
> |  00 | Linked | analogy_ni_pcimio
> |  01 | Unused | No driver
> |  02 | Unused | No driver
> |  03 | Unused | No driver
> |  04 | Unused | No driver
> |  05 | Unused | No driver
> |  06 | Unused | No driver
> |  07 | Unused | No driver
> |  08 | Unused | No driver
> |  09 | Unused | No driver
> 
> /proc/analogy/00-analogy_ni_pcimio
> 
> --  Subdevices --
> 
> | idx | type
> |  00 | Unused subdevice
> |  01 | Analog output subdevice
> |  02 | Digital input/output subdevice
> |  03 | Unused subdevice
> |  04 | Unused subdevice
> |  05 | Calibration subdevice
> |  06 | Memory subdevice
> |  07 | Digital input/output subdevice
> |  08 | Unused subdevice
> |  09 | Serial subdevice
> |  10 | Unused subdevice
> |  11 | Counter subdevice
> |  12 | Counter subdevice
> |  13 | Counter subdevice
> 
> When I try cmd_write I get this
> 
> cmd_write: triggering failed (ret=-16)
> 
> I was expecting complaints about /dev/analogy0 not existing. I'm confused.
> 
> Progress though!
> 
> Ettore
> 
Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-07 21:58                                             ` Alexis Berlemont
@ 2010-01-08 11:14                                               ` Ettore Pedretti
  2010-02-09 17:21                                                 ` Felipe Brandão Cavalcanti
  0 siblings, 1 reply; 35+ messages in thread
From: Ettore Pedretti @ 2010-01-08 11:14 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

Hi,

I started from scratch by rebooting the system.

analogy_config analogy0 analogy_ni_pcimio

insn_write (no output)

Relevant error trace:
Analogy: a4l_rt_open: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_ioctl_devcfg: minor=0
Analogy: a4l_presetup_transfer: minor=0
Analogy: a4l_device_attach: minor=0
Analogy: a4l_fill_lnkdesc: minor=0
Analogy: a4l_lct_drv: name=analogy_ni_pcimio
Analogy: a4l_assign_driver: minor=0
Analogy: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
mite 0000:04:01.0: setting latency timer to 64
Analogy: MITE: 0xd0801000 mapped to f8e26000
Analogy: DAQ: 0xd0800000 mapped to f8e2a000
Analogy: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
Analogy: MITE: num channels = 3, write post fifo depth = 1, wins = 0, iowins = 2
Analogy: analogy_ni_pcimio: pcimio_attach: found irq 48
Analogy: analogy_ni_pcimio: mio_common: starting attach procedure...
Analogy: analogy_ni_pcimio: mio_common: registering AI subdevice...
Analogy: analogy_ni_pcimio: mio_common: AI subdevice not present
Analogy: analogy_ni_pcimio: mio_common: AI subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering AO subdevice...
Analogy: analogy_ni_pcimio: mio_common: AO: 4 channels
Analogy: analogy_ni_pcimio: mio_common: AO subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering DIO subdevice...
Analogy: analogy_ni_pcimio: mio_common: DIO: 8 channels
Analogy: analogy_ni_pcimio: mio_common: DIO subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering 8255 subdevice...
Analogy: analogy_ni_pcimio: mio_common: 8255 subdevice not present
Analogy: analogy_ni_pcimio: mio_common: 8255 subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering calib subdevice...
Analogy: analogy_ni_pcimio: mio_common: calib: common calibration
Analogy: analogy_ni_pcimio: mio_common: calib subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering EEPROM subdevice...
Analogy: analogy_ni_pcimio: mio_common: EEPROM: size = 512
Analogy: analogy_ni_pcimio: mio_common: EEPROM subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering PFI(DIO) subdevice...
Analogy: analogy_ni_pcimio: mio_common: PFI: 10 bits...
Analogy: analogy_ni_pcimio: mio_common: PFI subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering serial subdevice...
Analogy: analogy_ni_pcimio: mio_common: serial subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering GPCT[0] subdevice...
Analogy: analogy_ni_pcimio: mio_common: GPCT[0]: 24 bits
Analogy: analogy_ni_pcimio: mio_common: GPCT[0]: command feature available
Analogy: analogy_ni_pcimio: mio_common: GCPT[0] subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering GPCT[1] subdevice...
Analogy: analogy_ni_pcimio: mio_common: GPCT[1]: 24 bits
Analogy: analogy_ni_pcimio: mio_common: GPCT[1]: command feature available
Analogy: analogy_ni_pcimio: mio_common: GCPT[1] subdevice registered
Analogy: analogy_ni_pcimio: mio_common: registering counter subdevice...
Analogy: analogy_ni_pcimio: mio_common: counter subdevice registered
Analogy: analogy_ni_pcimio: mio_common: initializing AI...
Analogy: analogy_ni_pcimio: mio_common: AI initialization OK
Analogy: analogy_ni_pcimio: mio_common: initializing A0...
Analogy: analogy_ni_pcimio: mio_common: A0 initialization OK
Analogy: analogy_ni_pcimio: mio_common: DMA setup
Analogy: analogy_ni_pcimio: mio_common: attach procedure complete
Analogy: a4l_free_lnkdesc: minor=0
Analogy: a4l_setup_transfer: minor=0
Analogy: a4l_rt_close: minor=0
Analogy: a4l_rt_open: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_ioctl_devinfo: minor=0
Analogy: a4l_rt_ioctl: minor=0
---------------> snip <-----------------
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_reserve_transfer: minor=0 idx=1
Analogy: a4l_rt_close: minor=0

Then typed:
cmd_write
cmd_write: triggering failed (ret=-16)

error trace:

Analogy: a4l_rt_open: minor=0
Analogy: a4l_rt_ioctl: minor=0
---------------> snip <-----------------
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_ioctl_cancel: subdevice currently idle
Analogy: a4l_rt_ioctl: minor=0
Analogy: a4l_ioctl_cmd: minor=0
Analogy: a4l_fill_cmddesc: desc dump
Analogy: 	->idx_subd=1
Analogy: 	->flags=0
Analogy: 	->nb_chan=2
Analogy: 	->chan_descs=0x0
Analogy: 	->data_len=0
Analogy: 	->pdata=0x(null)
Analogy: a4l_check_cmddesc: minor=0
Analogy: a4l_ioctl_cmd: 1st cmd checks passed
Analogy: a4l_ioctl_cmd: driver's cmd checks passed
Analogy: a4l_reserve_transfer: minor=0 idx=1
Analogy: a4l_init_transfer: minor=0 idx=1
Analogy: a4l_rt_write: minor=0
Analogy: a4l_rt_ioctl: minor=0
Analogy: analogy_ni_pcimio: ni_request_ao_mite_channel: failed to
reserve mite dma channel for analog outut.
Analogy: a4l_rt_close: minor=0

Hope this helps
Ettore


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-01-08 11:14                                               ` Ettore Pedretti
@ 2010-02-09 17:21                                                 ` Felipe Brandão Cavalcanti
  2010-02-10 23:00                                                   ` Alexis Berlemont
  2010-02-10 23:03                                                   ` Alexis Berlemont
  0 siblings, 2 replies; 35+ messages in thread
From: Felipe Brandão Cavalcanti @ 2010-02-09 17:21 UTC (permalink / raw)
  To: Ettore Pedretti; +Cc: xenomai

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

Hello,

I just installed Xenomai 2.5.1, however, I am having the exact same problem
- the computer completely crashes when running analogy_config analogy0
analogy_ni_pcimio. However, I could not get any significant debug info
before the system crashes.

This is the exact behavior I had with Xenomai 2.5.0.

I am running Ubuntu 9.04 on a with a AMD Sempron 2800+ with a National
Instruments 6221-37 DAQ card. Xenomai seems to be running pretty well.

So, is this a known issue? Can I help with the debug messages/logs in any
way?

Thanks for the help,
     -Felipe Brandão Cavalcanti

(Sorry to reply to such an old thread.. but my problem seemed a lot like
this one.)

On Fri, Jan 8, 2010 at 9:14 AM, Ettore Pedretti <epedrett@domain.hid> wrote:

> Hi,
>
> I started from scratch by rebooting the system.
>
> analogy_config analogy0 analogy_ni_pcimio
>
> insn_write (no output)
>
> Relevant error trace:
> Analogy: a4l_rt_open: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_ioctl_devcfg: minor=0
> Analogy: a4l_presetup_transfer: minor=0
> Analogy: a4l_device_attach: minor=0
> Analogy: a4l_fill_lnkdesc: minor=0
> Analogy: a4l_lct_drv: name=analogy_ni_pcimio
> Analogy: a4l_assign_driver: minor=0
> Analogy: analogy_ni_pcimio: pcimio_attach: found pci-6711 board
> mite 0000:04:01.0: PCI->APIC IRQ transform: INT A -> IRQ 48
> mite 0000:04:01.0: setting latency timer to 64
> Analogy: MITE: 0xd0801000 mapped to f8e26000
> Analogy: DAQ: 0xd0800000 mapped to f8e2a000
> Analogy: MITE: version = 1, type = 1, mite mode = 1, interface mode = 3
> Analogy: MITE: num channels = 3, write post fifo depth = 1, wins = 0,
> iowins = 2
> Analogy: analogy_ni_pcimio: pcimio_attach: found irq 48
> Analogy: analogy_ni_pcimio: mio_common: starting attach procedure...
> Analogy: analogy_ni_pcimio: mio_common: registering AI subdevice...
> Analogy: analogy_ni_pcimio: mio_common: AI subdevice not present
> Analogy: analogy_ni_pcimio: mio_common: AI subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering AO subdevice...
> Analogy: analogy_ni_pcimio: mio_common: AO: 4 channels
> Analogy: analogy_ni_pcimio: mio_common: AO subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering DIO subdevice...
> Analogy: analogy_ni_pcimio: mio_common: DIO: 8 channels
> Analogy: analogy_ni_pcimio: mio_common: DIO subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering 8255 subdevice...
> Analogy: analogy_ni_pcimio: mio_common: 8255 subdevice not present
> Analogy: analogy_ni_pcimio: mio_common: 8255 subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering calib subdevice...
> Analogy: analogy_ni_pcimio: mio_common: calib: common calibration
> Analogy: analogy_ni_pcimio: mio_common: calib subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering EEPROM subdevice...
> Analogy: analogy_ni_pcimio: mio_common: EEPROM: size = 512
> Analogy: analogy_ni_pcimio: mio_common: EEPROM subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering PFI(DIO) subdevice...
> Analogy: analogy_ni_pcimio: mio_common: PFI: 10 bits...
> Analogy: analogy_ni_pcimio: mio_common: PFI subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering serial subdevice...
> Analogy: analogy_ni_pcimio: mio_common: serial subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering GPCT[0] subdevice...
> Analogy: analogy_ni_pcimio: mio_common: GPCT[0]: 24 bits
> Analogy: analogy_ni_pcimio: mio_common: GPCT[0]: command feature available
> Analogy: analogy_ni_pcimio: mio_common: GCPT[0] subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering GPCT[1] subdevice...
> Analogy: analogy_ni_pcimio: mio_common: GPCT[1]: 24 bits
> Analogy: analogy_ni_pcimio: mio_common: GPCT[1]: command feature available
> Analogy: analogy_ni_pcimio: mio_common: GCPT[1] subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: registering counter subdevice...
> Analogy: analogy_ni_pcimio: mio_common: counter subdevice registered
> Analogy: analogy_ni_pcimio: mio_common: initializing AI...
> Analogy: analogy_ni_pcimio: mio_common: AI initialization OK
> Analogy: analogy_ni_pcimio: mio_common: initializing A0...
> Analogy: analogy_ni_pcimio: mio_common: A0 initialization OK
> Analogy: analogy_ni_pcimio: mio_common: DMA setup
> Analogy: analogy_ni_pcimio: mio_common: attach procedure complete
> Analogy: a4l_free_lnkdesc: minor=0
> Analogy: a4l_setup_transfer: minor=0
> Analogy: a4l_rt_close: minor=0
> Analogy: a4l_rt_open: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_ioctl_devinfo: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> ---------------> snip <-----------------
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_reserve_transfer: minor=0 idx=1
> Analogy: a4l_rt_close: minor=0
>
> Then typed:
> cmd_write
> cmd_write: triggering failed (ret=-16)
>
> error trace:
>
> Analogy: a4l_rt_open: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> ---------------> snip <-----------------
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_ioctl_cancel: subdevice currently idle
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: a4l_ioctl_cmd: minor=0
> Analogy: a4l_fill_cmddesc: desc dump
> Analogy:        ->idx_subd=1
> Analogy:        ->flags=0
> Analogy:        ->nb_chan=2
> Analogy:        ->chan_descs=0x0
> Analogy:        ->data_len=0
> Analogy:        ->pdata=0x(null)
> Analogy: a4l_check_cmddesc: minor=0
> Analogy: a4l_ioctl_cmd: 1st cmd checks passed
> Analogy: a4l_ioctl_cmd: driver's cmd checks passed
> Analogy: a4l_reserve_transfer: minor=0 idx=1
> Analogy: a4l_init_transfer: minor=0 idx=1
> Analogy: a4l_rt_write: minor=0
> Analogy: a4l_rt_ioctl: minor=0
> Analogy: analogy_ni_pcimio: ni_request_ao_mite_channel: failed to
> reserve mite dma channel for analog outut.
> Analogy: a4l_rt_close: minor=0
>
> Hope this helps
> Ettore
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>



-- 
      -Felipe Brandão Cavalcanti
      LARA - Robotics and Automation Laboratory
      Department of Electrical Engineering
      UnB - University of Brasília, Brazil
      http://www.lara.unb.br/~fbcavalcanti/

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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-02-09 17:21                                                 ` Felipe Brandão Cavalcanti
@ 2010-02-10 23:00                                                   ` Alexis Berlemont
  2010-02-10 23:03                                                   ` Alexis Berlemont
  1 sibling, 0 replies; 35+ messages in thread
From: Alexis Berlemont @ 2010-02-10 23:00 UTC (permalink / raw)
  To: Felipe Brandão Cavalcanti; +Cc: xenomai

Hi,

Felipe Brandão Cavalcanti wrote:
> Hello,
> 
> I just installed Xenomai 2.5.1, however, I am having the exact same 
> problem - the computer completely crashes when running analogy_config 
> analogy0 analogy_ni_pcimio. However, I could not get any significant 
> debug info before the system crashes.
> 
> This is the exact behavior I had with Xenomai 2.5.0.
> 
> I am running Ubuntu 9.04 on a with a AMD Sempron 2800+ with a National 
> Instruments 6221-37 DAQ card. Xenomai seems to be running pretty well.
I am surprised that it is the same bug. If I remember well, there were 
two bugs:
- the first one was specific to NI 67xx cards and was fixed
- the second one was supposed to be fixed with the following commits:
analogy: [NI mite] initialize the mite structures after their allocations
analogy: [NI mite] initialize channels' status

I am afraid we are facing a bright new one...

> 
> So, is this a known issue? Can I help with the debug messages/logs in 
> any way?
Even if your system crashes, you might be able to catch the log traces 
printed just before. In such a case, could you set the analogy debug 
options like this:
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=0
CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1

And send your kernel traces, after having launched the attach procedure 
(which, if I understand well, should have triggered the bug).

> 
> Thanks for the help,
>      -Felipe Brandão Cavalcanti
> 
> (Sorry to reply to such an old thread.. but my problem seemed a lot like 
> this one.)
> 
Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
  2010-02-09 17:21                                                 ` Felipe Brandão Cavalcanti
  2010-02-10 23:00                                                   ` Alexis Berlemont
@ 2010-02-10 23:03                                                   ` Alexis Berlemont
  1 sibling, 0 replies; 35+ messages in thread
From: Alexis Berlemont @ 2010-02-10 23:03 UTC (permalink / raw)
  To: Felipe Brandão Cavalcanti; +Cc: xenomai

Hi,

Felipe Brandão Cavalcanti wrote:
> Hello,
> 
> I just installed Xenomai 2.5.1, however, I am having the exact same 
> problem - the computer completely crashes when running analogy_config 
> analogy0 analogy_ni_pcimio. However, I could not get any significant 
> debug info before the system crashes.
> 
> This is the exact behavior I had with Xenomai 2.5.0.
> 
> I am running Ubuntu 9.04 on a with a AMD Sempron 2800+ with a National 
> Instruments 6221-37 DAQ card. Xenomai seems to be running pretty well.
I am surprised that it is the same bug. If I remember well, there were
two bugs:
- the first one was specific to NI 67xx cards and was fixed
- the second one was supposed to be fixed with the following commits:
analogy: [NI mite] initialize the mite structures after their allocations
analogy: [NI mite] initialize channels' status

I am afraid we are facing a bright new one...

> 
> So, is this a known issue? Can I help with the debug messages/logs in 
> any way?
Even if your system crashes, you might be able to catch the log traces
printed just before. In such a case, could you set the analogy debug
options like this:
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG=y
CONFIG_XENO_DRIVERS_ANALOGY_DEBUG_LEVEL=0
CONFIG_XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL=1

And send your kernel traces, after having launched the attach procedure
(which, if I understand well, should have triggered the bug).

> 
> Thanks for the help,
>      -Felipe Brandão Cavalcanti
> 
> (Sorry to reply to such an old thread.. but my problem seemed a lot like 
> this one.)
> 
Alexis.


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2010-02-10 23:03 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-22 19:35 [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?) Ettore Pedretti
2009-11-22 22:41 ` Alexis Berlemont
     [not found] ` <200911222337.02840.alexis.berlemont@domain.hid>
2009-11-23  8:28   ` Ettore Pedretti
2009-11-23 12:24     ` Alexis Berlemont
2009-11-23 17:26       ` Ettore Pedretti
2009-11-23 22:10         ` Alexis Berlemont
2009-11-24 21:34           ` Ettore Pedretti
2009-11-24 22:51             ` Alexis Berlemont
2009-11-24 22:57             ` Alexis Berlemont
2009-11-26  8:22               ` Ettore Pedretti
2009-11-26  9:34                 ` Alexis Berlemont
2009-11-26 14:22                   ` Philippe Gerum
2009-11-27  0:43                     ` Alexis Berlemont
2009-11-27 18:14                       ` Philippe Gerum
2009-11-27 18:30                         ` Philippe Gerum
2009-11-26 23:38                   ` Ettore Pedretti
2009-11-27  0:47                     ` Alexis Berlemont
2009-11-29 23:02                     ` Alexis Berlemont
2009-11-30  8:41                       ` Ettore Pedretti
2009-12-02 23:21                         ` Alexis Berlemont
2009-12-15 15:41                           ` Ettore Pedretti
2009-12-15 23:49                             ` Alexis Berlemont
2009-12-16 12:58                               ` Ettore Pedretti
2009-12-18 21:32                                 ` Alexis Berlemont
2010-01-05 18:15                                   ` Ettore Pedretti
2010-01-05 22:34                                     ` Alexis Berlemont
2010-01-06 13:57                                       ` Ettore Pedretti
2010-01-06 22:15                                         ` Alexis Berlemont
2010-01-07 19:24                                           ` Ettore Pedretti
2010-01-07 21:58                                             ` Alexis Berlemont
2010-01-08 11:14                                               ` Ettore Pedretti
2010-02-09 17:21                                                 ` Felipe Brandão Cavalcanti
2010-02-10 23:00                                                   ` Alexis Berlemont
2010-02-10 23:03                                                   ` Alexis Berlemont
2010-01-07 22:18                                             ` Alexis Berlemont

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.