GRSpw driver in SMP context
Daniel Hellstrom
daniel at gaisler.com
Mon Oct 17 08:31:24 UTC 2016
Hello Charles,
The GRSPW packet driver is not SMP safe yet. You can see some of the
patches we made, some in preparation for the SMP at
(https://git.rtems.org/danielh/rcc.git/log/?h=rcc-1.2) but some of the
SMP work has not been completed and released yet.
Best Regards,
Daniel Hellstrom
Software Section Head
Cobham Gaisler
T : +46 (0) 31 775 8657
F : +46 (0) 31 421407
daniel.hellstrom at gaisler.com
Cobham Gaisler AB, Kungsgatan 12, SE-411 19, GÖTEBORG, Sweden.
+46 (0) 31 775 8650, www.cobham.com/gaisler
Please consider the environment before printing this email
This e-mail and any files transmitted with it ("E-mail") is intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the addressee(s), any disclosure,
reproduction, copying, distribution or other use of the E-mail is prohibited. If you have received this E-mail in error, please delete it and notify the sender immediately via our switchboard or return e-mail.
Neither the company nor any subsidiary or affiliate or associated company nor any individual sending this Email accepts any liability in respect of the content (including errors and omissions) nor shall this e-mail be deemed to enter the company or any subsidiary or affiliate or associated company into a contract or to create any legally binding obligations unless expressly agreed to in writing under separate cover and timeliness of the E-mail which arise as a result of transmission. If verification is required, please request a hard copy version from the sender.
On 2016-10-17 10:20, Charles INGELS wrote:
>
> Hello Daniel,
>
> thanks a lot for that very valuable information giving a rough idea on
> the schedule that is around the GRLIB drivers developments. This will
> help me foresee when we can plan our SW delivery. This will hopefully
> modify our delivery scheme : deliver a single core software first in
> compliance with our current planning, and foresee a SMP software
> afterwards.
>
> In the mean time, I had a quick look at the grspw_pkt driver and I
> tried to compile it in an SMP environment. However, the compilation
> failed on the unknown macro 'rtems_interrupt_enable' which is only
> defined in a single core environment. It seems that the grspw_ptk
> driver does not use the 'rtems_interrupt_local_enable' macro which is
> defined in an SMP environment only.
>
> This makes me wonder if the grspw_pkt driver is SMP ready. Can you
> confirm if this is the case, or not ? Is the latest grspw_pkt driver
> available in the RTEMS git repository ?
>
> Thanks in advance for your answers,
>
> kind regards,
>
> Charles
>
>
>
>
> Le 17.10.2016 à 09:18, Daniel Hellstrom a écrit :
>>
>> Hello Charles,
>>
>> We are planning to resume our effort on RTEMS-4.11 in Q4 2016. At
>> this point we are planning to make fixes and improvements for the
>> GRLIB drivers like the issue brought up here, this is known to us.
>>
>> When it comes to the GRSPW driver in particular, we recommend users
>> to adopt to the new GRSPW packet driver (grspw_pkt.c) since it offers
>> significantly better performance, flexibility and more functionality.
>> During 2016 we have been working on enhancing the GRSPW packet driver
>> for SMP and making it SMP safe. For example better semaphore handling
>> to allow TX and RX operations in parallel without locking each other,
>> and custom ISR/work-task set up to allow multiple work-task (or none)
>> to utilize multiple CPU cores better and isolation etc. Some patches
>> have been going into the RCC-1.2.x only and some are not completed
>> yet, when completed we will also upstream them.
>>
>> Best Regards,
>>
>> Daniel Hellstrom
>> Software Section Head
>> Cobham Gaisler
>> T : +46 (0) 31 775 8657
>> F : +46 (0) 31 421407
>> daniel.hellstrom at gaisler.com
>>
>> Cobham Gaisler AB, Kungsgatan 12, SE-411 19, GÖTEBORG, Sweden.
>> +46 (0) 31 775 8650,www.cobham.com/gaisler
>>
>> Please consider the environment before printing this email
>>
>> This e-mail and any files transmitted with it ("E-mail") is intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the addressee(s), any disclosure,
>> reproduction, copying, distribution or other use of the E-mail is prohibited. If you have received this E-mail in error, please delete it and notify the sender immediately via our switchboard or return e-mail.
>>
>> Neither the company nor any subsidiary or affiliate or associated company nor any individual sending this Email accepts any liability in respect of the content (including errors and omissions) nor shall this e-mail be deemed to enter the company or any subsidiary or affiliate or associated company into a contract or to create any legally binding obligations unless expressly agreed to in writing under separate cover and timeliness of the E-mail which arise as a result of transmission. If verification is required, please request a hard copy version from the sender.
>> On 2016-10-14 07:53, Sebastian Huber wrote:
>>> 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 INGELScharles.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 sitehttp://www.syderal.ch
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users at rtems.org
>>>> http://lists.rtems.org/mailman/listinfo/users
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161017/372936a5/attachment-0002.html>
More information about the users
mailing list