All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stelian Pop <stelian.pop@domain.hid>
To: Detlef Vollmann <dv@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Some questions about the ARM port (Integrator vs. PXA)
Date: Thu, 29 Jun 2006 16:46:41 +0200	[thread overview]
Message-ID: <1151592402.19389.31.camel@domain.hid> (raw)
In-Reply-To: <44A3919C.596DFDAE@vollmann.ch>

Le jeudi 29 juin 2006 à 10:38 +0200, Detlef Vollmann a écrit :
> Hello,

Hi,

> 
> looking at the ARM Integrator patch (which seems to be something
> like the reference port for ARM), I'm not really clear about some
> of the code:
> 
>  a) What's the difference between __ipipe_mach_ticks_per_jiffy
>     and LATCH?

As a matter of fact there is no difference.

>  b) Is there some (hidden, intended future) semantics of tscok?
>     Right now it just avoids that garbage is returned before
>     the timer is initialized.

tscok is used to prevent __ipipe_mach_get_tsc() returning bogus values
in the early boot stages (when the timer is not yet initialized but
ipipe is). IIRC this was mainly needed when enabling
CONFIG_IPIPE_STATS...

>  c) In the interrupt routine, the comment currently says:
>     "If Linux is the only domain, ack the timer and reprogram it",
>     but the actual code looks as if the comment should read:
>     "If Linux is running natively, ack the timer.
>     If Linux's the only domain, reprogram it."
>     What's wrong, the code or the comment?

Always trust the code :)

The true meaning of that code is:
	* if Linux is running natively (no ipipe), ack and reprogram the timer
	* if Linux is running under ipipe, but it still has the control over
the timer (no Xenomai for example), then reprogram the timer (ipipe has
already acked it)
	* if some other domain has taken over the timer, then do nothing (ipipe
has acked it, and the other domain has reprogramed it)

>  d) __ipipe_mach_set_dec() sets the next match value of the timer.
>     But the current counter isn't changed.  Correct?
>     Or is setting the match value and setting the current counter
>     the same operation on the Integrator?

Yes, the integrator has a true decrementer and not a match counter.

__ipipe_set_dec(x) must set program the timer so that a timer interrupt
occurs after x ticks.

>     __ipipe_mach_get_dec() doesn't return the next match value, but
>     the current actual counter, i.e. some value between 0 and the
>     next match value.  Correct?

Yes.

>     And if so, which value?  The number of ticks elapsed since the
>     last match or the number of ticks until the next match occurs?

The number of ticks until the next match occurs.

>     The names "..._dec" suggest that the integrator provides a clock
>     register that decrements.  The PXA provides clock registers
>     that are incremented, and the timer used for the Linux ticks
>     is (in Linux) never reset, but instead the match value at
>     which an interrupt occurs is incremented on each interrupt.
>     So, a port to the PXA wouldn't be straightforward, and so I
>     want to make sure that I really understand the semantics
>     of the ARM port.

Indeed, you will need to adapt the PXA incrementer to the ipipe
decrementer semantics.

Stelian.
-- 
Stelian Pop <stelian.pop@domain.hid>



  reply	other threads:[~2006-06-29 14:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29  8:38 [Xenomai-core] Some questions about the ARM port (Integrator vs. PXA) Detlef Vollmann
2006-06-29 14:46 ` Stelian Pop [this message]
2006-06-30  6:31   ` Detlef Vollmann
     [not found]   ` <44A4C4CB.5F24DA68@domain.hid>
2006-06-30  8:53     ` Stelian Pop
2006-07-03  5:56       ` Detlef Vollmann
2006-07-03  6:33         ` Jan Kiszka
2006-07-03  8:38           ` Detlef Vollmann
2006-07-03  9:37             ` Jan Kiszka
2006-07-03 12:39             ` Gilles Chanteperdrix
2006-07-03 13:00               ` Gilles Chanteperdrix
2006-07-04  6:43                 ` Detlef Vollmann
2006-07-04 14:09                   ` Jan Kiszka
2006-07-05 22:32                     ` Detlef Vollmann
2006-07-05 22:42                       ` Detlef Vollmann
2006-07-05 13:03                   ` Gilles Chanteperdrix
2006-07-05 23:44                     ` Detlef Vollmann
2006-07-06  7:15                       ` Jan Kiszka

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=1151592402.19389.31.camel@domain.hid \
    --to=stelian.pop@domain.hid \
    --cc=dv@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.