Module: xenomai-head
Branch: master
Commit: 7c901b868a4e96bba34311ed349b61ea74717c85
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=7c901b868a4e96bba34311ed349b61ea74717c85

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Wed May 25 21:25:34 2011 +0200

proc: test IPI before virq

On some platforms, IPI are virq, so test for virq last.

---

 ksrc/nucleus/intr.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ksrc/nucleus/intr.c b/ksrc/nucleus/intr.c
index 6a3b24b..3769949 100644
--- a/ksrc/nucleus/intr.c
+++ b/ksrc/nucleus/intr.c
@@ -985,20 +985,20 @@ static inline int format_irq_proc(unsigned int irq,
        struct xnintr *intr;
        spl_t s;
 
-       if (rthal_virtual_irq_p(irq)) {
-               xnvfile_puts(it, "         [virtual]");
-               return 0;
-       } else if (irq == XNARCH_TIMER_IRQ) {
+       if (irq == XNARCH_TIMER_IRQ) {
                xnvfile_puts(it, "         [timer]");
                return 0;
 #ifdef CONFIG_SMP
-       } else if (irq == RTHAL_SERVICE_IPI0) {
-               xnvfile_puts(it, "         [IPI]");
+       } else if (irq >= RTHAL_SERVICE_IPI0 && irq <= RTHAL_SERVICE_IPI3) {
+               xnvfile_printf(it, "         [IPI%d]", irq - 
RTHAL_SERVICE_IPI0);
                return 0;
        } else if (irq == RTHAL_CRITICAL_IPI) {
                xnvfile_puts(it, "         [critical sync]");
                return 0;
 #endif /* CONFIG_SMP */
+       } else  if (rthal_virtual_irq_p(irq)) {
+               xnvfile_puts(it, "         [virtual]");
+               return 0;
        }
 
        xnlock_get_irqsave(&intrlock, s);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to