SMP support for Raspberry Pi 2

Rohini Kulkarni krohini1593 at gmail.com
Sat Jul 4 10:37:40 UTC 2015


On Fri, Jul 3, 2015 at 10:43 PM, Joel Sherrill <joel.sherrill at oarcorp.com>
wrote:

>
>
> On July 3, 2015 11:53:07 AM CDT, Rohini Kulkarni <krohini1593 at gmail.com>
> wrote:
> >Any help that I can with this?
> >
> >On 1 Jul 2015 16:59, "Rohini Kulkarni" <krohini1593 at gmail.com> wrote:
> >
> >Hi all,
> >
> >I wish to know where the maximum number of processors for a variant are
> >configured. I took a look at some configure scripts. I could see the
> >processor count defined for xilinx-zynq in its configuration file as
> >ZYNQ_CPUS=2.
>
  This looks to be BSP specific and could originate in configure.ac or a .h
file.
I found this under ~/libbsp/arm/xilinx-zynq/configure
# Check whether --enable-smp was given.
if test "$rtems_cv_HAS_SMP" = "yes"; then :
  ZYNQ_CPUS="2"
fi

>
> It is likely that each BSP has an underlying hardware limit.
>
Yes

>
> >
> >rtems_configuration_get_maximum_processors() called in gets this
> >configured number. But I don't know from where.
>
> This is set initially based on the confdefs.h parameter
> CONFIGURE_SMP_MAXIMUM_PROCESSORS or something close to that (on phone).
>
Ya, I found this piece of code in confdefs.h
#if defined(RTEMS_SMP)
  /*
   *  If configured for SMP, then we need to know the maximum CPU cores.
   */
  #if !defined(CONFIGURE_SMP_APPLICATION)
    #if !defined(CONFIGURE_SMP_MAXIMUM_PROCESSORS)
      #define CONFIGURE_SMP_MAXIMUM_PROCESSORS 1
    #endif
  #else
    #if !defined(CONFIGURE_SMP_MAXIMUM_PROCESSORS)
      #error "CONFIGURE_SMP_MAXIMUM_PROCESSORS not specified for SMP
Application"
    #endif
  #endif
#endif

This piece of code gets the configured number of CPUs. I suppose this
number is not specified and will have to be specified by me somewhere in
the configurations. But I am unable to find out where.

> Ultimately the maximum CPUs for an application is the lower of those
> available or RTEMS is configured for.
>
Yes.

>
> >Also where is RTEMS_SMP defined for a bsp?
>
> A side-effect of building with --enable-smp.
>
Oh,alright.

>
>
> >Thanks.
> >
> >
> >--
> >
> >Rohini Kulkarni
>
> --joel
>



-- 
Rohini Kulkarni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150704/93bd0eb6/attachment-0002.html>


More information about the devel mailing list