All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Henri Roosen <henriroosen@gmail.com>
Cc: "Xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] xnarch_xchg infinite loop
Date: Wed, 22 Jan 2014 21:20:44 +0100	[thread overview]
Message-ID: <52E0281C.3090102@xenomai.org> (raw)
In-Reply-To: <CANKLDmvujEYxC_Z_5xE0oyBRmnnwOVbk55xweMu0m+gsgB5rfA@mail.gmail.com>

On 01/22/2014 03:49 PM, Henri Roosen wrote:
> On Wed, Jan 22, 2014 at 11:47 AM, Gilles Chanteperdrix <
> gilles.chanteperdrix@xenomai.org> wrote:
> 
>> On 01/22/2014 09:31 AM, Henri Roosen wrote:
>>> Removing the device driver before reboot doesn't help: we still get a
>>> LDREX/STREX lockup in the Xenomai timertick path. I'm still not sure what
>>> actually causes this lockup, but my guess is somewhere late in the
>>> shutdown-sequence the memory (or something else) is put into a state that
>>> makes LDREX/STREX fail all the time. Any interrupt from the Xenomai
>> domain
>>> locks the system then.
>>>
>>> As a quick (and dirty!) workaround skipping __ipipe_handle_irq when
>>> system_state == SYSTEM_REBOOT solves the problem.
>>>
>>> So thinking towards a proper solution: is there or should there be any
>>> shutdown/de-initialization of Xenomai and it's services in the Linux
>>> shutdown sequence?
>>
>> The simplest solution seems to find the Linux code involved, which
>> probably contains a local_irq_disable() to avoid this situation, and
>> replace it with hard_local_irq_disable() in the I-pipe case so as to
>> also block xenomai interrupts.
>>
> 
> Great, this seems to work. Thanks Gilles!
> I replaced with local_irq_disable_hw(), that is what you meant right?
> 
> The ARM reboot code also disables the fiq with local_fiq_disable(). It it
> necessary to also change this by local_fiq_disable_hw() for the ipipe case?
> Or is there no need for that?

Right, hard_local_irq_disable is for I-pipe patches for 3.2 and later
kernels. Yeq, if local_fiq_disable_hw exists, you should call it instead
of local_fiq_disable.

Regards.

-- 
                                                                Gilles.


      reply	other threads:[~2014-01-22 20:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20  8:31 [Xenomai] xnarch_xchg infinite loop Henri Roosen
2014-01-20  9:48 ` Gilles Chanteperdrix
2014-01-20 10:02   ` Henri Roosen
2014-01-20 20:40     ` Gilles Chanteperdrix
2014-01-22  8:31       ` Henri Roosen
2014-01-22 10:47         ` Gilles Chanteperdrix
2014-01-22 14:49           ` Henri Roosen
2014-01-22 20:20             ` Gilles Chanteperdrix [this message]

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=52E0281C.3090102@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=henriroosen@gmail.com \
    --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.