GRSpw driver in SMP context

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Oct 14 05:53:36 UTC 2016


Hello Charles,

most of the Gaisler drivers are not SMP ready. You can ask the Gaisler support to fix this or you do it yourself. I am not sure what Gaisler has in mind with its drivers. It should be fairly straight forward to do this provided you have access to the hardware. Please have a look at

https://docs.rtems.org/doc-current/share/rtems/html/c_user/Symmetric-Multiprocessing-Services-Disable-Interrupts-and-Interrupt-Locks.html#Symmetric-Multiprocessing-Services-Disable-Interrupts-and-Interrupt-Locks

and section 2 in

http://microelectronics.esa.int/ngmp/RTEMS-SMP-StatusReportEmbBrains-2015-10.pdf


----- Am 12. Okt 2016 um 15:30 schrieb Charles INGELS charles.ingels at syderal.ch:

> Dear all,
> 
> I am trying to setup and to use the GR Spacewire driver in an SMP RTEMS
> application.
> I activate the GRSPW driver by defining the following constant :
> 
> 
> ...
> #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW
> #include <drvmgr/drvmgr_confdefs.h>
> ...
> 
> I also define SMP context by writing :
> 
> ...
> #define CONFIGURE_SMP_APPLICATION
> #define CONFIGURE_SMP_MAXIMUM_PROCESSORS    2
> #define CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP
> #include <rtems/confdefs.h>
> ...
> 
> Note that SMP works fine on my LEON3 evaluation board and I am able to
> play with tasks affinities.
> 
> 
> Finally, I rely on the driver manager to setup the drivers I want to use.
> 
> When I compile my application, I get an unresolved symbol error related
> to the following function (macro in fact):
> 
> ...../rtems/c/src/lib/libbsp/sparc/leon3/../../sparc/shared/spw/grspw.c:1846:
> undefined reference to `rtems_interrupt_disable'
> 
> After investigating a little bit more, it appears that such macro is
> only defined if the RTEMS_SMP symbol is not defined. In other words,
> such macro is only defined on a mono-core configuration, while in a
> multi-core configuration, the macro rtems_interrupt_disable shall not be
> used and shall be replaced by the macrortems_interrupt_local_disable.
> 
> However, the grspw driver relies on the mono-core macro
> rtems_interrupt_disable. Since it is not defined in my SMP
> configuration, the compilation fails.
> 
> So, my question is : is the grspw driver multi-core ready or is there
> some work to do to have it work in a multi-core configuration ?
> 
> Thanks for your help,
> 
> Charles
> 
> 
> 
> 
> 
> --
> *Charles INGELS*
> Embedded software expert
> charles.ingels at syderal.ch
> Phone /+41 (0)32 338 99 10/
> iNum /+883 5100 0902 7759/
> 
> *SYDERAL SA*
> Neuenburgstrasse 7
> CH-3238 Gals (Suisse)
> Desk /+41 (0)32 338 98 00/
> Fax /+41 (0)32 338 99 34/
> Web site http://www.syderal.ch
>	
> 
> 
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users


More information about the users mailing list