Changeset 6c2eedc in rtems


Ignore:
Timestamp:
May 13, 2013, 11:37:06 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
36a6f58a
Parents:
12c99a64
git-author:
Sebastian Huber <sebastian.huber@…> (05/13/13 11:37:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/16/13 09:44:12)
Message:

smp: Add maximum_processors field to config

Delete rtems_configuration_get_smp_maximum_processors(). Delete
rtems_configuration_smp_maximum_processors variable. Add
maximum_processors field to rtems_configuration_table if RTEMS_SMP is
defined. Add rtems_configuration_get_maximum_processors().

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/shared/smp/smp-imps.c

    r12c99a64 r6c2eedc  
    402402    switch (*((unsigned char *)start)) {
    403403    case IMPS_BCT_PROCESSOR:
    404       if ( imps_num_cpus < rtems_configuration_smp_maximum_processors ) {
     404      if ( imps_num_cpus < rtems_configuration_get_maximum_processors() ) {
    405405        add_processor((imps_processor *)start);
    406406      } else
     
    429429    start += 8;
    430430  }
    431   if ( imps_num_cpus > rtems_configuration_smp_maximum_processors ) {
     431  if ( imps_num_cpus > rtems_configuration_get_maximum_processors() ) {
    432432    printk(
    433433      "WARNING!! Found more CPUs (%d) than configured for (%d)!!\n",
    434434      imps_num_cpus - 1,
    435       rtems_configuration_smp_maximum_processors
     435      rtems_configuration_get_maximum_processors()
    436436    );
    437     imps_num_cpus = rtems_configuration_smp_maximum_processors;
     437    imps_num_cpus = rtems_configuration_get_maximum_processors();
    438438    return;
    439439  }
  • c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c

    r12c99a64 r6c2eedc  
    7272  #endif
    7373
    74   if ( found_cpus > rtems_configuration_smp_maximum_processors ) {
     74  if ( found_cpus > rtems_configuration_get_maximum_processors() ) {
    7575    printk(
    7676      "%d CPUs IS MORE THAN CONFIGURED -- ONLY USING %d\n",
    7777      found_cpus,
    78       rtems_configuration_smp_maximum_processors
     78      rtems_configuration_get_maximum_processors()
    7979    );
    80     found_cpus = rtems_configuration_smp_maximum_processors;
     80    found_cpus = rtems_configuration_get_maximum_processors();
    8181  }
    8282
  • cpukit/rtems/include/rtems/rtems/smp.h

    r12c99a64 r6c2eedc  
    3737/**@{*/
    3838
    39 extern uint32_t rtems_configuration_smp_maximum_processors;
    40 
    4139/**
    4240 * @brief Obtain Number of Cores in System
     
    5048#define rtems_smp_get_number_of_processors() \
    5149    (_SMP_Processor_count)
    52 
    53 /**
    54  * @brief Obtain Maximum Cores Configured
    55  *
    56  * This method returns the number of CPU cores that were configured
    57  * in the system. The actual number of cores will always be less than
    58  * or equal to the number  of maximum number of cores which were configured.
    59  *
    60  * @retval This method returns the number of cores configured.
    61  */
    62 #define rtems_configuration_get_smp_maximum_processors() \
    63     (rtems_configuration_smp_maximum_processors)
    6450
    6551/**
  • cpukit/sapi/include/confdefs.h

    r12c99a64 r6c2eedc  
    23612361      CONFIGURE_MULTIPROCESSING_TABLE,        /* pointer to MP config table */
    23622362    #endif
     2363    #ifdef RTEMS_SMP
     2364      CONFIGURE_SMP_MAXIMUM_PROCESSORS
     2365    #endif
    23632366  };
    23642367#endif
     
    23672370
    23682371#if defined(RTEMS_SMP)
    2369   /**
    2370    * Instantiate the variable which specifies the number of CPUs
    2371    * in an SMP configuration.
    2372    */
    2373   #if defined(CONFIGURE_INIT)
    2374     uint32_t rtems_configuration_smp_maximum_processors = \
    2375         CONFIGURE_SMP_MAXIMUM_PROCESSORS;
    2376   #else
    2377     extern uint32_t rtems_configuration_smp_maximum_processors;
    2378   #endif
    23792372 /*
    23802373  * Instantiate the Per CPU information based upon the user configuration.
  • cpukit/sapi/include/rtems/config.h

    r12c99a64 r6c2eedc  
    231231    rtems_multiprocessing_table   *User_multiprocessing_table;
    232232  #endif
     233  #ifdef RTEMS_SMP
     234    uint32_t                     maximum_processors;
     235  #endif
    233236} rtems_configuration_table;
    234237
     
    336339#endif
    337340
     341/**
     342 * @brief Returns the configured maximum count of processors.
     343 *
     344 * The actual number of processors available for the application will be less
     345 * than or equal to the configured maximum count of processors.
     346 *
     347 * @return The configured maximum count of processors.
     348 */
     349#ifdef RTEMS_SMP
     350  #define rtems_configuration_get_maximum_processors() \
     351        (Configuration.maximum_processors)
     352#else
     353  #define rtems_configuration_get_maximum_processors() \
     354        1
     355#endif
     356
    338357#define rtems_configuration_get_rtems_api_configuration() \
    339358        (&Configuration_RTEMS_API)
  • cpukit/sapi/src/exinit.c

    r12c99a64 r6c2eedc  
    165165  #if defined(RTEMS_SMP)
    166166    _SMP_Processor_count =
    167         bsp_smp_initialize( rtems_configuration_smp_maximum_processors );
     167        bsp_smp_initialize( rtems_configuration_get_maximum_processors() );
    168168  #endif
    169169
  • cpukit/score/include/rtems/bspsmp.h

    r12c99a64 r6c2eedc  
    4949
    5050#ifndef ASM
    51 /**
    52  *  @brief Maximum number of CPUs in SMP system.
    53  *
    54  *  This variable is set during the SMP initialization sequence to
    55  *  indicate the Maximum number of CPUs in this system.
    56  */
    57 extern uint32_t rtems_configuration_smp_maximum_processors;
    58 
    5951/**
    6052 *  @brief Initialize secondary CPUs.
  • cpukit/score/src/percpu.c

    r12c99a64 r6c2eedc  
    4747    size = rtems_configuration_get_interrupt_stack_size();
    4848    _Per_CPU_Information_p[0] = &_Per_CPU_Information[0];
    49     for (cpu=1 ; cpu < rtems_configuration_smp_maximum_processors; cpu++ ) {
     49    for (cpu=1 ; cpu < rtems_configuration_get_maximum_processors(); cpu++ ) {
    5050
    5151      Per_CPU_Control *p = &_Per_CPU_Information[cpu];
  • cpukit/score/src/thread.c

    r12c99a64 r6c2eedc  
    8585   */
    8686  #if defined(RTEMS_SMP)
    87     maximum_internal_threads = rtems_configuration_smp_maximum_processors;
     87    maximum_internal_threads = rtems_configuration_get_maximum_processors();
    8888  #else
    8989    maximum_internal_threads = 1;
Note: See TracChangeset for help on using the changeset viewer.