All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Comedi port over Xenomai fault question !
@ 2009-09-13 12:35 Cristian Axenie
       [not found] ` <4AACE947.3050205@domain.hid>
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Cristian Axenie @ 2009-09-13 12:35 UTC (permalink / raw)
  To: xenomai, xenomai, Alexis Berlemont, Alexis Berlemont

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

Hello !
I've took a snapshot of the xenomai-abe (Comedi port related) git repos
pointing to the last update and tried it up and it seems that are some
errors.

/usr/xenomai/sbin # ./comedi_config -v comedi0 comedi_pcimio
Comedi: comedi_pcimio: pcimio_attach: found pci-6024e board
Comedi: MITE: 0x90000000 mapped to c907a000 <6>Comedi: DAQ: 0x90001000
mapped to c907c000
Comedi: MITE: version = 2, type = 1, mite mode = 1, interface mode = 3
Comedi: MITE: num channels = 1, write post fifo depth = 1, wins = 0, iowins
= 2
Comedi: comedi_pcimio: pcimio_attach: found irq 48
Unable to handle kernel paging request for data at address 0x00012400
Faulting instruction address:* 0xc023dd08*
Oops: Kernel access of bad area, sig: 11 [#1]
MPC831x RDB
Modules linked in:
*NIP: c023dd08* LR: c0246b70 CTR: 00000000
REGS: c7a51c30 TRAP: 0300   Not tainted  (2.6.24.2)
MSR: 00001032 <ME,IR,DR>  CR: 84008422  XER: 00000000
DAR: 00012400, DSISR: 20000000
TASK = c7864430[898] 'comedi_config' THREAD: c7a50000
GPR00: c0246b70 c7a51ce0 c7864430 00012400 00000001 00000000 c79062c0
c03c0000
GPR08: 00000000 c7900a00 c03d6144 c03a37e8 c7906200 1004a5b8 c033e0b8
c03c0000
GPR16: c03ba578 c03d1a00 c02464fc c03b4d60 c0244e5c c024509c c024535c
c0245380
GPR24: c03da628 c02453a4 20001040 00000000 00000000 c03a2e50 c03c0000
00012400
Call Trace:
[c7a51ce0] [c024bae0]  (unreliable)
[c7a51d00] [c0246b70]
[c7a51d20] [c0246bdc]
[c7a51d40] [c024b88c]
[c7a51d90] [c024c69c]
[c7a51dc0] [c0238b2c]
[c7a51de0] [c0238c64]
[c7a51e20] [c0239094]
[c7a51e40] [c023ba00]
[c7a51e70] [c008b404]
[c7a51eb0] [c008d634]
[c7a51ec0] [c0059eb8]
[c7a51ee0] [c004ad5c]
[c7a51f30] [c0009644]
[c7a51f40] [c0010ca4]
--- Exception: c01Instruction dump:
7d6b1a14 39290010 38000001 7fe34a14 900b00b0 90ff0010 4bffff9c 9421ffe0
7c0802a6 bf61000c 7c7f1b78 90010024 <83c30000> 7c0000a6 5400045e 7c000124
---[ end trace f35e90f95f5de008 ]---


A quick disassembly shows that the error is generated in the mite driver as
pointed next,

c023dcf4 <mite_release_channel>:
mite_release_channel():
/home/haustiq/development/eldk/ppc_6xx/usr/src/linux-2.6.24-xc1/drivers/xenomai/comedi/national_instruments/mite.c:308
c023dcf4:    94 21 ff e0     stwu    r1,-32(r1)
c023dcf8:    7c 08 02 a6     mflr    r0
c023dcfc:    bf 61 00 0c     stmw    r27,12(r1)
c023dd00:    7c 7f 1b 78     mr      r31,r3
c023dd04:    90 01 00 24     stw     r0,36(r1)
/home/haustiq/development/eldk/ppc_6xx/usr/src/linux-2.6.24-xc1/drivers/xenomai/comedi/national_instruments/mite.c:309
*c023dd08:*    83 c3 00 00     lwz     r30,0(r3)


Some hints would be appreciated !

Best !

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

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

* Re: [Xenomai-help] [Xenomai-core] Comedi port over Xenomai fault question !
       [not found] ` <4AACE947.3050205@domain.hid>
@ 2009-09-13 12:47   ` Cristian Axenie
  0 siblings, 0 replies; 7+ messages in thread
From: Cristian Axenie @ 2009-09-13 12:47 UTC (permalink / raw)
  To: xenomai

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

SOrry (both Gilles and Alexis), I will be careful in the future!
Best regards !

On Sun, Sep 13, 2009 at 3:44 PM, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> wrote:

> Cristian Axenie wrote:
> > Hello !
> > I've took a snapshot of the xenomai-abe (Comedi port related) git repos
> > pointing to the last update and tried it up and it seems that are some
> > errors.
>
> Hi,
>
> I will let Alexis answer, but I have a remark: you do not need to
> cross-post on the core and help mailing lists for this question or any
> other. We do it when making announces because we want to reach everyone
> interested in Xenomai.
>
> So, this question is clearly an help request, and should go to the
> xenomai-help mailing list, not to xenomai-core.
>
> Also, posting to Alexis multiple addresses is not very polite, it really
> looks you are spamming him.
>
> Thanks.
>
>
> --
>                                             Gilles.
>

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

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

* Re: [Xenomai-help] [Xenomai-core] Comedi port over Xenomai fault question !
  2009-09-13 12:35 [Xenomai-core] Comedi port over Xenomai fault question ! Cristian Axenie
       [not found] ` <4AACE947.3050205@domain.hid>
@ 2009-09-13 12:50 ` Gilles Chanteperdrix
  2009-09-15 22:42 ` [Xenomai-help] " Alexis Berlemont
  2 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-09-13 12:50 UTC (permalink / raw)
  Cc: xenomai

Cristian Axenie wrote:
> Hello !
> I've took a snapshot of the xenomai-abe (Comedi port related) git repos
> pointing to the last update and tried it up and it seems that are some
> errors.

Hi,

I will let Alexis answer, but I have a remark: you do not need to
cross-post on the core and help mailing lists for this question or any
other. We do it when making announces because we want to reach everyone
interested in Xenomai.

So, this question is clearly an help request, and should go to the
xenomai-help mailing list, not to xenomai-core.

Also, posting to Alexis multiple addresses is not very polite, it really
looks you are spamming him.

Thanks.


-- 
					    Gilles.


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

* Re: [Xenomai-help] Comedi port over Xenomai fault question !
  2009-09-13 12:35 [Xenomai-core] Comedi port over Xenomai fault question ! Cristian Axenie
       [not found] ` <4AACE947.3050205@domain.hid>
  2009-09-13 12:50 ` Gilles Chanteperdrix
@ 2009-09-15 22:42 ` Alexis Berlemont
  2009-09-16  8:14   ` Cristian Axenie
  2 siblings, 1 reply; 7+ messages in thread
From: Alexis Berlemont @ 2009-09-15 22:42 UTC (permalink / raw)
  To: Cristian Axenie; +Cc: xenomai

Hi,

> I've took a snapshot of the xenomai-abe (Comedi port related) git repos
> pointing to the last update and tried it up and it seems that are some
> errors.

That is very nice of you to test the driver on your board. I had read
your former mail and was about to ask you to test the code on your
configuration.

>
> /usr/xenomai/sbin # ./comedi_config -v comedi0 comedi_pcimio
> Comedi: comedi_pcimio: pcimio_attach: found pci-6024e board
> Comedi: MITE: 0x90000000 mapped to c907a000 <6>Comedi: DAQ: 0x90001000
> mapped to c907c000
> Comedi: MITE: version = 2, type = 1, mite mode = 1, interface mode = 3
> Comedi: MITE: num channels = 1, write post fifo depth = 1, wins = 0, iowins
> = 2
> Comedi: comedi_pcimio: pcimio_attach: found irq 48
> Unable to handle kernel paging request for data at address 0x00012400
> Faulting instruction address: 0xc023dd08
> Oops: Kernel access of bad area, sig: 11 [#1]
> MPC831x RDB
> Modules linked in:
> NIP: c023dd08 LR: c0246b70 CTR: 00000000
> REGS: c7a51c30 TRAP: 0300   Not tainted  (2.6.24.2)
> MSR: 00001032 <ME,IR,DR>  CR: 84008422  XER: 00000000
> DAR: 00012400, DSISR: 20000000
> TASK = c7864430[898] 'comedi_config' THREAD: c7a50000
> GPR00: c0246b70 c7a51ce0 c7864430 00012400 00000001 00000000 c79062c0
> c03c0000
> GPR08: 00000000 c7900a00 c03d6144 c03a37e8 c7906200 1004a5b8 c033e0b8
> c03c0000
> GPR16: c03ba578 c03d1a00 c02464fc c03b4d60 c0244e5c c024509c c024535c
> c0245380
> GPR24: c03da628 c02453a4 20001040 00000000 00000000 c03a2e50 c03c0000
> 00012400
> Call Trace:
> [c7a51ce0] [c024bae0]  (unreliable)
> [c7a51d00] [c0246b70]
> [c7a51d20] [c0246bdc]
> [c7a51d40] [c024b88c]
> [c7a51d90] [c024c69c]
> [c7a51dc0] [c0238b2c]
> [c7a51de0] [c0238c64]
> [c7a51e20] [c0239094]
> [c7a51e40] [c023ba00]
> [c7a51e70] [c008b404]
> [c7a51eb0] [c008d634]
> [c7a51ec0] [c0059eb8]
> [c7a51ee0] [c004ad5c]
> [c7a51f30] [c0009644]
> [c7a51f40] [c0010ca4]
> --- Exception: c01Instruction dump:
> 7d6b1a14 39290010 38000001 7fe34a14 900b00b0 90ff0010 4bffff9c 9421ffe0
> 7c0802a6 bf61000c 7c7f1b78 90010024 <83c30000> 7c0000a6 5400045e 7c000124
> ---[ end trace f35e90f95f5de008 ]---
>
>
> A quick disassembly shows that the error is generated in the mite driver as
> pointed next,
>
> c023dcf4 <mite_release_channel>:
> mite_release_channel():
> /home/haustiq/development/eldk/ppc_6xx/usr/src/linux-2.6.24-xc1/drivers/xenomai/comedi/national_instruments/mite.c:308
> c023dcf4:    94 21 ff e0     stwu    r1,-32(r1)
> c023dcf8:    7c 08 02 a6     mflr    r0
> c023dcfc:    bf 61 00 0c     stmw    r27,12(r1)
> c023dd00:    7c 7f 1b 78     mr      r31,r3
> c023dd04:    90 01 00 24     stw     r0,36(r1)
> /home/haustiq/development/eldk/ppc_6xx/usr/src/linux-2.6.24-xc1/drivers/xenomai/comedi/national_instruments/mite.c:309
> c023dd08:    83 c3 00 00     lwz     r30,0(r3)
>

Without any access on you board, I have no other solution but to ask
you to add some debug traces in the driver so as to locate the
problem:

Could you try these two patches and send me the results. On my side,
this driver (partly) works on the NI 6221 board plugged into some x86
motherboard. Your configuration (6024e + PPC) is not that close but it
is just a segfault, we will figure this out quite quickly with ugly
printks.


diff --git a/ksrc/drivers/comedi/national_instruments/mite.c
b/ksrc/drivers/comedi/national_instruments/mite.c
index 8f1ccd7..56013d0 100644
--- a/ksrc/drivers/comedi/national_instruments/mite.c
+++ b/ksrc/drivers/comedi/national_instruments/mite.c
@@ -309,6 +309,22 @@ void mite_release_channel(struct mite_channel *mite_chan)
       struct mite_struct *mite = mite_chan->mite;
       unsigned long flags;

+#if 1 /* debug */
+       int i;
+
+       printk("mite_release_channel: mite_chan = %p\n", mite_chan);
+       printk("mite_release_channel: mite_chan->channel = %p\n",
+              mite_chan->channel);
+       printk("mite_release_channel: mite = %p\n", mite);
+       printk("mite_release_channel: mite->mite_io_addr = %p\n",
+              mite->mite_io_addr);
+       for (i = 0; i < MAX_MITE_DMA_CHANNELS; i++) {
+               printk("mite_release_channel: \talloc[%d] = %u\n",
+                      i, mite->channel_allocated[i]);
+       }
+
+#endif /* debug */
+
       // spin lock to prevent races with mite_request_channel
       comedi_lock_irqsave(&mite->lock, flags);
       if (mite->channel_allocated[mite_chan->channel]) {
@@ -318,13 +334,24 @@ void mite_release_channel(struct mite_channel *mite_chan)
                       CHCR_CLR_MRDY_IE | CHCR_CLR_DRDY_IE |
                       CHCR_CLR_LC_IE | CHCR_CLR_CONT_RB_IE,
                       mite->mite_io_addr + MITE_CHCR(mite_chan->channel));
+#if 1 /* debug */
+               printk("mite_release_channel: before disarm\n");
+#endif /* debug */
               mite_dma_disarm(mite_chan);
+#if 1 /* debug */
+               printk("mite_release_channel: before reset\n");
+#endif /* debug */
               mite_dma_reset(mite_chan);
+
               mite->channel_allocated[mite_chan->channel] = 0;
               mite_chan->ring = NULL;
               mmiowb();
       }
       comedi_unlock_irqrestore(&mite->lock, flags);
+
+#if 1 /* debug */
+               printk("mite_release_channel: out\n");
+#endif /* debug */
 }

 void mite_dma_arm(struct mite_channel *mite_chan)


diff --git a/ksrc/drivers/comedi/national_instruments/mio_common.c
b/ksrc/drivers/comedi/national_instruments/mio_common.c
index 3f70c3e..e29c2c5 100644
--- a/ksrc/drivers/comedi/national_instruments/mio_common.c
+++ b/ksrc/drivers/comedi/national_instruments/mio_common.c
@@ -424,6 +424,10 @@ void ni_release_ai_mite_channel(comedi_dev_t *dev)

       unsigned long flags;

+#if 1 /* debug */
+       printk("ni_release_ai_mite_channel: in\n");
+#endif /* debug */
+
       comedi_lock_irqsave(&devpriv->mite_channel_lock, flags);
       if (devpriv->ai_mite_chan) {
               ni_set_ai_dma_channel(dev, -1);
@@ -432,6 +436,10 @@ void ni_release_ai_mite_channel(comedi_dev_t *dev)
       }
       comedi_unlock_irqrestore(&devpriv->mite_channel_lock, flags);

+#if 1 /* debug */
+       printk("ni_release_ai_mite_channel: out\n");
+#endif /* debug */
+
 }

 void ni_release_ao_mite_channel(comedi_dev_t *dev)


Regards.

Alexis.


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

* Re: [Xenomai-help] Comedi port over Xenomai fault question !
  2009-09-15 22:42 ` [Xenomai-help] " Alexis Berlemont
@ 2009-09-16  8:14   ` Cristian Axenie
  2009-09-16 22:26     ` Alexis Berlemont
  0 siblings, 1 reply; 7+ messages in thread
From: Cristian Axenie @ 2009-09-16  8:14 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

On Wed, Sep 16, 2009 at 1:42 AM, Alexis Berlemont <berlemont.hauw@domain.hid>wrote:

> Hi,
>
> > I've took a snapshot of the xenomai-abe (Comedi port related) git repos
> > pointing to the last update and tried it up and it seems that are some
> > errors.
>
> That is very nice of you to test the driver on your board. I had read
> your former mail and was about to ask you to test the code on your
> configuration.
>
> >
> > /usr/xenomai/sbin # ./comedi_config -v comedi0 comedi_pcimio
> > Comedi: comedi_pcimio: pcimio_attach: found pci-6024e board
> > Comedi: MITE: 0x90000000 mapped to c907a000 <6>Comedi: DAQ: 0x90001000
> > mapped to c907c000
> > Comedi: MITE: version = 2, type = 1, mite mode = 1, interface mode = 3
> > Comedi: MITE: num channels = 1, write post fifo depth = 1, wins = 0,
> iowins
> > = 2
> > Comedi: comedi_pcimio: pcimio_attach: found irq 48
> > Unable to handle kernel paging request for data at address 0x00012400
> > Faulting instruction address: 0xc023dd08
> > Oops: Kernel access of bad area, sig: 11 [#1]
> > MPC831x RDB
> > Modules linked in:
> > NIP: c023dd08 LR: c0246b70 CTR: 00000000
> > REGS: c7a51c30 TRAP: 0300   Not tainted  (2.6.24.2)
> > MSR: 00001032 <ME,IR,DR>  CR: 84008422  XER: 00000000
> > DAR: 00012400, DSISR: 20000000
> > TASK = c7864430[898] 'comedi_config' THREAD: c7a50000
> > GPR00: c0246b70 c7a51ce0 c7864430 00012400 00000001 00000000 c79062c0
> > c03c0000
> > GPR08: 00000000 c7900a00 c03d6144 c03a37e8 c7906200 1004a5b8 c033e0b8
> > c03c0000
> > GPR16: c03ba578 c03d1a00 c02464fc c03b4d60 c0244e5c c024509c c024535c
> > c0245380
> > GPR24: c03da628 c02453a4 20001040 00000000 00000000 c03a2e50 c03c0000
> > 00012400
> > Call Trace:
> > [c7a51ce0] [c024bae0]  (unreliable)
> > [c7a51d00] [c0246b70]
> > [c7a51d20] [c0246bdc]
> > [c7a51d40] [c024b88c]
> > [c7a51d90] [c024c69c]
> > [c7a51dc0] [c0238b2c]
> > [c7a51de0] [c0238c64]
> > [c7a51e20] [c0239094]
> > [c7a51e40] [c023ba00]
> > [c7a51e70] [c008b404]
> > [c7a51eb0] [c008d634]
> > [c7a51ec0] [c0059eb8]
> > [c7a51ee0] [c004ad5c]
> > [c7a51f30] [c0009644]
> > [c7a51f40] [c0010ca4]
> > --- Exception: c01Instruction dump:
> > 7d6b1a14 39290010 38000001 7fe34a14 900b00b0 90ff0010 4bffff9c 9421ffe0
> > 7c0802a6 bf61000c 7c7f1b78 90010024 <83c30000> 7c0000a6 5400045e 7c000124
> > ---[ end trace f35e90f95f5de008 ]---
> >
> >
> > A quick disassembly shows that the error is generated in the mite driver
> as
> > pointed next,
> >
> > c023dcf4 <mite_release_channel>:
> > mite_release_channel():
> >
> /home/haustiq/development/eldk/ppc_6xx/usr/src/linux-2.6.24-xc1/drivers/xenomai/comedi/national_instruments/mite.c:308
> > c023dcf4:    94 21 ff e0     stwu    r1,-32(r1)
> > c023dcf8:    7c 08 02 a6     mflr    r0
> > c023dcfc:    bf 61 00 0c     stmw    r27,12(r1)
> > c023dd00:    7c 7f 1b 78     mr      r31,r3
> > c023dd04:    90 01 00 24     stw     r0,36(r1)
> >
> /home/haustiq/development/eldk/ppc_6xx/usr/src/linux-2.6.24-xc1/drivers/xenomai/comedi/national_instruments/mite.c:309
> > c023dd08:    83 c3 00 00     lwz     r30,0(r3)
> >
>
> Without any access on you board, I have no other solution but to ask
> you to add some debug traces in the driver so as to locate the
> problem:
>
> Could you try these two patches and send me the results. On my side,
> this driver (partly) works on the NI 6221 board plugged into some x86
> motherboard. Your configuration (6024e + PPC) is not that close but it
> is just a segfault, we will figure this out quite quickly with ugly
> printks.
>
>
> diff --git a/ksrc/drivers/comedi/national_instruments/mite.c
> b/ksrc/drivers/comedi/national_instruments/mite.c
> index 8f1ccd7..56013d0 100644
> --- a/ksrc/drivers/comedi/national_instruments/mite.c
> +++ b/ksrc/drivers/comedi/national_instruments/mite.c
> @@ -309,6 +309,22 @@ void mite_release_channel(struct mite_channel
> *mite_chan)
>       struct mite_struct *mite = mite_chan->mite;
>       unsigned long flags;
>
> +#if 1 /* debug */
> +       int i;
> +
> +       printk("mite_release_channel: mite_chan = %p\n", mite_chan);
> +       printk("mite_release_channel: mite_chan->channel = %p\n",
> +              mite_chan->channel);
> +       printk("mite_release_channel: mite = %p\n", mite);
> +       printk("mite_release_channel: mite->mite_io_addr = %p\n",
> +              mite->mite_io_addr);
> +       for (i = 0; i < MAX_MITE_DMA_CHANNELS; i++) {
> +               printk("mite_release_channel: \talloc[%d] = %u\n",
> +                      i, mite->channel_allocated[i]);
> +       }
> +
> +#endif /* debug */
> +
>       // spin lock to prevent races with mite_request_channel
>       comedi_lock_irqsave(&mite->lock, flags);
>       if (mite->channel_allocated[mite_chan->channel]) {
> @@ -318,13 +334,24 @@ void mite_release_channel(struct mite_channel
> *mite_chan)
>                       CHCR_CLR_MRDY_IE | CHCR_CLR_DRDY_IE |
>                       CHCR_CLR_LC_IE | CHCR_CLR_CONT_RB_IE,
>                       mite->mite_io_addr + MITE_CHCR(mite_chan->channel));
> +#if 1 /* debug */
> +               printk("mite_release_channel: before disarm\n");
> +#endif /* debug */
>               mite_dma_disarm(mite_chan);
> +#if 1 /* debug */
> +               printk("mite_release_channel: before reset\n");
> +#endif /* debug */
>               mite_dma_reset(mite_chan);
> +
>               mite->channel_allocated[mite_chan->channel] = 0;
>               mite_chan->ring = NULL;
>               mmiowb();
>       }
>       comedi_unlock_irqrestore(&mite->lock, flags);
> +
> +#if 1 /* debug */
> +               printk("mite_release_channel: out\n");
> +#endif /* debug */
>  }
>
>  void mite_dma_arm(struct mite_channel *mite_chan)
>
>
> diff --git a/ksrc/drivers/comedi/national_instruments/mio_common.c
> b/ksrc/drivers/comedi/national_instruments/mio_common.c
> index 3f70c3e..e29c2c5 100644
> --- a/ksrc/drivers/comedi/national_instruments/mio_common.c
> +++ b/ksrc/drivers/comedi/national_instruments/mio_common.c
> @@ -424,6 +424,10 @@ void ni_release_ai_mite_channel(comedi_dev_t *dev)
>
>       unsigned long flags;
>
> +#if 1 /* debug */
> +       printk("ni_release_ai_mite_channel: in\n");
> +#endif /* debug */
> +
>       comedi_lock_irqsave(&devpriv->mite_channel_lock, flags);
>       if (devpriv->ai_mite_chan) {
>               ni_set_ai_dma_channel(dev, -1);
> @@ -432,6 +436,10 @@ void ni_release_ai_mite_channel(comedi_dev_t *dev)
>       }
>       comedi_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
>
> +#if 1 /* debug */
> +       printk("ni_release_ai_mite_channel: out\n");
> +#endif /* debug */
> +
>  }
>
>  void ni_release_ao_mite_channel(comedi_dev_t *dev)
>
>
Hy !
I've applied the debug patches and I think that the problem is in the
ni_release_ai_mite_channel function because it seems that
mite_release_channel is never called.
It is possible that comedi_lock_irqsave to cause the problem or
devpriv->ai_mite_chan is NULL ?


here's the output :

/usr/xenomai/sbin # ./comedi_config -v comedi0 comedi_pcimio
Comedi: comedi_pcimio: pcimio_attach: found pci-6024e board
Comedi: MITE: 0x90000000 mapped to c907a000 <6>Comedi: DAQ: 0x90001000
mapped to c907c000
Comedi: MITE: version = 2, type = 1, mite mode = 1, interface mode = 3
Comedi: MITE: num channels = 1, write post fifo depth = 1, wins = 0, iowins
= 2
Comedi: comedi_pcimio: pcimio_attach: found irq 48
*ni_release_ai_mite_channel: in*
Unable to handle kernel paging request for data at address 0x00012400
Faulting instruction address: 0xc023dd18
Oops: Kernel access of bad area, sig: 11 [#1]
MPC831x RDB
Modules linked in:
NIP: c023dd18 LR: c0246c24 CTR: c0033b54
REGS: c7a51c30 TRAP: 0300   Not tainted  (2.6.24.2)
MSR: 00001032 <ME,IR,DR>  CR: 24008422  XER: 00000000
DAR: 00012400, DSISR: 20000000
TASK = c7827430[894] 'comedi_config' THREAD: c7a50000
GPR00: c0246c24 c7a51ce0 c7827430 c033d078 00012400 0001306f 00000000
c03a2f10
GPR08: 00000070 c7900a00 c03d6144 c03a37e8 24008424 1004a5b8 c033e238
c03c0000
GPR16: c03ba578 c03d1a00 c02465a4 c03b4d60 c0244f04 c0245144 c0245404
c0245428
GPR24: c03da628 c024544c 20001040 00000000 00012400 c03a2e50 c03c0000
00000001
Call Trace:
[c7a51ce0] [c03f20a8]  (unreliable)
[c7a51d00] [c0246c24]
[c7a51d20] [c0246c9c]
[c7a51d40] [c024b94c]
[c7a51d90] [c024c75c]
[c7a51dc0] [c0238b2c]
[c7a51de0] [c0238c64]
[c7a51e20] [c0239094]
[c7a51e40] [c023ba00]
[c7a51e70] [c008b404]
[c7a51eb0] [c008d634]
[c7a51ec0] [c0059eb8]
[c7a51ee0] [c004ad5c]
[c7a51f30] [c0009644]
[c7a51f40] [c0010ca4]
--- Exception: c01Instruction dump:
900b00b0 90ff0010 4bffff9c 9421ffe0 7c0802a6 bf61000c 7c7c1b78 3c60c034
90010024 7f84e378 3863d078 3be00001 <83dc0000> 4bde279d 3c60c034 809c0004
---[ end trace 0304077a12ed39c2 ]---


> Regards.
>
> Alexis.
>

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

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

* Re: [Xenomai-help] Comedi port over Xenomai fault question !
  2009-09-16  8:14   ` Cristian Axenie
@ 2009-09-16 22:26     ` Alexis Berlemont
  2009-09-17 16:01       ` Cristian Axenie
  0 siblings, 1 reply; 7+ messages in thread
From: Alexis Berlemont @ 2009-09-16 22:26 UTC (permalink / raw)
  To: Cristian Axenie; +Cc: xenomai

Hi,

>
> I've applied the debug patches and I think that the problem is in the
> ni_release_ai_mite_channel function because it seems that
> mite_release_channel is never called.
> It is possible that comedi_lock_irqsave to cause the problem or
> devpriv->ai_mite_chan is NULL ?
>

You can remove comedi_lock_irqsave/restore, they are not critical. And
you can proceed on adding some debug traces so as to check
ai_mite_chan.

I will double check, the mite "init" function.

Alexis.


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

* Re: [Xenomai-help] Comedi port over Xenomai fault question !
  2009-09-16 22:26     ` Alexis Berlemont
@ 2009-09-17 16:01       ` Cristian Axenie
  0 siblings, 0 replies; 7+ messages in thread
From: Cristian Axenie @ 2009-09-17 16:01 UTC (permalink / raw)
  To: Alexis Berlemont; +Cc: xenomai

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

Hy!
I've added some printks and took out the comedi_lock_irqsave / restore calls
from ni_release_ai_mite_channel and it seems that the call of
mite_release_channel
from ni_release_ai_mite_channel doesn't return

here's a short log :

~ # /usr/xenomai/sbin/comedi_config -v comedi0 comedi_pcimio
Comedi: comedi_pcimio: pcimio_attach: found pci-6024e board
Comedi: MITE: 0x90000000 mapped to c907a000 <6>Comedi: DAQ: 0x90001000
mapped to c907c000
Comedi: MITE: version = 2, type = 1, mite mode = 1, interface mode = 3
Comedi: MITE: num channels = 1, write post fifo depth = 1, wins = 0, iowins
= 2
Comedi: comedi_pcimio: pcimio_attach: found irq 48
*ni_release_ai_mite_channel: in
ni_release_ai_mite_channel: ai_mite_chan is not NULL
ni_release_ai_mite_channel: the dma channel was set*
Unable to handle kernel paging request for data at address 0x00012400
Faulting instruction address: 0xc023b35c
Oops: Kernel access of bad area, sig: 11 [#1]
MPC831x RDB
Modules linked in:
NIP: c023b35c LR: c0244254 CTR: c0029f44
REGS: c7adbc40 TRAP: 0300   Not tainted  (2.6.24.2)
MSR: 00009032 <EE,ME,IR,DR>  CR: 22008422  XER: 00000000
DAR: 00012400, DSISR: 20000000
TASK = c7861bd0[888] 'comedi_config' THREAD: c7ada000

I seems that when it calls mite_release_channel none of the specific debug
messages appears !

I shall test further the mite_release_channel !

Best ,
Cristian !

On Thu, Sep 17, 2009 at 1:26 AM, Alexis Berlemont <berlemont.hauw@domain.hid>wrote:

> Hi,
>
> >
> > I've applied the debug patches and I think that the problem is in the
> > ni_release_ai_mite_channel function because it seems that
> > mite_release_channel is never called.
> > It is possible that comedi_lock_irqsave to cause the problem or
> > devpriv->ai_mite_chan is NULL ?
> >
>
> You can remove comedi_lock_irqsave/restore, they are not critical. And
> you can proceed on adding some debug traces so as to check
> ai_mite_chan.
>
> I will double check, the mite "init" function.
>
> Alexis.
>

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

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

end of thread, other threads:[~2009-09-17 16:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-13 12:35 [Xenomai-core] Comedi port over Xenomai fault question ! Cristian Axenie
     [not found] ` <4AACE947.3050205@domain.hid>
2009-09-13 12:47   ` [Xenomai-help] " Cristian Axenie
2009-09-13 12:50 ` Gilles Chanteperdrix
2009-09-15 22:42 ` [Xenomai-help] " Alexis Berlemont
2009-09-16  8:14   ` Cristian Axenie
2009-09-16 22:26     ` Alexis Berlemont
2009-09-17 16:01       ` Cristian Axenie

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.