Large number of failures on leon3

Jiri Gaisler jiri at gaisler.se
Wed Mar 22 18:30:12 UTC 2017


On 03/21/2017 10:26 PM, Joel Sherrill wrote:
>
>
> On Tue, Mar 21, 2017 at 5:17 AM, Jiri Gaisler <jiri at gaisler.se
> <mailto:jiri at gaisler.se>> wrote:
>
>     The culprit seems to be the CASA instruction. The leon3 bsp is
>     built to always need this instruction, regardless if SMP is
>     enabled or not. The sis simulator does not support CASA at the
>     moment, hence the failures. The erc32 and leon2 bsp does not use
>     CASA since the hardware does not support it. If the leon3 bsp is
>     supposed to always require CASA, then it should be noted in the
>     bsp documentation as not all leon3 hardware actually supports CASA.
>
>
> Hmmm... I let this sit so I could think. I wanted to make sure we didn't
> head down a path of needing another BSP variant or multilib variant
> unnecessarily.
>
> Where is this instruction used? I didn't see it in the port or BSP. But
> again "grep -i cas" has a LOT of output.
>
> Do all SMP configurations have CASA? 
>
> Is the instruction optional in uniprocessor configurations? If so, is
> there a case where you must use it in uniprocessor configurations?
>
> Is this something in gcc (atomics?) that needs to be more conditional
> on the CPU model? And.. could that push us to a multilib variant?
>
> Sorry for sounding confused. I just would like to understand when
> the instruction is present and which knob settings we have to set
> and how to know when it is OK to use.  So it starts with knowing
> when it is available in HW, when gcc might use it, etc.

The CASA (compare and swap) is present in the gcc multi-libbed libraries
such as libatomic.a and libsupc++.a. The CASA is only present when the
-mcpu=leon3 option is used, which is default for the leon3 bsp. So I
think that it would be sufficient to note in the documentation that the
default settings in the leon3 bsp requires support for CASA in the
hardware. By removing -mcpu=leon3 from CPU_FLAGS in the leon3.cfg, the
bsp can be built to work without CASA in the hardware. I have tested
this, and some tests that previously failed (e.g. cdtest.exe) then
worked OK on sis-leon3. I will however probably not work (well) with SMP.

Other tests (e.g. sp69.exe) still fails on sis-leon3, but this is a
problem in the leon3 port of sis and I am trying to fix it right now.

To simplify testing in the future, I have added support for CASA to the
leon3 port of sis. This makes it possible to test bsps both without CASA
(erc32 & leon2) and with CASA (leon3).

I will make new patches for sis once I have everything sorted...

Jiri.
>
> Thanks.
>
> --joel
>
>     Jiri.
>
>
>     On 03/19/2017 02:32 PM, Joel Sherrill wrote:
>>     Hi
>>
>>     I was following up on Gedare's testing and tried leon3. There
>>     were a surprising number of failures there with SMP disabled.
>>     This is testing with gdb. Does anyone else get the same 
>>     results with qemu or tsim?  Any idea what's broken?
>>
>>
>>     Passed:   458
>>     Failed:    20
>>     Timeouts:  73
>>     Invalid:    3
>>     -------------
>>     Total:    554
>>
>>     Failures:
>>      cdtest.exe
>>      spintrcritical20.exe
>>      dl05.exe
>>      spintrcritical01.exe
>>      spintrcritical04.exe
>>      spintrcritical10.exe
>>      spintrcritical22.exe
>>      sp69.exe
>>      spintrcritical21.exe
>>      sp11.exe
>>      spintrcritical16.exe
>>      spintrcritical23.exe
>>      psxfile01.exe
>>      spintrcritical05.exe
>>      spintrcritical02.exe
>>      spintrcritical08.exe
>>      psxgetrusage01.exe
>>      spcpucounter01.exe
>>
>>
>>
>>     _______________________________________________
>>     devel mailing list
>>     devel at rtems.org <mailto:devel at rtems.org>
>>     http://lists.rtems.org/mailman/listinfo/devel
>>     <http://lists.rtems.org/mailman/listinfo/devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170322/0ae69eaa/attachment.html>


More information about the devel mailing list