Module: xenomai-forge
Branch: master
Commit: 7cdbad539951f1b575c6f6b7744d88dbe0ee0fc5
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7cdbad539951f1b575c6f6b7744d88dbe0ee0fc5

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Aug 30 20:52:38 2013 +0200

cobalt/intr: forward host ticks on non-real-time CPUs

In case the per-CPU timer of a non-real-time CPU shares its IRQ with a
real-time timer, we will receive Linux-originated IRQs on that CPU as
well. Properly forward them to avoid stuck Linux timers.

At this chance, consolidate over XNARCH_HOST_TICK_IRQ.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 kernel/cobalt/intr.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/kernel/cobalt/intr.c b/kernel/cobalt/intr.c
index 3af0792..b05aeff 100644
--- a/kernel/cobalt/intr.c
+++ b/kernel/cobalt/intr.c
@@ -82,7 +82,7 @@ void xnintr_host_tick(struct xnsched *sched) /* Interrupts 
off. */
 {
        sched->lflags &= ~XNHTICK;
 #ifdef XNARCH_HOST_TICK_IRQ
-       ipipe_post_irq_root(per_cpu(ipipe_percpu.hrtimer_irq, 
xnsched_cpu(sched)));
+       ipipe_post_irq_root(XNARCH_HOST_TICK_IRQ);
 #endif
 }
 
@@ -97,6 +97,13 @@ void xnintr_core_clock_handler(void)
        struct xnirqstat *statp;
        xnstat_exectime_t *prev;
 
+       if (!xnsched_supported_cpu(cpu)) {
+#ifdef XNARCH_HOST_TICK_IRQ
+               ipipe_post_irq_root(XNARCH_HOST_TICK_IRQ);
+#endif
+               return;
+       }
+
        statp = __this_cpu_ptr(nktimer.stats);
        prev = xnstat_exectime_switch(sched, &statp->account);
        xnstat_counter_inc(&statp->hits);


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

Reply via email to