All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Steven Kauffmann <steven.kauffmann@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Kernel lockup when shared IRQ is enabled
Date: Tue, 05 May 2009 14:26:38 +0200	[thread overview]
Message-ID: <4A00307E.1020405@domain.hid> (raw)
In-Reply-To: <ff1d78710905050504u3b685de3g54f0fefc046078a@domain.hid>

Steven Kauffmann wrote:
> On Tue, May 5, 2009 at 9:48 AM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> Steven Kauffmann wrote:
>>> 2009/5/4 Sebastian Smolorz <smolorz@domain.hid>:
>>>> Steven Kauffmann wrote:
>>>>> 2009/5/4 Sebastian Smolorz <smolorz@domain.hid>:
>>>>>> Steven Kauffmann wrote:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> As some other people on this mailing list, we also have system lockups
>>>>>>> with the latest 2.4 branch. For some people the problems seems to be
>>>>>>> solved when using the adeos-ipipe-2.6.28.9-x86-2.2-07.patch. So we
>>>>>>> tried that but the system still freezes. The console output on another
>>>>>>> machine reports nothing when the system freezes but at computer
>>>>>>> startup we found this line:
>>>>>>>
>>>>>>> Xenomai: xnintr_shirq_handler: IRQ11 not handled. Disabling IRQ line.
>>>>>>>
>>>>>>> lspci shows us that the peak CAN card and the ethernet controller use
>>>>>>> the same IRQ.
>>>>>> Generally, it is problematic to share IRQs between RT and NRT devices.
>>>>>> You better try to decouple these two devices WRT IRQ sharing.
>>>>>>
>>>>>>> Every time we try to bring up the ethernet device the system freezes.
>>>>>>> Is this related with the above kernel log message and that both cards
>>>>>>> use the same IRQ?
>>>>>> Are you sure that the system freezes? Do you happen to be logged in over
>>>>>> the net?
>>>>> Yes I'm sure. I cannot ping to the system anymore ...
>>>> That is not a sign of a freezed system. The ping does not get replied because
>>>> the ethernet IRQ is not handled any more. I bet the system continues to work.
>>>> You can check this by using a serial console or a local keyboard.
>>> The system doesn't react when I try to switch to the first virtual terminal.
>> The sharing of IRQs between real-time and non real-time hardware is in
>> fact an FAQ: "What can I do if Xenomai and Linux devices share the same
>> IRQ?"
>>
>> http://www.xenomai.org/index.php/FAQs
>>
>> The lockup you get could come from this first problem. So, you should
>> eliminate this problem before concluding that Xenomai has a bug on your
>> hardware.
> 
> What I didn't mention in my previous mails is that I can trigger the
> lockup of my system by starting eclipse.
> 
> I tried to get a unique IRQ for the CAN card, but it looks like it
> always shares it IRQ with another device (USB controller or VGA
> controller or ... ). At the moment it shares the IRQ (IRQ 10) with the
> VGA controller but the system runs fine now (I can start eclipse). Why
> can it share the IRQ with the VGA controller without having the lockup
> or is it just good luck?

Even when it works, sharing should be avoided because it destroys
determinism. To make it work without destroying determinism, you have to
modify the drivers code. There is no way around.

> 
> I also tried it on another patched kernel (2.6.27.19-ipipe-2.2-06) and
> now my CAN card gets another IRQ (IRQ 16) and again shares it with the
> VGA controller. Are the kernel options CONFIG_X86_LOCAL_APIC and
> CONFIG_X86_IO_APIC responsible for the differences of the IRQ between
> the two kernels?

Yes, using the local APIC and IO-APIC change the irq numbers.

> 
> But if I try to open eclipse in this kernel my system freezes again.
> Even if I unplug the CAN card (the only PCI card in my system) the
> system freezes when I try to start eclipse.

This is probably unrelated. Try to get the console output on serial
port, or if not possible on netconsole.

-- 
                                                 Gilles.


  reply	other threads:[~2009-05-05 12:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-04 11:59 [Xenomai-help] Kernel lockup when shared IRQ is enabled Steven Kauffmann
2009-05-04 12:08 ` Sebastian Smolorz
2009-05-04 13:30   ` Steven Kauffmann
2009-05-04 13:39     ` Sebastian Smolorz
2009-05-04 13:44       ` Philippe Gerum
2009-05-05  7:41       ` Steven Kauffmann
2009-05-05  7:48         ` Gilles Chanteperdrix
2009-05-05 12:04           ` Steven Kauffmann
2009-05-05 12:26             ` Gilles Chanteperdrix [this message]
2009-05-05 17:32               ` Martin Shepherd
2009-05-06 14:54               ` Steven Kauffmann
2009-05-04 13:29 ` Philippe Gerum

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=4A00307E.1020405@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=steven.kauffmann@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.