* [Xenomai-core] [PATCH] fix __ipipe_tick_irq tracking across APIC reprogramming
@ 2007-12-26 15:40 Jan Kiszka
2007-12-26 18:33 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2007-12-26 15:40 UTC (permalink / raw)
To: Xenomai-core
[-- Attachment #1.1: Type: text/plain, Size: 390 bytes --]
As LOCAL_TIMER_VECTOR != RTHAL_APIC_TIMER_VECTOR (Philippe, what was the
motivation for this?), we need to update __ipipe_tick_irq when we
reprogram the APIC. Otherwise, I-pipe will not be able to capture and
forward the related IRQ registers.
At this chance, refactor some references to Xenomai's own APIC timer IRQ.
Merry Christmas and all the best for 2008 to everyone!
Jan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: update-ipipe_tick_irq.patch --]
[-- Type: text/x-patch; name="update-ipipe_tick_irq.patch", Size: 1638 bytes --]
Index: xenomai/ksrc/arch/x86/hal-common.c
===================================================================
--- xenomai/ksrc/arch/x86/hal-common.c (Revision 3301)
+++ xenomai/ksrc/arch/x86/hal-common.c (Arbeitskopie)
@@ -54,7 +54,7 @@
case RTHAL_SET_ONESHOT_LINUX:
rthal_setup_oneshot_apic(LOCAL_TIMER_VECTOR);
/* We need to keep the timing cycle alive for the kernel. */
- rthal_trigger_irq(ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR));
+ rthal_trigger_irq(RTHAL_HOST_TICK_IRQ);
break;
case RTHAL_SET_PERIODIC:
@@ -71,11 +71,14 @@
if (rt_mode) {
rthal_sync_op = RTHAL_SET_ONESHOT_XENOMAI;
rthal_setup_oneshot_apic(RTHAL_APIC_TIMER_VECTOR);
+ if (rthal_ktimer_saved_mode != KTIMER_MODE_UNUSED)
+ __ipipe_tick_irq = RTHAL_TIMER_IRQ;
} else {
rthal_sync_op = RTHAL_SET_ONESHOT_LINUX;
rthal_setup_oneshot_apic(LOCAL_TIMER_VECTOR);
+ __ipipe_tick_irq = RTHAL_HOST_TICK_IRQ;
/* We need to keep the timing cycle alive for the kernel. */
- rthal_trigger_irq(ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR));
+ rthal_trigger_irq(RTHAL_HOST_TICK_IRQ);
}
rthal_critical_exit(flags);
}
@@ -87,6 +90,7 @@
flags = rthal_critical_enter(&rthal_critical_sync);
rthal_sync_op = RTHAL_SET_PERIODIC;
rthal_setup_periodic_apic(RTHAL_APIC_ICOUNT, LOCAL_TIMER_VECTOR);
+ __ipipe_tick_irq = RTHAL_HOST_TICK_IRQ;
rthal_critical_exit(flags);
}
@@ -112,7 +116,7 @@
#ifdef CONFIG_SMP
send_IPI_all(LOCAL_TIMER_VECTOR);
#else
- rthal_trigger_irq(ipipe_apic_vector_irq(LOCAL_TIMER_VECTOR));
+ rthal_trigger_irq(RTHAL_HOST_TICK_IRQ);
#endif
return IRQ_HANDLED;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Xenomai-core] [PATCH] fix __ipipe_tick_irq tracking across APIC reprogramming
2007-12-26 15:40 [Xenomai-core] [PATCH] fix __ipipe_tick_irq tracking across APIC reprogramming Jan Kiszka
@ 2007-12-26 18:33 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2007-12-26 18:33 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-core
Jan Kiszka wrote:
> As LOCAL_TIMER_VECTOR != RTHAL_APIC_TIMER_VECTOR (Philippe, what was the
> motivation for this?),
In some cases, it's much saner to have two separate timer hw interrupt
sources, so that we may trigger a timer tick targeted at the Linux
kernel only from whatever domain, while grabbing the real-time timer
interrupt within the Xenomai domain, without getting any "boomerang"
effect. This is why we grab IPI3 and propagate to the local timer vector.
we need to update __ipipe_tick_irq when we
> reprogram the APIC. Otherwise, I-pipe will not be able to capture and
> forward the related IRQ registers.
>
> At this chance, refactor some references to Xenomai's own APIC timer IRQ.
>
> Merry Christmas and all the best for 2008 to everyone!
>
Thanks, best wishes for 2008 too.
> Jan
>
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-26 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-26 15:40 [Xenomai-core] [PATCH] fix __ipipe_tick_irq tracking across APIC reprogramming Jan Kiszka
2007-12-26 18:33 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.