All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Port rtai rt_request_srq to xenomai
@ 2009-03-17 15:38 Charlton, John
  2009-03-17 15:52 ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Charlton, John @ 2009-03-17 15:38 UTC (permalink / raw)
  To: xenomai@xenomai.org

I am porting an rtai linux 2.4 kernel driver to xenomai-2.4.6.1 patched linux 2.26.27.7 kernel.  I have done a fair amount of searching for the rtai functions: rt_request_srq()/rt_free_srq() and have not found an equivalent in xenomai. Would appreciate advice on how this can be done in xenomai or if the equivalent of this is not available in xenomai. It looks like rthal_apc_alloc() may be what I am looking for.

--John





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] Port rtai rt_request_srq to xenomai
  2009-03-17 15:38 [Xenomai-help] Port rtai rt_request_srq to xenomai Charlton, John
@ 2009-03-17 15:52 ` Philippe Gerum
  2009-03-27 15:01   ` Charlton, John
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2009-03-17 15:52 UTC (permalink / raw)
  To: Charlton, John; +Cc: xenomai@xenomai.org

Charlton, John wrote:
> I am porting an rtai linux 2.4 kernel driver to xenomai-2.4.6.1 patched linux 2.26.27.7 kernel.  I have done a fair amount of searching for the rtai functions: rt_request_srq()/rt_free_srq() and have not found an equivalent in xenomai. Would appreciate advice on how this can be done in xenomai or if the equivalent of this is not available in xenomai. It looks like rthal_apc_alloc() may be what I am looking for.
>

It is indeed what you are looking for, if you want a 1:1 replacement. However, 
you may also want to consider porting your driver code over the RTDM framework, 
and use the rtdm_nrtsig support:
http://www.xenomai.org/documentation/branches/v2.4.x/html/api/group__rtdmirq.html

> --John
> 
> 
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


-- 
Philippe.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] Port rtai rt_request_srq to xenomai
  2009-03-17 15:52 ` Philippe Gerum
@ 2009-03-27 15:01   ` Charlton, John
  2009-04-02 12:01     ` Charlton, John
  0 siblings, 1 reply; 4+ messages in thread
From: Charlton, John @ 2009-03-27 15:01 UTC (permalink / raw)
  To: rpm@xenomai.org; +Cc: xenomai@xenomai.org

Thank you.  I was able to port the rtai kernel module driver to xenomai rtdm and it loads using insmod.  I see it in the /proc/modules list and it is properly displaying the /proc/<driver name> entries.  This kernel module exports functions using EXPORT_SYMBOL().  I compile and load another kernel modules that uses the first modules functions but it fails to load: The second kernel module has unknown symbol warnings for the first modules exported symbols when I build the module and also when I load it and it fails to load.  When I look in the /proc/kallsyms list the symbols exported by the first module are all there.

It seems to be a module version problem since the error output is: no symbol version for <symbol name>

How do I specify to the second module that the undefined symbols (external functions) are in the first module at runtime?  This was not necessary in the rtai linux 2.4 kernel since the modules were just object files that resolved symbols at load time. I would rather not include these drivers in the kernel config/build if I can avoid it.

--John


-----Original Message-----
From: Philippe Gerum [mailto:rpm@xenomai.org
Sent: Tuesday, March 17, 2009 11:53 AM
To: Charlton, John
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Port rtai rt_request_srq to xenomai

Charlton, John wrote:
> I am porting an rtai linux 2.4 kernel driver to xenomai-2.4.6.1 patched linux 2.26.27.7 kernel.  I have done a fair amount of searching for the rtai functions: rt_request_srq()/rt_free_srq() and have not found an equivalent in xenomai. Would appreciate advice on how this can be done in xenomai or if the equivalent of this is not available in xenomai. It looks like rthal_apc_alloc() may be what I am looking for.
>

It is indeed what you are looking for, if you want a 1:1 replacement. However, you may also want to consider porting your driver code over the RTDM framework, and use the rtdm_nrtsig support:
http://www.xenomai.org/documentation/branches/v2.4.x/html/api/group__rtdmirq.html

> --John
> 
> 
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


--
Philippe.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] Port rtai rt_request_srq to xenomai
  2009-03-27 15:01   ` Charlton, John
@ 2009-04-02 12:01     ` Charlton, John
  0 siblings, 0 replies; 4+ messages in thread
From: Charlton, John @ 2009-04-02 12:01 UTC (permalink / raw)
  To: rpm@xenomai.org; +Cc: xenomai@xenomai.org

The problem with the undefined symbols was due to compiling two external modules outside of the kernel tree and then trying to access exported symbols from one module in the other external module.  The solution is all well documented in the linux 2.6 kernel document at: Documentation/kbuild/modules.txt in the kernel source.  The solution I used is to put the Module.symvers file from the external module exporting the symbols into the build directory of the module using the exported symbols.  This worked well keeping both modules outside of the kernel tree.  There are two other methods to accomplish this documented in the above mentioned modules.txt file.

This was not an issue in the 2.4 kernel since external symbols are all resolved at module load time by insmod but in the 2.6 kernel the external symbols are resolved at build/link time.

--John

-----Original Message-----
From: xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid] On Behalf Of Charlton, John
Sent: Friday, March 27, 2009 11:02 AM
To: rpm@xenomai.org
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Port rtai rt_request_srq to xenomai

Thank you.  I was able to port the rtai kernel module driver to xenomai rtdm and it loads using insmod.  I see it in the /proc/modules list and it is properly displaying the /proc/<driver name> entries.  This kernel module exports functions using EXPORT_SYMBOL().  I compile and load another kernel modules that uses the first modules functions but it fails to load: The second kernel module has unknown symbol warnings for the first modules exported symbols when I build the module and also when I load it and it fails to load.  When I look in the /proc/kallsyms list the symbols exported by the first module are all there.

It seems to be a module version problem since the error output is: no symbol version for <symbol name>

How do I specify to the second module that the undefined symbols (external functions) are in the first module at runtime?  This was not necessary in the rtai linux 2.4 kernel since the modules were just object files that resolved symbols at load time. I would rather not include these drivers in the kernel config/build if I can avoid it.

--John


-----Original Message-----
From: Philippe Gerum [mailto:rpm@xenomai.org]
Sent: Tuesday, March 17, 2009 11:53 AM
To: Charlton, John
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Port rtai rt_request_srq to xenomai

Charlton, John wrote:
> I am porting an rtai linux 2.4 kernel driver to xenomai-2.4.6.1 patched linux 2.26.27.7 kernel.  I have done a fair amount of searching for the rtai functions: rt_request_srq()/rt_free_srq() and have not found an equivalent in xenomai. Would appreciate advice on how this can be done in xenomai or if the equivalent of this is not available in xenomai. It looks like rthal_apc_alloc() may be what I am looking for.
>

It is indeed what you are looking for, if you want a 1:1 replacement. However, you may also want to consider porting your driver code over the RTDM framework, and use the rtdm_nrtsig support:
http://www.xenomai.org/documentation/branches/v2.4.x/html/api/group__rtdmirq.html

> --John
> 
> 
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


--
Philippe.

_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-02 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-17 15:38 [Xenomai-help] Port rtai rt_request_srq to xenomai Charlton, John
2009-03-17 15:52 ` Philippe Gerum
2009-03-27 15:01   ` Charlton, John
2009-04-02 12:01     ` Charlton, John

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.