* [Xenomai] cannot open switchtest device ?
@ 2013-07-21 20:19 George Pontis
2013-07-25 19:56 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: George Pontis @ 2013-07-21 20:19 UTC (permalink / raw)
To: xenomai
I find a problem trying to run xeno-test when it goes to open the switchtest
device. Before this post I searched the web and found a thread started by
"raespi".
We have a similar situation in which we are both using buildroot, but I'm
not sure that the underlying cause is the same. I am building a kernel for
3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a
month ago ). The target is an custom board based on the iMX53.
To narrow the source of the problem, I modified switchtest.c to report on
any case where the open() returns a negative number. I also made a temporary
patch
to not prepend the name with "/dev/". I might add that I'm using a new RTDM
driver named fpga_rtdm that can be opened and access successfully.
Here's what happens:
~ >> xeno-test
Started child 163: /bin/sh /usr/bin/xeno-test-run-wrapper /usr/bin/xeno-test
+ echo 0
+ /usr/bin/arith
mul: 0x79364d93, shft: 26
integ: 30, frac: 0x4d9364d9364d9364
signed positive operation: 0x03ffffffffffffff * 1000000000 / 33000000
inline calibration: 0x0000000000000000: 223.749 ns, rejected 2/10000
inlined llimd: 0x79364d9364d9362f: 1347.417 ns, rejected 4/10000
inlined llmulshft: 0x79364d92ffffffe1: 31.764 ns, rejected 0/10000
inlined nodiv_llimd: 0x79364d9364d9362f: 61.416 ns, rejected 2/10000
out of line calibration: 0x0000000000000000: 225.021 ns, rejected 1/10000
out of line llimd: 0x79364d9364d9362f: 1340.784 ns, rejected 1/10000
out of line llmulshft: 0x79364d92ffffffe1: 30.378 ns, rejected 2/10000
out of line nodiv_llimd: 0x79364d9364d9362f: 59.940 ns, rejected 0/10000
signed negative operation: 0xfc00000000000001 * 1000000000 / 33000000
inline calibration: 0x0000000000000000: 225.024 ns, rejected 0/10000
inlined llimd: 0x86c9b26c9b26c9d1: 1363.566 ns, rejected 3/10000
inlined llmulshft: 0xd45d172d0000001e: 32.283 ns, rejected 1/10000
inlined nodiv_llimd: 0x86c9b26c9b26c9d1: 75.027 ns, rejected 0/10000
out of line calibration: 0x0000000000000000: 225.030 ns, rejected 2/10000
out of line llimd: 0x86c9b26c9b26c9d1: 1363.653 ns, rejected 4/10000
out of line llmulshft: 0xd45d172d0000001e: 31.272 ns, rejected 0/10000
out of line nodiv_llimd: 0x86c9b26c9b26c9d1: 75.045 ns, rejected 0/10000
unsigned operation: 0x03ffffffffffffff * 1000000000 / 33000000
inline calibration: 0x0000000000000000: 226.083 ns, rejected 3/10000
inlined nodiv_ullimd: 0x79364d9364d9362f: 45.735 ns, rejected 1/10000
out of line calibration: 0x0000000000000000: 227.745 ns, rejected 1/10000
out of line nodiv_ullimd: 0x79364d9364d9362f: 57.900 ns, rejected 1/10000
+ /usr/bin/clocktest -C 42 -T 30
== Tested clock: 42 (CLOCK_HOST_REALTIME)
CPU ToD offset [us] ToD drift [us/s] warps max delta [us]
--- -------------------- ---------------- ---------- --------------
0 1.6 -0.004 0 0.0
+ /usr/bin/switchtest -T 30
== Testing FPU check routines...
d0: 1 != 2
d1: 1 != 2
d2: 1 != 2
d3: 1 != 2
d4: 1 != 2
d5: 1 != 2
d6: 1 != 2
d7: 1 != 2
d8: 1 != 2
d9: 1 != 2
d10: 1 != 2
d11: 1 != 2
d12: 1 != 2
d13: 1 != 2
d14: 1 != 2
d15: 1 != 2
== FPU check routines: OK.
== Threads:switchtest open rttest-switchtest0: No such file or directory
switchtest open rttest-switchtest1: No such file or directory
switchtest open rttest-switchtest2: No such file or directory
...
switchtest open rttest-switchtest254: No such file or directory
switchtest open rttest-switchtest255: No such file or directory
switchtest: Unable to open switchtest device.
(modprobe xeno_switchtest ?)
~ >>
~ >> cat /proc/xenomai/rtdm/named_devices
Hash Name Driver /proc
24 rttest-timerbench0 xeno_timerbench rttest-timerbench0
55 rttest-switchtest0 xeno_switchtest rttest-switchtest0
B4 fpga_rtdm fpga_rtdm_driver fpga_rtdm
~ >>
George
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] cannot open switchtest device ?
2013-07-21 20:19 [Xenomai] cannot open switchtest device ? George Pontis
@ 2013-07-25 19:56 ` Gilles Chanteperdrix
2013-07-26 16:14 ` George Pontis
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2013-07-25 19:56 UTC (permalink / raw)
To: George Pontis; +Cc: xenomai
On 07/21/2013 10:19 PM, George Pontis wrote:
> I find a problem trying to run xeno-test when it goes to open the switchtest
> device. Before this post I searched the web and found a thread started by
> "raespi".
> We have a similar situation in which we are both using buildroot, but I'm
> not sure that the underlying cause is the same. I am building a kernel for
> 3.8.13 using
> the patches from git, and also the current git xenomai. ( Current as of a
> month ago ). The target is an custom board based on the iMX53.
>
> To narrow the source of the problem, I modified switchtest.c to report on
> any case where the open() returns a negative number. I also made a temporary
> patch
> to not prepend the name with "/dev/". I might add that I'm using a new RTDM
> driver named fpga_rtdm that can be opened and access successfully.
> Here's what happens:
This may look like a stupid suggestion, but that is the only explanation
I see: you are probably using glibc's open instead of xenomai's open.
This may happen for instance if you are compiling xenomai libraries
statically and switchtest Makefile does not use the "wrap-link.sh" script.
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Xenomai] cannot open switchtest device ?
2013-07-25 19:56 ` Gilles Chanteperdrix
@ 2013-07-26 16:14 ` George Pontis
2013-07-26 18:57 ` Gilles Chanteperdrix
2013-07-28 22:03 ` Gilles Chanteperdrix
0 siblings, 2 replies; 6+ messages in thread
From: George Pontis @ 2013-07-26 16:14 UTC (permalink / raw)
To: 'Gilles Chanteperdrix'; +Cc: xenomai
> -----Original Message-----
> From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> Sent: Thursday, July 25, 2013 12:56 PM
> To: George Pontis
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai] cannot open switchtest device ?
>
> On 07/21/2013 10:19 PM, George Pontis wrote:
>
> > I find a problem trying to run xeno-test when it goes to open the switchtest
> > device. Before this post I searched the web and found a thread started by
> > "raespi".
> > We have a similar situation in which we are both using buildroot, but I'm
> > not sure that the underlying cause is the same. I am building a kernel for
> > 3.8.13 using
> > the patches from git, and also the current git xenomai. ( Current as of a
> > month ago ). The target is an custom board based on the iMX53.
> >
> > To narrow the source of the problem, I modified switchtest.c to report on
> > any case where the open() returns a negative number. I also made a
> temporary
> > patch
> > to not prepend the name with "/dev/". I might add that I'm using a new RTDM
> > driver named fpga_rtdm that can be opened and access successfully.
> > Here's what happens:
>
>
> This may look like a stupid suggestion, but that is the only explanation
> I see: you are probably using glibc's open instead of xenomai's open.
> This may happen for instance if you are compiling xenomai libraries
> statically and switchtest Makefile does not use the "wrap-link.sh" script.
> --
> Gilles.
Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm actually using
uClibc for this embedded system.
I tried to open the switchtest device from my application and it was successful.
One difference was that my application was opening these with a call to rt_dev_open(),
while the switchtest.c file used open(). Also, when building switchtest the open() is
resolved with open64() due to selecting large file support.
A quick mod of the switchtest code to use rt_dev_open() instead of open() would not build
without more effort.
George
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] cannot open switchtest device ?
2013-07-26 16:14 ` George Pontis
@ 2013-07-26 18:57 ` Gilles Chanteperdrix
2013-07-28 22:03 ` Gilles Chanteperdrix
1 sibling, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2013-07-26 18:57 UTC (permalink / raw)
To: George Pontis; +Cc: xenomai
On 07/26/2013 06:14 PM, George Pontis wrote:
>> -----Original Message-----
>> From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
>> Sent: Thursday, July 25, 2013 12:56 PM
>> To: George Pontis
>> Cc: xenomai@xenomai.org
>> Subject: Re: [Xenomai] cannot open switchtest device ?
>>
>> On 07/21/2013 10:19 PM, George Pontis wrote:
>>
>>> I find a problem trying to run xeno-test when it goes to open the switchtest
>>> device. Before this post I searched the web and found a thread started by
>>> "raespi".
>>> We have a similar situation in which we are both using buildroot, but I'm
>>> not sure that the underlying cause is the same. I am building a kernel for
>>> 3.8.13 using
>>> the patches from git, and also the current git xenomai. ( Current as of a
>>> month ago ). The target is an custom board based on the iMX53.
>>>
>>> To narrow the source of the problem, I modified switchtest.c to report on
>>> any case where the open() returns a negative number. I also made a
>> temporary
>>> patch
>>> to not prepend the name with "/dev/". I might add that I'm using a new RTDM
>>> driver named fpga_rtdm that can be opened and access successfully.
>>> Here's what happens:
>>
>>
>> This may look like a stupid suggestion, but that is the only explanation
>> I see: you are probably using glibc's open instead of xenomai's open.
>> This may happen for instance if you are compiling xenomai libraries
>> statically and switchtest Makefile does not use the "wrap-link.sh" script.
>> --
>> Gilles.
>
> Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm actually using
> uClibc for this embedded system.
>
> I tried to open the switchtest device from my application and it was successful.
> One difference was that my application was opening these with a call to rt_dev_open(),
> while the switchtest.c file used open(). Also, when building switchtest the open() is
> resolved with open64() due to selecting large file support.
>
> A quick mod of the switchtest code to use rt_dev_open() instead of open() would not build
> without more effort.
Ah, thanks for digging. We simply need to implement __wrap_open64 and
add open64 to the long list of services we wrap.
Regards.
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Xenomai] cannot open switchtest device ?
2013-07-26 16:14 ` George Pontis
2013-07-26 18:57 ` Gilles Chanteperdrix
@ 2013-07-28 22:03 ` Gilles Chanteperdrix
2013-07-29 1:59 ` George Pontis
1 sibling, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2013-07-28 22:03 UTC (permalink / raw)
To: George Pontis; +Cc: xenomai
On 07/26/2013 06:14 PM, George Pontis wrote:
>> -----Original Message-----
>> From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
>> Sent: Thursday, July 25, 2013 12:56 PM
>> To: George Pontis
>> Cc: xenomai@xenomai.org
>> Subject: Re: [Xenomai] cannot open switchtest device ?
>>
>> On 07/21/2013 10:19 PM, George Pontis wrote:
>>
>>> I find a problem trying to run xeno-test when it goes to open the switchtest
>>> device. Before this post I searched the web and found a thread started by
>>> "raespi".
>>> We have a similar situation in which we are both using buildroot, but I'm
>>> not sure that the underlying cause is the same. I am building a kernel for
>>> 3.8.13 using
>>> the patches from git, and also the current git xenomai. ( Current as of a
>>> month ago ). The target is an custom board based on the iMX53.
>>>
>>> To narrow the source of the problem, I modified switchtest.c to report on
>>> any case where the open() returns a negative number. I also made a
>> temporary
>>> patch
>>> to not prepend the name with "/dev/". I might add that I'm using a new RTDM
>>> driver named fpga_rtdm that can be opened and access successfully.
>>> Here's what happens:
>>
>>
>> This may look like a stupid suggestion, but that is the only explanation
>> I see: you are probably using glibc's open instead of xenomai's open.
>> This may happen for instance if you are compiling xenomai libraries
>> statically and switchtest Makefile does not use the "wrap-link.sh" script.
>> --
>> Gilles.
>
> Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm actually using
> uClibc for this embedded system.
>
> I tried to open the switchtest device from my application and it was successful.
> One difference was that my application was opening these with a call to rt_dev_open(),
> while the switchtest.c file used open(). Also, when building switchtest the open() is
> resolved with open64() due to selecting large file support.
>
> A quick mod of the switchtest code to use rt_dev_open() instead of open() would not build
> without more effort.
Hi George,
I added a wrapper for open64, could you try the current git contents, or
apply the following patch to the tree you use?
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=d6127b245ed9876ce4153bac2996d88d0d7355c6
Regards.
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Xenomai] cannot open switchtest device ?
2013-07-28 22:03 ` Gilles Chanteperdrix
@ 2013-07-29 1:59 ` George Pontis
0 siblings, 0 replies; 6+ messages in thread
From: George Pontis @ 2013-07-29 1:59 UTC (permalink / raw)
To: 'Gilles Chanteperdrix'; +Cc: xenomai
> -----Original Message-----
> From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> Sent: Sunday, July 28, 2013 3:04 PM
> To: George Pontis
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai] cannot open switchtest device ?
>
> On 07/26/2013 06:14 PM, George Pontis wrote:
>
> >> -----Original Message-----
> >> From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> >> Sent: Thursday, July 25, 2013 12:56 PM
> >> To: George Pontis
> >> Cc: xenomai@xenomai.org
> >> Subject: Re: [Xenomai] cannot open switchtest device ?
> >>
> >> On 07/21/2013 10:19 PM, George Pontis wrote:
> >>
> >>> I find a problem trying to run xeno-test when it goes to open the switchtest
> >>> device. Before this post I searched the web and found a thread started by
> >>> "raespi".
> >>> We have a similar situation in which we are both using buildroot, but I'm
> >>> not sure that the underlying cause is the same. I am building a kernel for
> >>> 3.8.13 using
> >>> the patches from git, and also the current git xenomai. ( Current as of a
> >>> month ago ). The target is an custom board based on the iMX53.
> >>>
> >>> To narrow the source of the problem, I modified switchtest.c to report on
> >>> any case where the open() returns a negative number. I also made a
> >> temporary
> >>> patch
> >>> to not prepend the name with "/dev/". I might add that I'm using a new
> RTDM
> >>> driver named fpga_rtdm that can be opened and access successfully.
> >>> Here's what happens:
> >>
> >>
> >> This may look like a stupid suggestion, but that is the only explanation
> >> I see: you are probably using glibc's open instead of xenomai's open.
> >> This may happen for instance if you are compiling xenomai libraries
> >> statically and switchtest Makefile does not use the "wrap-link.sh" script.
> >> --
> >> Gilles.
> >
> > Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm
> actually using
> > uClibc for this embedded system.
> >
> > I tried to open the switchtest device from my application and it was
> successful.
> > One difference was that my application was opening these with a call to
> rt_dev_open(),
> > while the switchtest.c file used open(). Also, when building switchtest the
> open() is
> > resolved with open64() due to selecting large file support.
> >
> > A quick mod of the switchtest code to use rt_dev_open() instead of open()
> would not build
> > without more effort.
>
>
> Hi George,
>
> I added a wrapper for open64, could you try the current git contents, or
> apply the following patch to the tree you use?
>
> http://git.xenomai.org/?p=xenomai-
> 2.6.git;a=commit;h=d6127b245ed9876ce4153bac2996d88d0d7355c6
>
> Regards.
>
> --
> Gilles.
I built from the current git tree and tried it: xeno-test ran to completion.
Thank you Gilles.
George
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-29 1:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-21 20:19 [Xenomai] cannot open switchtest device ? George Pontis
2013-07-25 19:56 ` Gilles Chanteperdrix
2013-07-26 16:14 ` George Pontis
2013-07-26 18:57 ` Gilles Chanteperdrix
2013-07-28 22:03 ` Gilles Chanteperdrix
2013-07-29 1:59 ` George Pontis
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.