Module: xenomai-2.6
Branch: master
Commit: 3ce2656c1deb8e302dbb22d3d66e1f4948eb2c31
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=3ce2656c1deb8e302dbb22d3d66e1f4948eb2c31

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Dec 30 12:50:39 2011 +0100

hal: don't expect return values from SMP-specific core IRQ routines

These are core support routines: if you mess with them by sending
broken args, they will simply ignore you or pull the break.

---

 include/asm-arm/bits/timer.h      |    6 ++----
 include/asm-blackfin/bits/timer.h |    7 +------
 include/asm-generic/bits/intr.h   |    2 ++
 include/asm-generic/system.h      |    6 ++----
 include/asm-nios2/bits/timer.h    |    3 +--
 include/asm-powerpc/bits/timer.h  |    6 ++----
 include/asm-sh/bits/timer.h       |    3 +--
 include/asm-sim/bits/timer.h      |    3 +--
 include/asm-x86/bits/timer.h      |    6 ++----
 9 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/include/asm-arm/bits/timer.h b/include/asm-arm/bits/timer.h
index ba8c8f8..880fdfe 100644
--- a/include/asm-arm/bits/timer.h
+++ b/include/asm-arm/bits/timer.h
@@ -37,12 +37,10 @@ static inline void xnarch_program_timer_shot(unsigned long 
delay)
                rthal_nodiv_imuldiv_ceil(delay, rthal_tsc_to_timer));
 }
 
-static inline int xnarch_send_timer_ipi(xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi(xnarch_cpumask_t mask)
 {
 #ifdef CONFIG_SMP
-       return rthal_send_ipi(RTHAL_TIMER_IPI, mask);
-#else /* !CONFIG_SMP */
-       return 0;
+       rthal_send_ipi(RTHAL_TIMER_IPI, mask);
 #endif /* !CONFIG_SMP */
 }
 
diff --git a/include/asm-blackfin/bits/timer.h 
b/include/asm-blackfin/bits/timer.h
index 9caface..9c0f685 100644
--- a/include/asm-blackfin/bits/timer.h
+++ b/include/asm-blackfin/bits/timer.h
@@ -31,13 +31,8 @@ static inline void xnarch_program_timer_shot(unsigned long 
delay)
        rthal_timer_program_shot(delay);
 }
 
-static inline int xnarch_send_timer_ipi(xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi(xnarch_cpumask_t mask)
 {
-#ifdef CONFIG_SMP
-       return -1;              /* FIXME */
-#else /* ! CONFIG_SMP */
-       return 0;
-#endif /* CONFIG_SMP */
 }
 
 #endif /* !_XENO_ASM_BLACKFIN_BITS_TIMER_H */
diff --git a/include/asm-generic/bits/intr.h b/include/asm-generic/bits/intr.h
index 26f7aa1..29fa413 100644
--- a/include/asm-generic/bits/intr.h
+++ b/include/asm-generic/bits/intr.h
@@ -60,7 +60,9 @@ static inline void xnarch_chain_irq (unsigned irq)
 static inline void xnarch_set_irq_affinity (unsigned irq,
                                            xnarch_cpumask_t affinity)
 {
+#ifdef CONFIG_SMP
     rthal_set_irq_affinity(irq,affinity);
+#endif
 }
 
 static inline void *xnarch_get_irq_cookie(unsigned irq)
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h
index fe378ef..9881236 100644
--- a/include/asm-generic/system.h
+++ b/include/asm-generic/system.h
@@ -401,12 +401,10 @@ static inline void xnlock_put_irqrestore(xnlock_t *lock, 
spl_t flags)
        rthal_local_irq_restore(flags & 1);
 }
 
-static inline int xnarch_send_ipi(xnarch_cpumask_t cpumask)
+static inline void xnarch_send_ipi(xnarch_cpumask_t cpumask)
 {
 #ifdef CONFIG_SMP
-       return rthal_send_ipi(RTHAL_SERVICE_IPI0, cpumask);
-#else /* !CONFIG_SMP */
-       return 0;
+       rthal_send_ipi(RTHAL_SERVICE_IPI0, cpumask);
 #endif /* !CONFIG_SMP */
 }
 
diff --git a/include/asm-nios2/bits/timer.h b/include/asm-nios2/bits/timer.h
index 69b6e1a..d6de5b5 100644
--- a/include/asm-nios2/bits/timer.h
+++ b/include/asm-nios2/bits/timer.h
@@ -31,9 +31,8 @@ static inline void xnarch_program_timer_shot(unsigned long 
delay)
        rthal_timer_program_shot(d);
 }
 
-static inline int xnarch_send_timer_ipi(xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi(xnarch_cpumask_t mask)
 {
-       return -1;      /* No SMP support */
 }
 
 #endif /* !_XENO_ASM_NIOS2_BITS_TIMER_H */
diff --git a/include/asm-powerpc/bits/timer.h b/include/asm-powerpc/bits/timer.h
index 4ccfbbb..bfea7a6 100644
--- a/include/asm-powerpc/bits/timer.h
+++ b/include/asm-powerpc/bits/timer.h
@@ -40,12 +40,10 @@ static inline void xnarch_program_timer_shot(unsigned long 
delay)
                                 (delay, RTHAL_TIMER_FREQ, RTHAL_CLOCK_FREQ));
 }
 
-static inline int xnarch_send_timer_ipi(xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi(xnarch_cpumask_t mask)
 {
 #ifdef CONFIG_SMP
-       return rthal_send_ipi(RTHAL_TIMER_IPI, mask);
-#else /* ! CONFIG_SMP */
-       return 0;
+       rthal_send_ipi(RTHAL_TIMER_IPI, mask);
 #endif /* CONFIG_SMP */
 }
 
diff --git a/include/asm-sh/bits/timer.h b/include/asm-sh/bits/timer.h
index baf3c0f..c8af46d 100644
--- a/include/asm-sh/bits/timer.h
+++ b/include/asm-sh/bits/timer.h
@@ -31,9 +31,8 @@ static inline void xnarch_program_timer_shot(unsigned long 
delay)
        rthal_timer_program_shot(d);
 }
 
-static inline int xnarch_send_timer_ipi(xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi(xnarch_cpumask_t mask)
 {
-       return -1;      /* No SMP support */
 }
 
 #endif /* !_XENO_ASM_SH_BITS_TIMER_H */
diff --git a/include/asm-sim/bits/timer.h b/include/asm-sim/bits/timer.h
index 86ed4db..b0d7b41 100644
--- a/include/asm-sim/bits/timer.h
+++ b/include/asm-sim/bits/timer.h
@@ -25,9 +25,8 @@ static inline void xnarch_program_timer_shot (unsigned long 
delay)
     mvm_program_timer(delay ?: 1);
 }
 
-static inline int xnarch_send_timer_ipi (xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi (xnarch_cpumask_t mask)
 {
-    return -1;
 }
 
 #endif /* !_XENO_ASM_SIM_BITS_TIMER_H */
diff --git a/include/asm-x86/bits/timer.h b/include/asm-x86/bits/timer.h
index 8da40c8..09033af 100644
--- a/include/asm-x86/bits/timer.h
+++ b/include/asm-x86/bits/timer.h
@@ -36,12 +36,10 @@ static inline void xnarch_program_timer_shot(unsigned long 
delay)
                                 (delay, RTHAL_TIMER_FREQ, RTHAL_CPU_FREQ));
 }
 
-static inline int xnarch_send_timer_ipi(xnarch_cpumask_t mask)
+static inline void xnarch_send_timer_ipi(xnarch_cpumask_t mask)
 {
 #ifdef CONFIG_SMP
-       return rthal_send_ipi(RTHAL_APIC_TIMER_IPI, mask);
-#else /* ! CONFIG_SMP */
-       return 0;
+       rthal_send_ipi(RTHAL_APIC_TIMER_IPI, mask);
 #endif /* CONFIG_SMP */
 }
 


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

Reply via email to