From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] Xenomai installation on P1020RDB
Date: Sun, 29 Jul 2012 16:10:10 +0200 [thread overview]
Message-ID: <50154442.2060603@xenomai.org> (raw)
In-Reply-To: <50102E8D.1040004@xenomai.org>
On 07/25/2012 07:36 PM, Gilles Chanteperdrix wrote:
> 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 */
>
>
>
Actually, we don't need this, __ipipe_grab_timer() does it early.
--
Philippe.
next prev parent reply other threads:[~2012-07-29 14:10 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
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 [this message]
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=50154442.2060603@xenomai.org \
--to=rpm@xenomai.org \
--cc=Xenomai@xenomai.org \
--cc=gilles.chanteperdrix@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.