All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Ivan Kalatchev <ivan.kalatchev@domain.hid>
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] Viper board (ARM XScale) problems with	Xenomai-2.4.10
Date: Tue, 12 Jan 2010 11:29:13 +0100	[thread overview]
Message-ID: <4B4C4EF9.601@domain.hid> (raw)
In-Reply-To: <4B4BADDD.7070900@domain.hid>

Gilles Chanteperdrix wrote:
> Ivan Kalatchev wrote:
>> and not be part of the common code? 
> 
> handle_edge_irq is a misnomer, it should be called
> "handle_edge_irq_by_bogus_interrupt_controller"
> handle_level_irq is perfectly fine for edge irqs if the interrupt
> controller does not loose edge irqs when they are masked.
> 
> The point is that handle_edge_irq is incompatible with Xenomai. So, we
> replace handle_edge_irq with handle_level_irq in the hope that your edge
> controller is not buggy. I did not invent this, I read it on the linux
> arm kernel mailing list, and for the sake of preempt_rt, people are
> doing the same thing (only without a #ifdef) in the mainline kernel,
> they maybe even did it in 2.6.33, or it is pending for 2.6.34.
> 
> The point is: you think that everything works fine, but I really doubt
> it. Normally, with handle_edge_irq, the I-pipes receives the irq, acks
> it, does not mask it, and then go to some other business with irqs on,
> the problem is that since the interrupt handler was not run, the
> peripheral from which originates the interrupt may trigger it again, and
> then you get a lock-up. This is what the code you disabled fixes. And
> this is the only fix we have at hand for now.

Ok, I have dug the linux arm kernel mailing list archives. It turns out
that PXA, SA1100 and AT91 have buggy PICs which need absolutely
handle_edge_irq.

That said, I think that the lockup issue does not happen with any
peripheral when the interrupt controller is configured in edge mode. I
think the problem happens when a peripheral with a "level" behaviour is
plugged on a pin configured as edge.

In short, you are right, we will ask people who have the lockup issue to
call set_irq_handler(handle_level_irq) for the drivers who have the
problem. Only, the way you presented your mail made me think that your
modification was a hacker's random change rather than a fully thought
out/documented one.

-- 
					    Gilles.


  reply	other threads:[~2010-01-12 10:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 22:04 [Xenomai-help] Viper board (ARM XScale) problems with Xenomai-2.4.10 Ivan Kalatchev
2010-01-11 23:01 ` Gilles Chanteperdrix
2010-01-12 10:29   ` Gilles Chanteperdrix [this message]
     [not found]   ` <001f01ca9390$5fa20db0$1ee62910$@kalatchev@domain.hid>
2010-01-12 14:18     ` Gilles Chanteperdrix
2010-01-12 15:12       ` Ivan Kalatchev
2010-01-12 15:35         ` Gilles Chanteperdrix
2010-01-12 16:09           ` Ivan Kalatchev
2010-01-12 16:16             ` Gilles Chanteperdrix
2010-01-12 17:39               ` Ivan Kalatchev
2010-01-12 17:43                 ` Gilles Chanteperdrix
2010-01-12 20:04                 ` Gilles Chanteperdrix
2010-01-12 20:34                   ` Ivan Kalatchev
2010-01-12 22:40                   ` Ivan Kalatchev
2010-01-12 22:42                     ` Gilles Chanteperdrix
2010-01-12 22:48                       ` Ivan Kalatchev
2010-01-12 22:52                         ` Gilles Chanteperdrix
2010-01-12 23:28                         ` Gilles Chanteperdrix
2010-01-13  0:20                         ` Gilles Chanteperdrix
2010-01-13 13:55                           ` Ivan Kalatchev
2010-01-13 13:59                             ` Gilles Chanteperdrix
2010-01-12 21:07           ` Ivan Kalatchev
2010-01-12 21:09             ` Gilles Chanteperdrix
2010-01-12 21:27               ` Ivan Kalatchev
2010-01-12 21:30                 ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2010-01-11 18:22 Ivan Kalatchev
2010-01-11 18:28 ` Gilles Chanteperdrix

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=4B4C4EF9.601@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=Xenomai-help@domain.hid \
    --cc=ivan.kalatchev@domain.hid \
    /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.