[PATCH] score: Define _CPU_Start_multitasking only for LEON SPARC, not SPARC in general
Jennifer Averett
Jennifer.Averett at OARcorp.com
Tue Aug 26 19:35:12 UTC 2014
I'm getting the following error when building the head with smp enabled.
sparc-rtems4.11-gcc -B../../../../../sis/lib/ -specs bsp_specs -qrtems -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -Wl,--gc-sections -mcpu=cypress -o hello.exe init.o
../../../../../sis/lib/librtemscpu.a(libscore_a-threadstartmultitasking.o): In function `_Thread_Start_multitasking':
/home/jennifer/smp/b-sis/sparc-rtems4.11/c/sis/cpukit/score/../../../../../../rtems/c/src/../../cpukit/score/src/threadstartmultitasking.c:78: undefined reference to `_BSP_Start_multitasking'
collect2: error: ld returned 1 exit status
gmake[6]: *** [hello.exe] Error 1
gmake[6]: Leaving directory `/home/jennifer/smp/b-sis/sparc-rtems4.11/c/sis/testsuites/samples/hello'
gmake[5]: *** [all-local] Error 1
> -----Original Message-----
> From: devel [mailto:devel-bounces at rtems.org] On Behalf Of Sebastian
> Huber
> Sent: Tuesday, August 26, 2014 3:12 AM
> To: Joel Sherrill; Daniel Cederman; devel at rtems.org
> Subject: Re: [PATCH] score: Define _CPU_Start_multitasking only for LEON
> SPARC, not SPARC in general
>
> On 25/08/14 19:29, Joel Sherrill wrote:
> >
> > On 8/25/2014 11:44 AM, Sebastian Huber wrote:
> >> On 08/25/2014 05:04 PM, Joel Sherrill wrote:
> >>> On 8/25/2014 5:10 AM, Sebastian Huber wrote:
> >>>> On 25/08/14 11:45, Daniel Cederman wrote:
> >>>>> ---
> >>>>> cpukit/score/cpu/sparc/rtems/score/cpu.h | 2 ++
> >>>>> 1 file changed, 2 insertions(+)
> >>>>>
> >>>>> diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h
> >>>>> b/cpukit/score/cpu/sparc/rtems/score/cpu.h
> >>>>> index 9c38b55..d4c2ef0 100644
> >>>>> --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
> >>>>> +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
> >>>>> @@ -1203,9 +1203,11 @@ register struct Per_CPU_Control
> >>>>> *_SPARC_Per_CPU_current __asm__( "g6" );
> >>>>>
> >>>>> void _CPU_SMP_Send_interrupt( uint32_t
> >>>>> target_processor_index );
> >>>>>
> >>>>> + #if defined(__leon__)
> >>>>> void _BSP_Start_multitasking( Context_Control *heir )
> >>>>> RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
> >>>>> #define _CPU_Start_multitasking _BSP_Start_multitasking
> >>>>> + #endif
> >>>> In case it is LEON specific, then it should have a LEON specific name.
> >>>>
> >>> What's the overall rationale?
> >> If its mandated by the CPU port, e.g. all the stuff defined by
> >> no_cpu/cpu.h, then it should be _CPU_*. In case all BSPs of a CPU
> >> port must implement a CPU port function, then it is _BSP_*. In case
> >> only certain multilib variants implement it specifically, then they
> >> should have an appropriate multilib specific prefix, e.g. _LEON3_* or
> >> _ARMV7M_*. Does this make sense? Maybe we should add this stuff to
> >> the CPU supplement.
> >>
> > Yeah. I get this part and we do need better rules but what's the issue
> > with this one method? The ifdef made it look like only the leon flavor
> > of RTEMS and no others even had this method.
> >
>
> Actually after one night of sleep I think it makes no sense. Now I think its
> better that all the CPU port functions should start with _CPU_*, so it is easier
> to find them and set breakpoints.
>
> I also think that this
>
> #define _CPU_Start_multitasking
>
> should be changed to something like
>
> #define CPU_HAS_DEDICATED_START_MULTITASKING (TRUE | FALSE)
>
> to be in line with all the other CPU port variants, e.g.
> CPU_HAS_SOFTWARE_INTERRUPT_STACK etc.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber at embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list