Module: xenomai-head Branch: master Commit: d740688e53232491f6572637f95ee15a4df094c0 URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=d740688e53232491f6572637f95ee15a4df094c0
Author: Philippe Gerum <r...@xenomai.org> Date: Tue Apr 28 11:01:10 2009 +0200 Introduce PIC mute support, initially for powerpc. Some I-pipe patches may allow to tell the embedded PICs to mute the low priority interrupt channels, i.e. all IRQs which are not of any interest to a heading pipeline domain like Xenomai (typically, Linux-handled device interrupts). When available, this feature prevents the real-time activity to be preempted by non-related interrupt events, even for the short time needed by the I-pipe to log them. When this support is available from the I-pipe, the Xenomai scheduler will request all PICs to mute the low priority interrupts when entering the Xenomai domain, and conversely unmute them when leaving it. NOTE: not all platforms may provide such feature, since it depends on the characteristics of the embedded PICs (typically, how straightforward it is to mask or lower the priority of a subset of interrupt sources), and whether the I-pipe implements this feature. --- include/asm-generic/hal.h | 7 +++++++ include/asm-powerpc/bits/pod.h | 2 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/hal.h b/include/asm-generic/hal.h index 7628fff..b37e476 100644 --- a/include/asm-generic/hal.h +++ b/include/asm-generic/hal.h @@ -161,6 +161,13 @@ typedef spinlock_t rthal_spinlock_t; #define rthal_send_ipi(irq,cpus) ipipe_send_ipi(irq,cpus) #define rthal_lock_irq(dom,cpu,irq) __ipipe_lock_irq(dom,cpu,irq) #define rthal_unlock_irq(dom,irq) __ipipe_unlock_irq(dom,irq) +#ifdef __IPIPE_FEATURE_PIC_MUTE +#define rthal_mute_pic() ipipe_mute_pic() +#define rthal_unmute_pic() ipipe_unmute_pic() +#else /* !__IPIPE_FEATURE_PIC_MUTE */ +#define rthal_mute_pic() do { } while(0) +#define rthal_unmute_pic() do { } while(0) +#endif /* __IPIPE_FEATURE_PIC_MUTE */ #define rthal_processor_id() ipipe_processor_id() diff --git a/include/asm-powerpc/bits/pod.h b/include/asm-powerpc/bits/pod.h index c335ccc..f412d0c 100644 --- a/include/asm-powerpc/bits/pod.h +++ b/include/asm-powerpc/bits/pod.h @@ -59,6 +59,7 @@ void xnpod_delete_thread(struct xnthread *); static inline void xnarch_leave_root(xnarchtcb_t * rootcb) { + rthal_mute_pic(); /* Remember the preempted Linux task pointer. */ rootcb->user_task = rootcb->active_task = current; rootcb->tsp = ¤t->thread; @@ -80,6 +81,7 @@ static inline void xnarch_enter_root(xnarchtcb_t * rootcb) if (!rootcb->mm) set_ti_thread_flag(rootcb->tip, TIF_MMSWITCH_INT); #endif + rthal_unmute_pic(); } struct xnlock; _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git