From: Jan Kiszka <jan.kiszka@domain.hid>
To: Xenomai-core@domain.hid
Subject: [Xenomai-core] [PATCH] fix __ipipe_tick_irq tracking across APIC reprogramming
Date: Wed, 26 Dec 2007 16:40:33 +0100 [thread overview]
Message-ID: <477275F1.6020708@domain.hid> (raw)
[-- 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 --]
next reply other threads:[~2007-12-26 15:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-26 15:40 Jan Kiszka [this message]
2007-12-26 18:33 ` [Xenomai-core] [PATCH] fix __ipipe_tick_irq tracking across APIC reprogramming Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=477275F1.6020708@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Xenomai-core@domain.hid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.