* [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
@ 2006-08-17 21:15 Gilles Chanteperdrix
2006-08-18 10:55 ` Philippe Gerum
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2006-08-17 21:15 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1063 bytes --]
Hi,
For review, you will find attached to this mail a patch which allows
Xenomai to run on ARM platforms where the timer interrupt is
shared. Such a platform have to define the constant
IPIPE_HAVE_SHARED_TIMER_IRQ, as well as two functions or macros:
- ipipe_timer_irq_p(), used by xnpod_announce_tick to test whether a
timer interrupt is pending, in which case it is handled, otherwise
xnpod_announce_tick returns with the XN_ISR_PROPAGATE so that the
interrupt is propagated to the Linux domain.
- ipipe_mark_root_timer_irq(), used by xnarch_relay_tick so that the
interrupt propagated by xnarch_relay_tick is treated by the root domain
as a timer irq. As a matter of fact, since the interrupt is shared, the
root domain has to know whether the irq is a timer irq, and since this
interrupt is forged, the root domain can not rely on the same hardware
mechanism as the xenomai domain irq.
The patch also contains a tiny patch of Xenomai syslib so that
__tickAnnounce has the same return value as xnpod_announce_tick.
--
Gilles Chanteperdrix.
[-- Attachment #2: xeno-shared-timer-irq.diff --]
[-- Type: text/plain, Size: 2654 bytes --]
Index: include/asm-generic/hal.h
===================================================================
--- include/asm-generic/hal.h (revision 1451)
+++ include/asm-generic/hal.h (working copy)
@@ -679,6 +679,12 @@
#endif /* CONFIG_IPIPE_TRACE */
+#ifdef IPIPE_HAVE_SHARED_TIMER_IRQ
+#define RTHAL_HAVE_SHARED_TIMER_IRQ
+#define rthal_timer_irq_p() ipipe_timer_irq_p()
+#define rthal_mark_root_timer_irq() ipipe_mark_root_timer_irq()
+#endif /* IPIPE_SHARED_TIMER_IRQ */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Index: include/asm-generic/system.h
===================================================================
--- include/asm-generic/system.h (revision 1451)
+++ include/asm-generic/system.h (working copy)
@@ -487,4 +487,9 @@
#define xnarch_post_graph(obj,state)
#define xnarch_post_graph_if(obj,state,cond)
+#ifdef RTHAL_HAVE_SHARED_TIMER_IRQ
+#define XNARCH_HAVE_SHARED_TIMER_IRQ
+#define xnarch_timer_irq_p() rthal_timer_irq_p()
+#endif /* IPIPE_SHARED_TIMER_IRQ */
+
#endif /* !_XENO_ASM_GENERIC_SYSTEM_H */
Index: include/asm-arm/bits/intr.h
===================================================================
--- include/asm-arm/bits/intr.h (revision 1451)
+++ include/asm-arm/bits/intr.h (working copy)
@@ -27,6 +27,9 @@
static inline void xnarch_relay_tick(void)
{
+#ifdef RTHAL_HAVE_SHARED_TIMER_IRQ
+ rthal_mark_root_timer_irq();
+#endif /* RTHAL_HAVE_SHARED_TIMER_IRQ */
rthal_irq_host_pend(RTHAL_TIMER_IRQ);
}
Index: ksrc/skins/vxworks/sysLib.c
===================================================================
--- ksrc/skins/vxworks/sysLib.c (revision 1451)
+++ ksrc/skins/vxworks/sysLib.c (working copy)
@@ -24,19 +24,20 @@
static wind_tick_handler_t tick_handler;
static long tick_handler_arg;
+static int tick_status [XNARCH_NR_CPUS];
void tickAnnounce(void)
{
if (tick_handler != NULL)
tick_handler(tick_handler_arg);
- xnpod_announce_tick(&nkclock);
+ tick_status[xnarch_current_cpu()] = xnpod_announce_tick(&nkclock);
}
static int __tickAnnounce(xnintr_t *intr)
{
tickAnnounce();
- return XN_ISR_HANDLED | XN_ISR_NOENABLE;
+ return tick_status[xnarch_current_cpu()];
}
int wind_sysclk_init(u_long init_rate)
Index: ksrc/nucleus/pod.c
===================================================================
--- ksrc/nucleus/pod.c (revision 1451)
+++ ksrc/nucleus/pod.c (working copy)
@@ -3249,6 +3249,11 @@
{
xnsched_t *sched;
+#ifdef XNARCH_HAVE_SHARED_TIMER_IRQ
+ if (!xnarch_timer_irq_p())
+ return XN_ISR_NONE | XN_ISR_NOENABLE | XN_ISR_PROPAGATE;
+#endif /* XNARCH_HAVE_SHARED_TIMER_IRQ */
+
sched = xnpod_current_sched();
xnlock_get(&nklock);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
2006-08-17 21:15 [Xenomai-core] [rfc, patch] allow timer interrupt to be shared Gilles Chanteperdrix
@ 2006-08-18 10:55 ` Philippe Gerum
2006-08-18 11:16 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2006-08-18 10:55 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Thu, 2006-08-17 at 23:15 +0200, Gilles Chanteperdrix wrote:
> Hi,
>
> For review, you will find attached to this mail a patch which allows
> Xenomai to run on ARM platforms where the timer interrupt is
> shared. Such a platform have to define the constant
> IPIPE_HAVE_SHARED_TIMER_IRQ, as well as two functions or macros:
> - ipipe_timer_irq_p(), used by xnpod_announce_tick to test whether a
> timer interrupt is pending, in which case it is handled, otherwise
> xnpod_announce_tick returns with the XN_ISR_PROPAGATE so that the
> interrupt is propagated to the Linux domain.
> - ipipe_mark_root_timer_irq(), used by xnarch_relay_tick so that the
> interrupt propagated by xnarch_relay_tick is treated by the root domain
> as a timer irq. As a matter of fact, since the interrupt is shared, the
> root domain has to know whether the irq is a timer irq, and since this
> interrupt is forged, the root domain can not rely on the same hardware
> mechanism as the xenomai domain irq.
>
> The patch also contains a tiny patch of Xenomai syslib so that
> __tickAnnounce has the same return value as xnpod_announce_tick.
>
>
>
> plain text document attachment (xeno-shared-timer-irq.diff)
> Index: include/asm-generic/hal.h
> ===================================================================
> --- include/asm-generic/hal.h (revision 1451)
> +++ include/asm-generic/hal.h (working copy)
> @@ -679,6 +679,12 @@
>
> #endif /* CONFIG_IPIPE_TRACE */
>
> +#ifdef IPIPE_HAVE_SHARED_TIMER_IRQ
> +#define RTHAL_HAVE_SHARED_TIMER_IRQ
> +#define rthal_timer_irq_p() ipipe_timer_irq_p()
> +#define rthal_mark_root_timer_irq() ipipe_mark_root_timer_irq()
> +#endif /* IPIPE_SHARED_TIMER_IRQ */
Let's avoid cascading conditionals through the layers here too:
#else
#define rthal_timer_irq_p() 0
#define rthal_mark_root_timer_irq() do { } while(0)
#endif
> +
I'd rather keep the number of obscure conditional macros as low as
possible; we should actually try to reduce them since we have a growing
number of real and pseudo-archs to support, and those macros tend to
obfuscate the generic code.
In the same vein, is there anything we could use in the compatible Adeos
patch that would unambiguously identify the presence of such support
without resorting to yet-another-macro like IPIPE_HAVE_SHARED_TIMER_IRQ?
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
> Index: include/asm-generic/system.h
> ===================================================================
> --- include/asm-generic/system.h (revision 1451)
> +++ include/asm-generic/system.h (working copy)
> @@ -487,4 +487,9 @@
> #define xnarch_post_graph(obj,state)
> #define xnarch_post_graph_if(obj,state,cond)
>
> +#ifdef RTHAL_HAVE_SHARED_TIMER_IRQ
> +#define XNARCH_HAVE_SHARED_TIMER_IRQ
> +#define xnarch_timer_irq_p() rthal_timer_irq_p()
> +#endif /* IPIPE_SHARED_TIMER_IRQ */
#define xnarch_timer_irq_p() rthal_timer_irq_p()
> +
> #endif /* !_XENO_ASM_GENERIC_SYSTEM_H */
> Index: include/asm-arm/bits/intr.h
> ===================================================================
> --- include/asm-arm/bits/intr.h (revision 1451)
> +++ include/asm-arm/bits/intr.h (working copy)
> @@ -27,6 +27,9 @@
>
> static inline void xnarch_relay_tick(void)
> {
> +#ifdef RTHAL_HAVE_SHARED_TIMER_IRQ
> + rthal_mark_root_timer_irq();
> +#endif /* RTHAL_HAVE_SHARED_TIMER_IRQ */
> rthal_irq_host_pend(RTHAL_TIMER_IRQ);
> }
>
> Index: ksrc/skins/vxworks/sysLib.c
> ===================================================================
> --- ksrc/skins/vxworks/sysLib.c (revision 1451)
> +++ ksrc/skins/vxworks/sysLib.c (working copy)
> @@ -24,19 +24,20 @@
>
> static wind_tick_handler_t tick_handler;
> static long tick_handler_arg;
> +static int tick_status [XNARCH_NR_CPUS];
>
> void tickAnnounce(void)
> {
> if (tick_handler != NULL)
> tick_handler(tick_handler_arg);
>
> - xnpod_announce_tick(&nkclock);
> + tick_status[xnarch_current_cpu()] = xnpod_announce_tick(&nkclock);
> }
>
> static int __tickAnnounce(xnintr_t *intr)
> {
> tickAnnounce();
> - return XN_ISR_HANDLED | XN_ISR_NOENABLE;
> + return tick_status[xnarch_current_cpu()];
> }
>
> int wind_sysclk_init(u_long init_rate)
> Index: ksrc/nucleus/pod.c
> ===================================================================
> --- ksrc/nucleus/pod.c (revision 1451)
> +++ ksrc/nucleus/pod.c (working copy)
> @@ -3249,6 +3249,11 @@
> {
> xnsched_t *sched;
>
> +#ifdef XNARCH_HAVE_SHARED_TIMER_IRQ
> + if (!xnarch_timer_irq_p())
> + return XN_ISR_NONE | XN_ISR_NOENABLE | XN_ISR_PROPAGATE;
> +#endif /* XNARCH_HAVE_SHARED_TIMER_IRQ */
> +
> sched = xnpod_current_sched();
>
> xnlock_get(&nklock);
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
2006-08-18 10:55 ` Philippe Gerum
@ 2006-08-18 11:16 ` Gilles Chanteperdrix
2006-08-18 12:36 ` Philippe Gerum
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2006-08-18 11:16 UTC (permalink / raw)
To: rpm; +Cc: xenomai
Philippe Gerum wrote:
> I'd rather keep the number of obscure conditional macros as low as
> possible; we should actually try to reduce them since we have a growing
> number of real and pseudo-archs to support, and those macros tend to
> obfuscate the generic code.
>
> In the same vein, is there anything we could use in the compatible Adeos
> patch that would unambiguously identify the presence of such support
> without resorting to yet-another-macro like IPIPE_HAVE_SHARED_TIMER_IRQ?
We could decide that ipipe_timer_irq_p() must be implemented as a macro,
and use #ifdef ipipe_timer_irq_p but I thought that #ifdef
IPIPE_HAVE_SHARED_TIMER_IRQ was easier to understand.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
2006-08-18 11:16 ` Gilles Chanteperdrix
@ 2006-08-18 12:36 ` Philippe Gerum
2006-08-18 12:39 ` Philippe Gerum
0 siblings, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2006-08-18 12:36 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Fri, 2006-08-18 at 13:16 +0200, Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
> > I'd rather keep the number of obscure conditional macros as low as
> > possible; we should actually try to reduce them since we have a growing
> > number of real and pseudo-archs to support, and those macros tend to
> > obfuscate the generic code.
> >
> > In the same vein, is there anything we could use in the compatible Adeos
> > patch that would unambiguously identify the presence of such support
> > without resorting to yet-another-macro like IPIPE_HAVE_SHARED_TIMER_IRQ?
>
> We could decide that ipipe_timer_irq_p() must be implemented as a macro,
> and use #ifdef ipipe_timer_irq_p but I thought that #ifdef
> IPIPE_HAVE_SHARED_TIMER_IRQ was easier to understand.
>
It is, but the point is that we should not define a normalized
interface; older ARM patches are obsoleted by the very existence of the
new one adding a required feature for PXA. Therefore, at some point in
time, we are going to deprecate them, removing the conditional from the
Xenomai codebase. In other words, this code is aimed at transitioning
internally between two Adeos patch series, not at providing a stable
interface.
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
2006-08-18 12:36 ` Philippe Gerum
@ 2006-08-18 12:39 ` Philippe Gerum
2006-08-18 13:53 ` Gilles Chanteperdrix
0 siblings, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2006-08-18 12:39 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Fri, 2006-08-18 at 14:36 +0200, Philippe Gerum wrote:
> On Fri, 2006-08-18 at 13:16 +0200, Gilles Chanteperdrix wrote:
> > Philippe Gerum wrote:
> > > I'd rather keep the number of obscure conditional macros as low as
> > > possible; we should actually try to reduce them since we have a growing
> > > number of real and pseudo-archs to support, and those macros tend to
> > > obfuscate the generic code.
> > >
> > > In the same vein, is there anything we could use in the compatible Adeos
> > > patch that would unambiguously identify the presence of such support
> > > without resorting to yet-another-macro like IPIPE_HAVE_SHARED_TIMER_IRQ?
> >
> > We could decide that ipipe_timer_irq_p() must be implemented as a macro,
> > and use #ifdef ipipe_timer_irq_p but I thought that #ifdef
> > IPIPE_HAVE_SHARED_TIMER_IRQ was easier to understand.
> >
>
> It is, but the point is that we should not define a normalized
> interface; older ARM patches are obsoleted by the very existence of the
> new one adding a required feature for PXA.
AT91.
> Therefore, at some point in
> time, we are going to deprecate them, removing the conditional from the
> Xenomai codebase. In other words, this code is aimed at transitioning
> internally between two Adeos patch series, not at providing a stable
> interface.
>
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
2006-08-18 12:39 ` Philippe Gerum
@ 2006-08-18 13:53 ` Gilles Chanteperdrix
2006-08-18 14:21 ` Philippe Gerum
0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2006-08-18 13:53 UTC (permalink / raw)
To: rpm; +Cc: xenomai
[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1501 bytes --]
Philippe Gerum wrote:
> On Fri, 2006-08-18 at 14:36 +0200, Philippe Gerum wrote:
> > On Fri, 2006-08-18 at 13:16 +0200, Gilles Chanteperdrix wrote:
> > > Philippe Gerum wrote:
> > > > I'd rather keep the number of obscure conditional macros as low as
> > > > possible; we should actually try to reduce them since we have a growing
> > > > number of real and pseudo-archs to support, and those macros tend to
> > > > obfuscate the generic code.
> > > >
> > > > In the same vein, is there anything we could use in the compatible Adeos
> > > > patch that would unambiguously identify the presence of such support
> > > > without resorting to yet-another-macro like IPIPE_HAVE_SHARED_TIMER_IRQ?
> > >
> > > We could decide that ipipe_timer_irq_p() must be implemented as a macro,
> > > and use #ifdef ipipe_timer_irq_p but I thought that #ifdef
> > > IPIPE_HAVE_SHARED_TIMER_IRQ was easier to understand.
> > >
> >
> > It is, but the point is that we should not define a normalized
> > interface; older ARM patches are obsoleted by the very existence of the
> > new one adding a required feature for PXA.
>
> AT91.
>
> > Therefore, at some point in
> > time, we are going to deprecate them, removing the conditional from the
> > Xenomai codebase. In other words, this code is aimed at transitioning
> > internally between two Adeos patch series, not at providing a stable
> > interface.
Here is a new version of the patch.
--
Gilles Chanteperdrix.
[-- Attachment #2: xeno-shared-timer-irq.2.diff --]
[-- Type: text/plain, Size: 2494 bytes --]
Index: include/asm-generic/hal.h
===================================================================
--- include/asm-generic/hal.h (revision 1451)
+++ include/asm-generic/hal.h (working copy)
@@ -679,6 +679,15 @@
#endif /* CONFIG_IPIPE_TRACE */
+#ifdef ipipe_timer_irq_p
+/* Timer IRQ is shared. */
+#define rthal_timer_irq_p() ipipe_timer_irq_p()
+#define rthal_mark_root_timer_irq() ipipe_mark_root_timer_irq()
+#else /* !IPIPE_SHARED_TIMER_IRQ */
+#define rthal_timer_irq_p() 1
+#define rthal_mark_root_timer_irq() do { } while(0)
+#endif /* IPIPE_SHARED_TIMER_IRQ */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Index: include/asm-generic/system.h
===================================================================
--- include/asm-generic/system.h (revision 1451)
+++ include/asm-generic/system.h (working copy)
@@ -487,4 +487,6 @@
#define xnarch_post_graph(obj,state)
#define xnarch_post_graph_if(obj,state,cond)
+#define xnarch_timer_irq_p() rthal_timer_irq_p()
+
#endif /* !_XENO_ASM_GENERIC_SYSTEM_H */
Index: include/asm-arm/bits/intr.h
===================================================================
--- include/asm-arm/bits/intr.h (revision 1451)
+++ include/asm-arm/bits/intr.h (working copy)
@@ -27,6 +27,7 @@
static inline void xnarch_relay_tick(void)
{
+ rthal_mark_root_timer_irq();
rthal_irq_host_pend(RTHAL_TIMER_IRQ);
}
Index: ksrc/skins/vxworks/sysLib.c
===================================================================
--- ksrc/skins/vxworks/sysLib.c (revision 1451)
+++ ksrc/skins/vxworks/sysLib.c (working copy)
@@ -24,19 +24,20 @@
static wind_tick_handler_t tick_handler;
static long tick_handler_arg;
+static int tick_status [XNARCH_NR_CPUS];
void tickAnnounce(void)
{
if (tick_handler != NULL)
tick_handler(tick_handler_arg);
- xnpod_announce_tick(&nkclock);
+ tick_status[xnarch_current_cpu()] = xnpod_announce_tick(&nkclock);
}
static int __tickAnnounce(xnintr_t *intr)
{
tickAnnounce();
- return XN_ISR_HANDLED | XN_ISR_NOENABLE;
+ return tick_status[xnarch_current_cpu()];
}
int wind_sysclk_init(u_long init_rate)
Index: ksrc/nucleus/pod.c
===================================================================
--- ksrc/nucleus/pod.c (revision 1451)
+++ ksrc/nucleus/pod.c (working copy)
@@ -3249,6 +3249,9 @@
{
xnsched_t *sched;
+ if (!xnarch_timer_irq_p())
+ return XN_ISR_NONE | XN_ISR_NOENABLE | XN_ISR_PROPAGATE;
+
sched = xnpod_current_sched();
xnlock_get(&nklock);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] [rfc, patch] allow timer interrupt to be shared.
2006-08-18 13:53 ` Gilles Chanteperdrix
@ 2006-08-18 14:21 ` Philippe Gerum
0 siblings, 0 replies; 7+ messages in thread
From: Philippe Gerum @ 2006-08-18 14:21 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Fri, 2006-08-18 at 15:53 +0200, Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
> > On Fri, 2006-08-18 at 14:36 +0200, Philippe Gerum wrote:
> > > On Fri, 2006-08-18 at 13:16 +0200, Gilles Chanteperdrix wrote:
> > > > Philippe Gerum wrote:
> > > > > I'd rather keep the number of obscure conditional macros as low as
> > > > > possible; we should actually try to reduce them since we have a growing
> > > > > number of real and pseudo-archs to support, and those macros tend to
> > > > > obfuscate the generic code.
> > > > >
> > > > > In the same vein, is there anything we could use in the compatible Adeos
> > > > > patch that would unambiguously identify the presence of such support
> > > > > without resorting to yet-another-macro like IPIPE_HAVE_SHARED_TIMER_IRQ?
> > > >
> > > > We could decide that ipipe_timer_irq_p() must be implemented as a macro,
> > > > and use #ifdef ipipe_timer_irq_p but I thought that #ifdef
> > > > IPIPE_HAVE_SHARED_TIMER_IRQ was easier to understand.
> > > >
> > >
> > > It is, but the point is that we should not define a normalized
> > > interface; older ARM patches are obsoleted by the very existence of the
> > > new one adding a required feature for PXA.
> >
> > AT91.
> >
> > > Therefore, at some point in
> > > time, we are going to deprecate them, removing the conditional from the
> > > Xenomai codebase. In other words, this code is aimed at transitioning
> > > internally between two Adeos patch series, not at providing a stable
> > > interface.
>
> Here is a new version of the patch.
>
Applied, thanks.
> plain text document attachment (xeno-shared-timer-irq.2.diff)
> Index: include/asm-generic/hal.h
> ===================================================================
> --- include/asm-generic/hal.h (revision 1451)
> +++ include/asm-generic/hal.h (working copy)
> @@ -679,6 +679,15 @@
>
> #endif /* CONFIG_IPIPE_TRACE */
>
> +#ifdef ipipe_timer_irq_p
> +/* Timer IRQ is shared. */
> +#define rthal_timer_irq_p() ipipe_timer_irq_p()
> +#define rthal_mark_root_timer_irq() ipipe_mark_root_timer_irq()
> +#else /* !IPIPE_SHARED_TIMER_IRQ */
> +#define rthal_timer_irq_p() 1
> +#define rthal_mark_root_timer_irq() do { } while(0)
> +#endif /* IPIPE_SHARED_TIMER_IRQ */
> +
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
> Index: include/asm-generic/system.h
> ===================================================================
> --- include/asm-generic/system.h (revision 1451)
> +++ include/asm-generic/system.h (working copy)
> @@ -487,4 +487,6 @@
> #define xnarch_post_graph(obj,state)
> #define xnarch_post_graph_if(obj,state,cond)
>
> +#define xnarch_timer_irq_p() rthal_timer_irq_p()
> +
> #endif /* !_XENO_ASM_GENERIC_SYSTEM_H */
> Index: include/asm-arm/bits/intr.h
> ===================================================================
> --- include/asm-arm/bits/intr.h (revision 1451)
> +++ include/asm-arm/bits/intr.h (working copy)
> @@ -27,6 +27,7 @@
>
> static inline void xnarch_relay_tick(void)
> {
> + rthal_mark_root_timer_irq();
> rthal_irq_host_pend(RTHAL_TIMER_IRQ);
> }
>
> Index: ksrc/skins/vxworks/sysLib.c
> ===================================================================
> --- ksrc/skins/vxworks/sysLib.c (revision 1451)
> +++ ksrc/skins/vxworks/sysLib.c (working copy)
> @@ -24,19 +24,20 @@
>
> static wind_tick_handler_t tick_handler;
> static long tick_handler_arg;
> +static int tick_status [XNARCH_NR_CPUS];
>
> void tickAnnounce(void)
> {
> if (tick_handler != NULL)
> tick_handler(tick_handler_arg);
>
> - xnpod_announce_tick(&nkclock);
> + tick_status[xnarch_current_cpu()] = xnpod_announce_tick(&nkclock);
> }
>
> static int __tickAnnounce(xnintr_t *intr)
> {
> tickAnnounce();
> - return XN_ISR_HANDLED | XN_ISR_NOENABLE;
> + return tick_status[xnarch_current_cpu()];
> }
>
> int wind_sysclk_init(u_long init_rate)
> Index: ksrc/nucleus/pod.c
> ===================================================================
> --- ksrc/nucleus/pod.c (revision 1451)
> +++ ksrc/nucleus/pod.c (working copy)
> @@ -3249,6 +3249,9 @@
> {
> xnsched_t *sched;
>
> + if (!xnarch_timer_irq_p())
> + return XN_ISR_NONE | XN_ISR_NOENABLE | XN_ISR_PROPAGATE;
> +
> sched = xnpod_current_sched();
>
> xnlock_get(&nklock);
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-08-18 14:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-17 21:15 [Xenomai-core] [rfc, patch] allow timer interrupt to be shared Gilles Chanteperdrix
2006-08-18 10:55 ` Philippe Gerum
2006-08-18 11:16 ` Gilles Chanteperdrix
2006-08-18 12:36 ` Philippe Gerum
2006-08-18 12:39 ` Philippe Gerum
2006-08-18 13:53 ` Gilles Chanteperdrix
2006-08-18 14:21 ` 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.