All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Laurent.POYART@fr.thalesgroup.com
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Interrupt Shield Hangs
Date: Wed, 26 Nov 2008 17:53:02 +0100	[thread overview]
Message-ID: <492D7EEE.2020808@domain.hid> (raw)
In-Reply-To: <2F8EE677D406514ABE53EF9C0934A666042ABED6@domain.hid>

Laurent.POYART@fr.thalesgroup.com wrote:
> Hello,
> 
> I'm running some tests on a powerpc MPC8347 with Xenomai 2.4.1

Please don't test outdated releases. We can't afford debugging each and every
release we rolled out. The stable one we maintain is 2.4.6.1. The same goes for
the Adeos patch, especially on 83xx.

 and Linux
> 2.6.23. I use the interrupt shield. I have find one case in which my
> application hangs. 

The interrupt shield will be dropped in later Xenomai versions (3.0 for sure).
It made some sense when PREEMPT_RT was not available to allow pure Linux
operations to be shielded from normal (i.e. non-RT interrupts) especially on SMP
systems due to inter-CPU locking issues, but native preemption solves that much
better nowadays. The IRQ shield is a by-product from Adeos more than a Xenomai
feature, actually.

If you need a co-kernel, then you want to get predictability from primary mode
only. If you need to run applications with bounded latencies mostly in secondary
mode, e.g. happily calling into the glibc and/or regular Linux drivers, then you
likely want PREEMPT_RT.

> I've plugged my JTAG and it seems that I enter an infinite loop at the end
> of the function engage_irq_shield. It seems to be in the function
> rthal_local_irq_restore_hw (see the screenshot in the file below. Infinite
> loop between adresses 0xC0056110 and 0xC0056124. Registers r0 and r11 values
> are 1).
> 
> I manage to produce the problem in the following context:
> . I've got a periodic RT task of 5ms which performs a linux system calls and
> swithes to secondary mode : takes a lock, print a message , gives the lock
> and then wait for a period. It was not the initial code but I manage to get
> the problem easily with this new code.
> . In the same time, I've got a RT task which performs data transfer towards
> a FPGA FIFO using a RTDM driver. The task writes data until the Almost Full
> flag of the FPGA FIFO is set. The FPGA read the data at 200Kbits/s and
> generates an interrupt (registered in xenomai) when the Fifo is almost
> empty. Then the task continues to write data to the FPGA. 
> After a while, the system hangs. Each time, the timer task is between 2
> calls of rt_task_wait_period.
> 
> I've made the test with the interrupt shield disabled and the target doesn't
> hangs.
> 
> Do you have any idea?
> 

The shield blocks interrupt propagation beyond what it should. It could be an
Adeos issue, or more likely a secondary mode switch vs shield problem. Somebody
reported this issue is the past already, but this problem has not reached the
top of any maintainer's stack yet, probably because the shield feature is obsolete.

> Thanks in advance.
> 
> L.Poyart
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help


-- 
Philippe.


      parent reply	other threads:[~2008-11-26 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26 15:27 [Xenomai-help] Interrupt Shield Hangs Laurent.POYART
2008-11-26 15:42 ` Gilles Chanteperdrix
2008-11-26 16:53 ` Philippe Gerum [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=492D7EEE.2020808@domain.hid \
    --to=rpm@xenomai.org \
    --cc=Laurent.POYART@fr.thalesgroup.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.