Module: xenomai-forge
Branch: next
Commit: 97bdcc6c0e112c289b15267dcaf712e808d44804
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=97bdcc6c0e112c289b15267dcaf712e808d44804

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Tue Oct  8 22:26:43 2013 +0200

cobalt/intr: IPIs number are not know at compilation time on ARM

---

 kernel/cobalt/intr.c |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/kernel/cobalt/intr.c b/kernel/cobalt/intr.c
index 638be6a..f501daf 100644
--- a/kernel/cobalt/intr.c
+++ b/kernel/cobalt/intr.c
@@ -1001,23 +1001,27 @@ static inline int format_irq_proc(unsigned int irq,
                        return 0;
                }
 
-       switch (irq) {
 #ifdef CONFIG_SMP
-       case IPIPE_HRTIMER_IPI:
+       /*
+        * IPI numbers on ARM are not compile time constants, so do
+        * not use switch/case here.
+        */
+       if (irq == IPIPE_HRTIMER_IPI) {
                xnvfile_puts(it, "         [timer-ipi]");
                return 0;
-       case IPIPE_RESCHEDULE_IPI:
+       }
+       if (irq == IPIPE_RESCHEDULE_IPI) {
                xnvfile_puts(it, "         [reschedule]");
                return 0;
-       case IPIPE_CRITICAL_IPI:
+       }
+       if (irq == IPIPE_CRITICAL_IPI) {
                xnvfile_puts(it, "         [sync]");
                return 0;
+       }
 #endif /* CONFIG_SMP */
-       default:
-               if (ipipe_virtual_irq_p(irq)) {
-                       xnvfile_puts(it, "         [virtual]");
-                       return 0;
-               }
+       if (ipipe_virtual_irq_p(irq)) {
+               xnvfile_puts(it, "         [virtual]");
+               return 0;
        }
 
        mutex_lock(&intrlock);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to