All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Anders Blomdell <anders.blomdell@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH] Slow is faster arch/ppc/syslib/open_pic.c
Date: Wed, 08 Feb 2006 10:40:13 +0100	[thread overview]
Message-ID: <43E9BC7D.6020803@domain.hid> (raw)
In-Reply-To: <43E8C7CB.8050401@domain.hid>

Philippe Gerum wrote:
> Anders Blomdell wrote:
> 
>> When trying to run Xenomai on PowerPC with OpenPIC, I have (finally) 
>> found that interrupt latency is much improved with the following patch:
>>
>>
>>
>> --- arch/ppc/syslib/open_pic.c~ 2006-01-08 03:15:24.000000000 +0100
>> +++ arch/ppc/syslib/open_pic.c  2006-02-07 16:56:14.000000000 +0100
>> @@ -820,7 +820,7 @@
>>   */
>>  static void openpic_ack_irq(unsigned int irq_nr)
>>  {
>> -#ifdef __SLOW_VERSION__
>> +#if defined(__SLOW_VERSION__) || defined(CONFIG_IPIPE)
>>         openpic_disable_irq(irq_nr);
>>         openpic_eoi();
>>  #else
>> @@ -831,7 +831,7 @@
>>
>>  static void openpic_end_irq(unsigned int irq_nr)
>>  {
>> -#ifdef __SLOW_VERSION__
>> +#if defined(__SLOW_VERSION__) || defined(CONFIG_IPIPE)
>>         if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
>>             && irq_desc[irq_nr].action)
>>                 openpic_enable_irq(irq_nr);
>>
>>
>>
>> The reason for this, is that the fast version doesn't call openpic_eoi 
>> until the interrupt is ended, which means that all RT-interrupts are 
>> delayed by a pending Linux interrupt.
>>
> 
> Gasp. Will check on my Icecube asap, thanks (a lot).
> 

The mpc52xx is using its own version of PIC management - which should not induce 
such delay on eoi, so I cannot experiment this change yet. However, I've revisited 
your patch so that the OpenPIC code always sends eoi in fast mode, regardless of 
the interrupt polarity. Could you try the patch below and let me know of the 
outcome? TIA,

--- arch/ppc/syslib/open_pic.c~	2005-10-28 02:02:08.000000000 +0200
+++ arch/ppc/syslib/open_pic.c	2006-02-08 10:30:22.000000000 +0100
@@ -824,7 +824,9 @@
  	openpic_disable_irq(irq_nr);
  	openpic_eoi();
  #else
+#ifndef CONFIG_IPIPE
  	if ((irq_desc[irq_nr].status & IRQ_LEVEL) == 0)
+#endif /* CONFIG_IPIPE */
  		openpic_eoi();
  #endif
  }
@@ -836,8 +838,10 @@
  	    && irq_desc[irq_nr].action)
  		openpic_enable_irq(irq_nr);
  #else
+#ifndef CONFIG_IPIPE
  	if ((irq_desc[irq_nr].status & IRQ_LEVEL) != 0)
  		openpic_eoi();
+#endif /* CONFIG_IPIPE */
  #endif
  }


-- 

Philippe.


  reply	other threads:[~2006-02-08  9:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31 18:53 [Xenomai-core] [PATCH] Shared irqs v.6 Dmitry Adamushko
2006-01-31 19:09 ` Jan Kiszka
2006-01-31 19:50   ` Dmitry Adamushko
2006-01-31 20:14     ` Jan Kiszka
2006-02-01  8:32       ` Jeroen Van den Keybus
2006-02-01  8:46         ` Jan Kiszka
2006-01-31 19:40 ` Jan Kiszka
2006-02-01 13:59 ` [Xenomai-core] Are XN_ISR_CHAINED and XN_ISR_ENABLE mutually exclusive? Anders Blomdell
2006-02-01 14:52   ` Jan Kiszka
2006-02-01 15:00     ` Anders Blomdell
2006-02-01 15:26       ` Anders Blomdell
2006-02-06 11:34   ` [Xenomai-core] [BUG] problems with adeos-ipipe-2.6.14-ppc-1.2-00.patch Anders Blomdell
2006-02-06 18:44     ` Philippe Gerum
2006-02-07 16:04     ` [Xenomai-core] [PATCH] Slow is faster arch/ppc/syslib/open_pic.c Anders Blomdell
2006-02-07 16:16       ` Philippe Gerum
2006-02-08  9:40         ` Philippe Gerum [this message]
2006-02-08 17:57           ` 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=43E9BC7D.6020803@domain.hid \
    --to=rpm@xenomai.org \
    --cc=anders.blomdell@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.