Module: xenomai-forge Branch: master Commit: db0a88194e36218e9cec1796fa29a2fc24e993e3 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=db0a88194e36218e9cec1796fa29a2fc24e993e3
Author: Philippe Gerum <r...@xenomai.org> Date: Tue Jan 10 10:57:49 2012 +0100 cobalt/nucleus: introduce support for pipeline core IPIs --- include/asm-arm/hal.h | 2 +- include/asm-generic/bits/pod.h | 4 ++-- include/asm-generic/system.h | 5 ++--- include/asm-powerpc/hal.h | 3 +-- include/asm-x86/hal_32.h | 8 ++++++-- include/asm-x86/hal_64.h | 4 ++-- kernel/cobalt/arch/x86/hal.c | 2 +- kernel/cobalt/nucleus/intr.c | 19 ++++++++++++------- 8 files changed, 27 insertions(+), 20 deletions(-) diff --git a/include/asm-arm/hal.h b/include/asm-arm/hal.h index 6a2184a..a2d8ae1 100644 --- a/include/asm-arm/hal.h +++ b/include/asm-arm/hal.h @@ -149,7 +149,7 @@ static inline __attribute_const__ unsigned long ffnz(unsigned long ul) #endif /* RTHAL_TIMER_IRQ */ #ifndef RTHAL_TIMER_IPI -#define RTHAL_TIMER_IPI IPIPE_SERVICE_IPI3 +#define RTHAL_TIMER_IPI IPIPE_HRTIMER_IPI #endif /* RTHAL_TIMER_IPI */ #define RTHAL_TSC_INFO(p) ((p)->arch_tsc) diff --git a/include/asm-generic/bits/pod.h b/include/asm-generic/bits/pod.h index 868e9e8..ded4d52 100644 --- a/include/asm-generic/bits/pod.h +++ b/include/asm-generic/bits/pod.h @@ -141,14 +141,14 @@ static void xnarch_switch_htick_mode(enum clock_event_mode mode, struct clock_ev static inline int xnarch_hook_ipi(void (*handler)(void)) { - return ipipe_request_irq(&rthal_archdata.domain, IPIPE_SERVICE_IPI0, + return ipipe_request_irq(&rthal_archdata.domain, IPIPE_RESCHEDULE_IPI, (ipipe_irq_handler_t) handler, NULL, NULL); } static inline void xnarch_release_ipi(void) { - return ipipe_free_irq(&rthal_archdata.domain, IPIPE_SERVICE_IPI0); + return ipipe_free_irq(&rthal_archdata.domain, IPIPE_RESCHEDULE_IPI); } static inline void xnarch_notify_halt(void) diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h index f6ce998..76e83a9 100644 --- a/include/asm-generic/system.h +++ b/include/asm-generic/system.h @@ -318,7 +318,7 @@ static inline void xnlock_put_irqrestore(struct xnlock *lock, spl_t flags) static inline void xnarch_send_ipi(xnarch_cpumask_t cpumask) { #ifdef CONFIG_SMP - ipipe_send_ipi(IPIPE_SERVICE_IPI0, cpumask); + ipipe_send_ipi(IPIPE_RESCHEDULE_IPI, cpumask); #endif /* !CONFIG_SMP */ } @@ -343,9 +343,8 @@ static inline int xnlock_is_owner(struct xnlock *lock) #define DEFINE_XNLOCK(lock) #define DEFINE_PRIVATE_XNLOCK(lock) -static inline int xnarch_send_ipi (xnarch_cpumask_t cpumask) +static inline void xnarch_send_ipi (xnarch_cpumask_t cpumask) { - return 0; } #endif /* !(CONFIG_SMP || XENO_DEBUG(XNLOCK)) */ diff --git a/include/asm-powerpc/hal.h b/include/asm-powerpc/hal.h index f39e968..4b7fa03 100644 --- a/include/asm-powerpc/hal.h +++ b/include/asm-powerpc/hal.h @@ -58,8 +58,7 @@ static inline __attribute_const__ unsigned long ffnz(unsigned long ul) #define RTHAL_TIMER_IRQ IPIPE_TIMER_VIRQ #ifdef CONFIG_SMP -#define RTHAL_TIMER_IPI IPIPE_SERVICE_IPI3 -#define RTHAL_HOST_TIMER_IPI IPIPE_SERVICE_IPI4 +#define RTHAL_TIMER_IPI IPIPE_HRTIMER_IPI #endif /* CONFIG_SMP */ #define RTHAL_HOST_TICK_IRQ RTHAL_TIMER_IRQ diff --git a/include/asm-x86/hal_32.h b/include/asm-x86/hal_32.h index 6f6f423..264d345 100644 --- a/include/asm-x86/hal_32.h +++ b/include/asm-x86/hal_32.h @@ -79,14 +79,18 @@ static inline __attribute_const__ unsigned long ffnz(unsigned long ul) #include <asm/fixmap.h> #include <asm/apic.h> #endif /* CONFIG_X86_LOCAL_APIC */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) +#include <linux/i8253.h> +#else #include <asm/i8253.h> +#endif #include <asm/msr.h> #include <asm/xenomai/atomic.h> #include <asm/xenomai/smi.h> #ifdef CONFIG_X86_LOCAL_APIC -#define RTHAL_APIC_TIMER_VECTOR IPIPE_SERVICE_VECTOR3 -#define RTHAL_APIC_TIMER_IPI IPIPE_SERVICE_IPI3 +#define RTHAL_APIC_TIMER_VECTOR IPIPE_HRTIMER_VECTOR +#define RTHAL_APIC_TIMER_IPI IPIPE_HRTIMER_IPI #define RTHAL_APIC_ICOUNT ((RTHAL_TIMER_FREQ + HZ/2)/HZ) #define RTHAL_TIMER_IRQ RTHAL_APIC_TIMER_IPI #define RTHAL_HOST_TICK_IRQ ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR) diff --git a/include/asm-x86/hal_64.h b/include/asm-x86/hal_64.h index 0911bda..bd138b5 100644 --- a/include/asm-x86/hal_64.h +++ b/include/asm-x86/hal_64.h @@ -49,8 +49,8 @@ static inline __attribute_const__ unsigned long ffnz(unsigned long ul) #include <asm/xenomai/atomic.h> #include <asm/xenomai/smi.h> -#define RTHAL_APIC_TIMER_VECTOR IPIPE_SERVICE_VECTOR3 -#define RTHAL_APIC_TIMER_IPI IPIPE_SERVICE_IPI3 +#define RTHAL_APIC_TIMER_VECTOR IPIPE_HRTIMER_VECTOR +#define RTHAL_APIC_TIMER_IPI IPIPE_HRTIMER_IPI #define RTHAL_APIC_ICOUNT ((RTHAL_TIMER_FREQ + HZ/2)/HZ) #define RTHAL_TIMER_IRQ RTHAL_APIC_TIMER_IPI #define RTHAL_HOST_TICK_IRQ ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR) diff --git a/kernel/cobalt/arch/x86/hal.c b/kernel/cobalt/arch/x86/hal.c index fef139e..2bfa139 100644 --- a/kernel/cobalt/arch/x86/hal.c +++ b/kernel/cobalt/arch/x86/hal.c @@ -266,7 +266,7 @@ unsigned long rthal_timer_calibrate(void) dt = rthal_rdtsc() - t; - flags = hard_local_irq_restore(); + hard_local_irq_restore(flags); /* * Reset the max trace, since it contains the calibration time diff --git a/kernel/cobalt/nucleus/intr.c b/kernel/cobalt/nucleus/intr.c index 2ac46e7..aa02040 100644 --- a/kernel/cobalt/nucleus/intr.c +++ b/kernel/cobalt/nucleus/intr.c @@ -974,17 +974,22 @@ static inline int format_irq_proc(unsigned int irq, if (irq == XNARCH_TIMER_IRQ) { xnvfile_puts(it, " [timer]"); return 0; + } + + switch (irq) { #ifdef CONFIG_SMP - } else if (irq >= IPIPE_SERVICE_IPI0 && irq <= IPIPE_SERVICE_IPI3) { - xnvfile_printf(it, " [IPI%d]", irq - IPIPE_SERVICE_IPI0); + case IPIPE_RESCHEDULE_IPI: + xnvfile_puts(it, " [reschedule]"); return 0; - } else if (irq == IPIPE_CRITICAL_IPI) { - xnvfile_puts(it, " [critical sync]"); + case IPIPE_CRITICAL_IPI: + xnvfile_puts(it, " [sync]"); return 0; #endif /* CONFIG_SMP */ - } else if (ipipe_virtual_irq_p(irq)) { - xnvfile_puts(it, " [virtual]"); - return 0; + default: + if (ipipe_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