All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Alexis Berlemont <berlemont.hauw@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Help on analogy_ni_pcimio (Alexis Berlemont?)
Date: Fri, 27 Nov 2009 19:30:22 +0100	[thread overview]
Message-ID: <1259346622.2348.779.camel@domain.hid> (raw)
In-Reply-To: <1259345664.2348.773.camel@domain.hid>

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.




  reply	other threads:[~2009-11-27 18:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259346622.2348.779.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=berlemont.hauw@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.