From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Lukasz Zemla <Lukasz.Zemla@woodward.com>
Cc: "Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] Xenomai installation on P1020RDB
Date: Wed, 25 Jul 2012 19:36:13 +0200 [thread overview]
Message-ID: <50102E8D.1040004@xenomai.org> (raw)
In-Reply-To: <501028DC.8000803@xenomai.org>
On 07/25/2012 07:11 PM, Gilles Chanteperdrix wrote:
> On 07/25/2012 06:18 PM, Lukasz Zemla wrote:
>
>> I tried to install Xenomai on 3.2.21 - it boots, but waits about 76 seconds after initialization of first eth0 controller:
>>
>> [ 0.905820] fsl-gianfar ethernet.1: eth0: TX BD ring size for Q[7]: 256
>> [ 77.451135] fsl-gianfar ethernet.2: eth1: mac: 00:04:9f:02:2d:11
>>
>> There is no delay between eth1 and eth2.
>>
>> The vanilla 3.2.21 does not have any delays - it initializes eth0, eth1, eth2 immediately.
>>
>> [...]
>
>
> It is very much likely a timer issue. At the time it happens, is xenomai
> started ?
>
Also, it would be interesting to know a bit more about your kernel
configuration, at least whether the following options are enabled:
CONFIG_HIGH_RES_TIMERS
CONFIG_NO_HZ
CONFIG_XENO_OPT_WATCHDOG
If the first two are on and the third is off, try the following patch:
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 3ca10829..a752ca7 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -469,6 +469,14 @@ void arch_irq_work_raise(void)
#endif /* CONFIG_IRQ_WORK */
+static inline void timer_ack(void)
+{
+ /* Ensure a positive value is written to the decrementer, or else
+ * some CPUs will continue to take decrementer exceptions.
+ */
+ set_dec(DECREMENTER_MAX);
+}
+
/*
* timer_interrupt - gets called when the decrementer overflows,
* with interrupts disabled.
@@ -480,11 +488,8 @@ void timer_interrupt(struct pt_regs * regs)
struct clock_event_device *evt = &__get_cpu_var(decrementers);
u64 now;
- /* Ensure a positive value is written to the decrementer, or else
- * some CPUs will continue to take decrementer exceptions.
- */
if (!clockevent_ipipe_stolen(evt))
- set_dec(DECREMENTER_MAX);
+ timer_ack();
/* Some implementations of hotplug will get timer interrupts while
* offline, just ignore these
@@ -836,6 +841,7 @@ static void register_decrementer_clockevent(int cpu)
dec->ipipe_timer = &per_cpu(itimers, cpu);
dec->ipipe_timer->irq = IPIPE_TIMER_VIRQ;
dec->ipipe_timer->set = itimer_set;
+ dec->ipipe_timer->ack = timer_ack;
dec->ipipe_timer->min_delay_ticks = 3;
#endif /* CONFIG_IPIPE */
--
Gilles.
next prev parent reply other threads:[~2012-07-25 17:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 14:31 [Xenomai] Xenomai installation on P1020RDB Lukasz Zemla
2012-07-20 18:25 ` Wolfgang Grandegger
2012-07-23 8:48 ` Richard Cochran
2012-07-23 12:01 ` Wolfgang Grandegger
2012-07-25 16:18 ` Lukasz Zemla
2012-07-25 17:11 ` Gilles Chanteperdrix
2012-07-25 17:36 ` Gilles Chanteperdrix [this message]
2012-07-25 20:15 ` Lukasz Zemla
2012-07-25 20:42 ` Gilles Chanteperdrix
2012-07-26 11:20 ` Lukasz Zemla
2012-07-26 12:00 ` Gilles Chanteperdrix
2012-07-27 15:53 ` Lukasz Zemla
2012-07-27 16:00 ` Gilles Chanteperdrix
2012-07-27 16:08 ` Philippe Gerum
2012-07-27 16:12 ` Lukasz Zemla
2012-07-27 16:19 ` Philippe Gerum
2012-07-29 14:30 ` Philippe Gerum
2012-07-29 14:10 ` Philippe Gerum
2012-07-25 19:26 ` Wolfgang Grandegger
2012-07-25 20:26 ` Lukasz Zemla
2012-07-25 20:55 ` Wolfgang Grandegger
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=50102E8D.1040004@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Lukasz.Zemla@woodward.com \
--cc=Xenomai@xenomai.org \
/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.