Changeset 8cacceb in rtems


Ignore:
Timestamp:
May 14, 2013, 11:23:10 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
2f6108f9
Parents:
42eee51
git-author:
Sebastian Huber <sebastian.huber@…> (05/14/13 11:23:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/29/13 09:06:07)
Message:

smp: Delete bsp_smp_secondary_cpu_initialize()

Do not call bsp_smp_secondary_cpu_initialize() in
rtems_smp_secondary_cpu_initialize(). This allows more flexibilty in
the BSP low-level code. Specify context requirements for a call to
rtems_smp_secondary_cpu_initialize().

Files:
5 edited

Legend:

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

    r42eee51 r8cacceb  
    200200extern unsigned imps_lapic_addr;
    201201
     202static void secondary_cpu_initialize(void);
     203
    202204/*
    203205 *  MPS checksum function
     
    270272  );
    271273
    272   reset[1] = (uint32_t)rtems_smp_secondary_cpu_initialize;
     274  reset[1] = (uint32_t)secondary_cpu_initialize;
    273275  reset[2] = (uint32_t)_Per_CPU_Information[apicid].interrupt_stack_high;
    274276
     
    793795
    794796/* pc386 specific initialization */
    795 void bsp_smp_secondary_cpu_initialize(int cpu)
     797static void secondary_cpu_initialize(void)
    796798{
    797799  int apicid;
     
    805807  enable_sse();
    806808#endif
     809
     810  rtems_smp_secondary_cpu_initialize();
    807811}
    808812
  • c/src/lib/libbsp/shared/smp/smp_stub.c

    r42eee51 r8cacceb  
    1515#include <rtems/bspsmp.h>
    1616#include <stdlib.h>
    17 
    18 void bsp_smp_secondary_cpu_initialize(int cpu)
    19 {
    20 }
    2117
    2218uint32_t bsp_smp_initialize( uint32_t configured_cpu_count )
  • c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c

    r42eee51 r8cacceb  
    4242}
    4343
    44 void bsp_smp_secondary_cpu_initialize(int cpu)
     44static void leon3_secondary_cpu_initialize(void)
    4545{
     46  int cpu = bsp_smp_processor_id();
     47
    4648  sparc_leon3_set_cctrl( 0x80000F );
    4749  LEON_Unmask_interrupt(LEON3_MP_IRQ);
    4850  LEON3_IrqCtrl_Regs->mask[cpu] |= 1 << LEON3_MP_IRQ;
     51
     52  rtems_smp_secondary_cpu_initialize();
    4953}
    5054
     
    9094    bsp_ap_stack = _Per_CPU_Information[cpu].interrupt_stack_high -
    9195                      CPU_MINIMUM_STACK_FRAME_SIZE;
    92     bsp_ap_entry = rtems_smp_secondary_cpu_initialize;
     96    bsp_ap_entry = leon3_secondary_cpu_initialize;
    9397
    9498    LEON3_IrqCtrl_Regs->mpstat = 1 << cpu;
  • cpukit/score/include/rtems/bspsmp.h

    r42eee51 r8cacceb  
    120120
    121121/**
    122  *  This method is invoked by @ref rtems_smp_secondary_cpu_initialize
    123  *  to allow the BSP to perform some intialization.  The @a cpu
    124  *  parameter indicates the secondary CPU that the code is executing on
    125  *  and is currently being initialized.
     122 * @brief Performs high-level initialization of a secondary CPU and runs the
     123 * application threads.
    126124 *
    127  *  @note This is called by @ref rtems_smp_secondary_cpu_initialize.
     125 * The low-level initialization code must call this function to hand over the
     126 * control of this processor to RTEMS.  Interrupts must be disabled.  It must
     127 * be possible to send inter-processor interrupts to this processor.  Since
     128 * interrupts are disabled the inter-processor interrupt delivery is postponed
     129 * until interrupts are enabled the first time.  This is usually a side-effect
     130 * of the context switch to the first thread.
     131 *
     132 * The pre-requisites for the call to this function are
     133 * - disabled interrupts,
     134 * - reception of inter-processor interrupts is possible,
     135 * - a valid stack pointer and enough stack space,
     136 * - a valid code memory, and
     137 * - a valid BSS section.
     138 *
     139 * This function must not be called by the main processor.
    128140 */
    129 void bsp_smp_secondary_cpu_initialize(int cpu);
    130 
    131 /**
    132  *  @brief Initialize secondary CPU and coordinates.
    133  *
    134  *  This method is the C entry point which secondary CPUs should
    135  *  arrange to call.  It performs OS initialization for the secondary
    136  *  CPU and coordinates bring it to a useful state.
    137  *
    138  *  @note This is provided by RTEMS.
    139  */
    140 void rtems_smp_secondary_cpu_initialize(void);
     141void rtems_smp_secondary_cpu_initialize( void );
    141142
    142143/**
  • cpukit/score/src/smp.c

    r42eee51 r8cacceb  
    5656
    5757  cpu = bsp_smp_processor_id();
    58 
    59   _ISR_Disable_on_this_core( level );
    60   bsp_smp_secondary_cpu_initialize(cpu);
    6158
    6259  /*
Note: See TracChangeset for help on using the changeset viewer.