Changeset f8ff2a0 in rtems


Ignore:
Timestamp:
Feb 17, 2014, 1:31:32 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
6ca4f6a
Parents:
4627fcd
git-author:
Sebastian Huber <sebastian.huber@…> (02/17/14 13:31:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/19/14 08:59:41)
Message:

score: Delete bsp_smp_broadcast_interrupt()

Since the per-CPU SMP lock must be acquired and released to send the
message a single interrupt broadcast operations offers no benefits. If
synchronization is required, then a SMP barrier must be used anyway.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c

    r4627fcd rf8ff2a0  
    4545}
    4646
    47 void bsp_smp_broadcast_interrupt(void)
    48 {
    49   /*
    50    * FIXME: This broadcasts the interrupt also to processors not used by RTEMS.
    51    */
    52   rtems_status_code sc = arm_gic_irq_generate_software_irq(
    53     ARM_GIC_IRQ_SGI_0,
    54     ARM_GIC_IRQ_SOFTWARE_IRQ_TO_ALL_EXCEPT_SELF,
    55     0xff
    56   );
    57 }
    58 
    5947void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
    6048{
  • c/src/lib/libbsp/i386/shared/smp/smp-imps.c

    r4627fcd rf8ff2a0  
    804804  send_ipi( target_processor_index, 0x30 );
    805805}
    806 
    807 void bsp_smp_broadcast_interrupt(void)
    808 {
    809   /* Single broadcast interrupt */
    810   send_ipi( 0, LAPIC_ICR_DS_ALLEX | 0x30 );
    811 }
  • c/src/lib/libbsp/powerpc/qoriq/startup/smp.c

    r4627fcd rf8ff2a0  
    164164}
    165165
    166 void bsp_smp_broadcast_interrupt(void)
    167 {
    168   uint32_t self = ppc_processor_id();
    169   qoriq.pic.per_cpu [self].ipidr [IPI_INDEX].reg = ALL_CORES;
    170 }
    171 
    172166void _CPU_SMP_Send_interrupt(uint32_t target_processor_index)
    173167{
  • c/src/lib/libbsp/shared/smp/smp_stub.c

    r4627fcd rf8ff2a0  
    1010 */
    1111
    12 #include <rtems.h>
    13 #include <bsp.h>
    14 #include <rtems/bspIo.h>
    15 #include <rtems/bspsmp.h>
    16 #include <stdlib.h>
     12#include <rtems/score/cpu.h>
    1713
    1814uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
     
    2218}
    2319
    24 void bsp_smp_broadcast_interrupt(void)
    25 {
    26 }
    27 
    28 void bsp_smp_broadcast_message(
    29   uint32_t  message
    30 )
    31 {
    32 }
    33 
    3420void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
    3521{
  • c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c

    r4627fcd rf8ff2a0  
    9494  LEON3_IrqCtrl_Regs->force[target_processor_index] = 1 << LEON3_MP_IRQ;
    9595}
    96 
    97 void bsp_smp_broadcast_interrupt(void)
    98 {
    99   uint32_t dest_cpu;
    100   uint32_t cpu;
    101   uint32_t max_cpus;
    102 
    103   cpu = rtems_smp_get_current_processor();
    104   max_cpus = rtems_smp_get_processor_count();
    105 
    106   for ( dest_cpu=0 ; dest_cpu < max_cpus ; dest_cpu++ ) {
    107     if ( cpu != dest_cpu ) {
    108       _CPU_SMP_Send_interrupt( dest_cpu );
    109     }
    110   }
    111 }
  • cpukit/score/include/rtems/bspsmp.h

    r4627fcd rf8ff2a0  
    5353
    5454/**
    55  *  @brief Generate an interprocessor broadcast interrupt.
    56  *
    57  *  This method is invoked when RTEMS wants to let all of the other
    58  *  CPUs know that it has sent them message.  CPUs not including
    59  *  the originating CPU should receive the interrupt.
    60 
    61  *
    62  *  @note On CPUs without the capability to generate a broadcast
    63  *        to all other CPUs interrupt, this can be implemented by
    64  *        a loop of sending interrupts to specific CPUs.
    65  */
    66 void bsp_smp_broadcast_interrupt(void);
    67 
    68 /**
    6955 * @brief Performs high-level initialization of a secondary processor and runs
    7056 * the application threads.
  • cpukit/score/src/smp.c

    r4627fcd rf8ff2a0  
    2020
    2121#include <rtems/bspsmp.h>
     22#include <rtems/score/assert.h>
    2223#include <rtems/score/threaddispatch.h>
    2324#include <rtems/score/threadimpl.h>
     
    103104  uint32_t cpu;
    104105
     106  _Assert_Thread_dispatching_repressed();
     107
    105108  for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
    106109    if ( cpu != self ) {
    107       Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
    108       ISR_Level level;
    109 
    110       _Per_CPU_ISR_disable_and_acquire( per_cpu, level );
    111       per_cpu->message |= message;
    112       _Per_CPU_Release_and_ISR_enable( per_cpu, level );
     110      _SMP_Send_message( cpu, message );
    113111    }
    114112  }
    115 
    116   bsp_smp_broadcast_interrupt();
    117113}
    118114
Note: See TracChangeset for help on using the changeset viewer.