Skip to contentSkip to conversation

Is CLOCK_HOST_REALTIME supported for powerpc?

Xenomai Makarand Pradhan 2 participants 7 messages Feb 27, 2013 – Feb 28, 2013

lore
Share & tools
lore
#0 lore raw

Hi All,

I'm trying to use clock_gettime to read Linux time in my Xenomai task. I may be doing something wrong, but the call fails. The code is properly linked against the pthread_rt Xenomai library.

I'm running Linux 3.0.0, Xenomai 2.6.0 on powerpc MPC8360.

Can you pl comment if this is supported? While quickly going through the Xenomai code I had a feeling that it was supported only for x86 and arm.

Thanks for your time.

Rgds,
Makarand.

Signature · 7 lines
___________________________________________________________________________
NOTICE OF CONFIDENTIALITY:
This e-mail and any attachments may contain confidential and privileged information.  If you are
not the intended recipient, please notify the sender immediately by return e-mail and delete this
e-mail and any copies.  Any dissemination or use of this information by a person other than the
intended recipient is unauthorized and may be illegal.
_____________________________________________________________________
#1 lore raw
Quoted 7 lines · Makarand Pradhan

Hi All,

I'm trying to use clock_gettime to read Linux time in my Xenomai task. I may be doing something wrong, but the call fails. The code is properly linked against the pthread_rt Xenomai library.

I'm running Linux 3.0.0, Xenomai 2.6.0 on powerpc MPC8360.

Please, upgrade to Xenomai 2.6.2.1.

Quoted 3 lines

Can you pl comment if this is supported? While quickly going through the Xenomai code I had a feeling that it was supported only for x86 and arm.

clocktest -C 42 -D
will answer your question:
http://www.xenomai.org/documentation/xenomai-2.6/html/clocktest/

Quoted 6 lines

Thanks for your time.

Rgds,
Makarand.

Signature · 1 line
                                                                Gilles.
#2 lore raw

Thanks Gilles.

Clocktest indicates:

"hostrt data area is not live"

I've turned on

CONFIG_HAVE_IPIPE_HOSTRT=y
CONFIG_XENO_OPT_HOSTRT=y

while building the kernel. I guess that's not sufficient to get it to work.

Unfortunately I cannot upgrade to 2.6.2 so will try to selectively port the changes required for hostrt.

Warm Rgds,
Makarand.

Quoted 1 line · Gilles Chanteperdrix

clocktest -C 42 -D

Signature · 7 lines
___________________________________________________________________________
NOTICE OF CONFIDENTIALITY:
This e-mail and any attachments may contain confidential and privileged information.  If you are
not the intended recipient, please notify the sender immediately by return e-mail and delete this
e-mail and any copies.  Any dissemination or use of this information by a person other than the
intended recipient is unauthorized and may be illegal.
_____________________________________________________________________
#3 lore raw
Quoted 4 lines · Makarand Pradhan

Thanks Gilles.

Clocktest indicates:

Quoted 8 lines

"hostrt data area is not live"

I've turned on

CONFIG_HAVE_IPIPE_HOSTRT=y
CONFIG_XENO_OPT_HOSTRT=y

while building the kernel. I guess that's not sufficient to get it to work.

You can not really turn CONFIG_HAVE_IPIPE_HOSTRT on, it is set by the architecture if it supports it. Supporting hostrt is more a property of the I-pipe patch than of Xenomai. So, you would have to upgrade to a more recent I-pipe to have this support.

Quoted 3 lines

Unfortunately I cannot upgrade to 2.6.2 so will try to selectively port the changes required for hostrt.

2.6.2.1 is the latest release, please do not use 2.6.2. 2.6.2.1 is in the same branch as 2.6.0, so it is completely ABI and API compatible. Anyway, you do as you wish, but please do not expect support from us for 2.6.0.

Signature · 1 line
                                                                Gilles.
#4 lore raw
Quoted 4 lines · Gilles Chanteperdrix

2.6.2.1 is the latest release, please do not use 2.6.2. 2.6.2.1 is in the same branch as 2.6.0, so it is completely ABI and API compatible. Anyway, you do as you wish, but please do not expect support from us for 2.6.0.

Thanks Gilles. Will investigate the relevant Ipipe pathes to check support for powerpc.

Rgds,
Makarand.

Signature · 7 lines
___________________________________________________________________________
NOTICE OF CONFIDENTIALITY:
This e-mail and any attachments may contain confidential and privileged information.  If you are
not the intended recipient, please notify the sender immediately by return e-mail and delete this
e-mail and any copies.  Any dissemination or use of this information by a person other than the
intended recipient is unauthorized and may be illegal.
_____________________________________________________________________
#5 lore raw
Quoted 7 lines · Makarand Pradhan
Quoted 4 lines · Gilles Chanteperdrix

2.6.2.1 is the latest release, please do not use 2.6.2. 2.6.2.1 is in the same branch as 2.6.0, so it is completely ABI and API compatible. Anyway, you do as you wish, but please do not expect support from us for 2.6.0.

Thanks Gilles. Will investigate the relevant Ipipe pathes to check support for powerpc.

All old I-pipe patches should work with the latest version of xenomai, though as I said, whether CLOCK_HOST_REALTIME work probably depends more on the I-pipe patch.

Signature · 1 line
                                                                Gilles.
#6 lore raw
In reply to Makarand Pradhan

Hi,

I was able to backport the ipipe hostrt changes to get it working on Xenomai 2.6.0 on powerpc.

For those interested, the patch is attached to this email.

clocktest is working for CLOCK_HOST_REALTIME on powerpc, Xenomai 2.6.0, linux 3.0.0.

root@ruggedcom:~/xenotest# ./clocktest -C 42 -D
hostrt data area is live
Sequence counter : 14731352
wall_time_sec    : 946709712
wall_time_nsec   : 323671313
wall_to_monotonic
          tv_sec : -946702301
         tv_nsec : 7646973
cycle_last       : 495026354244
mask             : 0xffffffffffffffff
mult             : 62914561
shift            : 22

== Tested clock: 42 (CLOCK_HOST_REALTIME)
CPU ToD offset [us] ToD drift [us/s] warps max delta [us]
--- -------------------- ---------------- ---------- --------------
0 0.0 0.000 0 0.0

Thanks for all your help.

Warm Rgds,
Makarand.

Quoted 4 lines

All old I-pipe patches should work with the latest version of xenomai, though as I said, whether CLOCK_HOST_REALTIME work probably depends more on the I-pipe patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hostrt_ipipe_xeno_2.6.0.diff
Type: text/x-diff
Size: 2488 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130228/2e3fbdf8/attachment.diff>