All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: koansoftware@domain.hid
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] NETDEV WATCHDOG on ARM
Date: Sun, 30 Nov 2008 12:08:31 +0100	[thread overview]
Message-ID: <4932742F.30803@domain.hid> (raw)
In-Reply-To: <493114A5.4060702@domain.hid>

Marco Cavallini wrote:
> Gilles Chanteperdrix ha scritto:
>> Stefano Gafforelli wrote:
>>> With additional patch...do you think that the problem is due to the relation
>>> between additional patch and xenomai?
>> Yes, that is something possible. Normally, we try to test that Xenomai
>> is compatible with the AT91 patch, but some error may escape, and we
>> never tested the ronetix patch, which I do not know. So, please test
>> without these additional patches.
>>
>> P.S: please always CC the mailing list.
>>
> 
> Working with Stefano we pointed out some issues.
> 
> 1. we successfully build linux-2.6.26 with xenomai-2.4.6.1 adding a
> little patch.

What little patch ?

> 2. we tested it on an AT91SAM9261 board and noticed that latency freezes
> at "warming up..."

This is a known issue: the default period of 100us is too short on ARM.
So, you need to run latency with the -p 1000 option. If you enable FCSE,
you may be able to run latency -p 100, but will observer overruns under
load.

> 3. so we returned to the 'stable' linux-2.6.25 with xenomai-2.4.4
> 4. testing latency with this version succeeded
> 5. unfortunately network is not working so after debugging Stefano
> dicovered that executing irq_finish(irq) in asm_do_IRQ()
> [arch/arm/kernel/irq.c] made network working.
> 
> 
> asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs
> *regs)
> {
>         struct pt_regs *old_regs = set_irq_regs(regs);
>         struct irq_desc *desc = irq_desc + irq;
> 
>         /*
>          * Some hardware gives randomly wrong interrupts.  Rather
>          * than crashing, do something sensible.
>          */
>         if (irq >= NR_IRQS)
>                 desc = &bad_irq_desc;
> 
>         irq_enter();
> 
>         desc_handle_irq(irq, desc);
> 
> //#ifndef CONFIG_IPIPE
>         /* AT91 specific workaround */
>         irq_finish(irq);
> //#endif /* !CONFIG_IPIPE */
> 
>         irq_exit();
>         set_irq_regs(old_regs);
> }
> 
> 
> We wonder why irq_finish() is not executed here when using IPIPE mode in
> this asm_do_IRQ(().
> 
> Any hint will be greatly appreciated :-)

This has been discussed both on Xenomai mailing list and linux arm
kernel mailing list: running irq_finish here is very wrong, since it
means that only higher priority interrupts may be run before the current
interrupt has finished running (so, for instance, a high priority non
real-time interrupt may prevent low priority real-time interrupt from
runing). The proper place to run irq_finish is as soon as the interrupt
has been masked and acked.

Now, what we have to wonder is why irq_finish is not run for the
ethernet driver interrupt. Is it a multiplexed interrupt ?

> 
> 
> /marco & stefano
> 


-- 
					    Gilles.


      reply	other threads:[~2008-11-30 11:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17  9:22 [Xenomai-help] NETDEV WATCHDOG on ARM Stefano Gafforelli
2008-11-17 10:13 ` Gilles Chanteperdrix
2008-11-17 11:28   ` Stefano Gafforelli
2008-11-17 13:24     ` Gilles Chanteperdrix
2008-11-21 12:17       ` Stefano Gafforelli
2008-11-21 13:12         ` Gilles Chanteperdrix
     [not found]           ` <af29ce600811210730n5272bb11naa94eac6630d716f@domain.hid>
2008-11-21 15:44             ` Gilles Chanteperdrix
2008-11-29 10:08               ` Marco Cavallini
2008-11-30 11:08                 ` 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=4932742F.30803@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=koansoftware@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.