Module: xenomai-2.6 Branch: master Commit: d2c78d137cd5d7fb4f5a9b7c7d5ae3cdce6ddbd8 URL: http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=d2c78d137cd5d7fb4f5a9b7c7d5ae3cdce6ddbd8
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Tue Jul 24 20:58:45 2012 +0200 hal/arm: adapt to I-pipe core patch for Linux 3.4 --- include/asm-generic/system.h | 2 +- include/asm-generic/wrappers.h | 40 ++++++++++++++++++++++++++++++++++++++++ ksrc/nucleus/intr.c | 15 +++++++-------- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h index 7627bf7..4ab2e05 100644 --- a/include/asm-generic/system.h +++ b/include/asm-generic/system.h @@ -252,7 +252,7 @@ static inline int xnlock_dbg_release(xnlock_t *lock) typedef cpumask_t xnarch_cpumask_t; #ifdef CONFIG_SMP -#define xnarch_cpu_online_map cpu_online_map +#define xnarch_cpu_online_map (*cpu_online_mask) #else #define xnarch_cpu_online_map cpumask_of_cpu(0) #endif diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h index 2b8f917..3552e43 100644 --- a/include/asm-generic/wrappers.h +++ b/include/asm-generic/wrappers.h @@ -679,4 +679,44 @@ static inline void wrap_proc_dir_entry_owner(struct proc_dir_entry *entry) }) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) +#define cpu_online_mask &(cpu_online_map) +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +static inline void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp) +{ + unsigned long __tmp = __fd / __NFDBITS; + unsigned long __rem = __fd % __NFDBITS; + __fdsetp->fds_bits[__tmp] |= (1UL<<__rem); +} + +static inline void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp) +{ + unsigned long __tmp = __fd / __NFDBITS; + unsigned long __rem = __fd % __NFDBITS; + __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem); +} + +static inline int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p) +{ + unsigned long __tmp = __fd / __NFDBITS; + unsigned long __rem = __fd % __NFDBITS; + return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0; +} + +static inline void __FD_ZERO(__kernel_fd_set *__p) +{ + unsigned long *__tmp = __p->fds_bits; + int __i; + + __i = __FDSET_LONGS; + while (__i) { + __i--; + *__tmp = 0; + __tmp++; + } +} +#endif + #endif /* _XENO_ASM_GENERIC_WRAPPERS_H */ diff --git a/ksrc/nucleus/intr.c b/ksrc/nucleus/intr.c index 2955eb7..c75fcac 100644 --- a/ksrc/nucleus/intr.c +++ b/ksrc/nucleus/intr.c @@ -990,20 +990,19 @@ static inline int format_irq_proc(unsigned int irq, return 0; } - switch (irq) { #ifdef CONFIG_SMP - case RTHAL_RESCHEDULE_IPI: + if (irq == RTHAL_RESCHEDULE_IPI) { xnvfile_puts(it, " [reschedule]"); return 0; - case RTHAL_CRITICAL_IPI: + } + if (irq == RTHAL_CRITICAL_IPI) { xnvfile_puts(it, " [sync]"); return 0; + } #endif /* CONFIG_SMP */ - default: - if (rthal_virtual_irq_p(irq)) { - xnvfile_puts(it, " [virtual]"); - return 0; - } + if (rthal_virtual_irq_p(irq)) { + xnvfile_puts(it, " [virtual]"); + return 0; } xnlock_get_irqsave(&intrlock, s); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git