From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Stelian Pop <stelian.pop@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Xenomai on PXA255
Date: Mon, 29 May 2006 17:45:58 +0200 [thread overview]
Message-ID: <17531.5942.353611.748409@domain.hid> (raw)
In-Reply-To: <1148913934.5494.15.camel@domain.hid>
Stelian Pop wrote:
> If you have specific questions feel free to ask. But I suggest you read
> and try to understand the code first.
Maybe we could provide a quick overview of how this works, Stelian,
please correct me if I am wrong.
If we start before rthal_timer_request is called, when the timer is
handled by Linux, we see that __ipipe_decr_ticks is set to
__ipipe_mach_ticks_per_jiffy, so that __ipipe_grab_irq does not
reprogram the timer. But __ipipe_mach_timerstolen is set to 0, so
integrator_timer_interrupt reprogram the timer at each tick.
Now, when rthal_timer_request (defined in ksrc/arch/arm/hal.c) is
called when Xenomai start handling the timer, we can see the two
different modes:
- in periodic mode, ipipe_tune_timer get called (indirectly via
rthal_set_timer, defined in include/asm-generic/hal.h), so
the proper value of __ipipe_decr_ticks is computed using
__ipipe_mach_ticks_per_jiffy, and __ipipe_mach_set_dec get called by
__ipipe_grab_irq at each tick to reprogram the timer
- in aperiodic (aka one-shot) mode, ipipe_tune_timer does not get
called, so __ipipe_decr_ticks remains set to
__ipipe_mach_ticks_per_jiffy and __ipipe_grab_irq does not call
__ipipe_mach_set_dec. Instead, __ipipe_mach_set_dec is called for
each shot by Xenomai (function rthal_timer_program_shot in
include/asm-arm/hal.h)
In both modes, __ipipe_mach_timerstolen is set to 1, so that
integrator_timer_interrupt never reprograms the timer.
When CONFIG_IPIPE is set, integrator_timer_interrupt never acks the
timer interrupt, instead, it gets ack'ed and unmasked in
__ipipe_ack_timerirq, installed as an acknowledge function for the timer
IRQ in __ipipe_enable_pipeline.
--
Gilles Chanteperdrix.
next prev parent reply other threads:[~2006-05-29 15:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 10:59 [Xenomai-core] Xenomai on PXA255 Bart Jonkers
2006-05-29 13:19 ` Jan Kiszka
2006-05-29 14:00 ` Gilles Chanteperdrix
2006-05-29 14:14 ` Bart Jonkers
2006-05-29 14:45 ` Stelian Pop
2006-05-29 15:45 ` Gilles Chanteperdrix [this message]
2006-05-29 19:17 ` Stelian Pop
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=17531.5942.353611.748409@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=stelian.pop@domain.hid \
--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.