Changeset d556af36 in rtems


Ignore:
Timestamp:
Aug 31, 2020, 12:12:14 PM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
33dbb33
Parents:
b87efa7
git-author:
Sebastian Huber <sebastian.huber@…> (08/31/20 12:12:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/31/20 14:19:53)
Message:

bsps: Always install IPI in SMP configs

The inter-processor interrupt (IPI) may be used to process per-CPU jobs.
See for example the blocked handler in T_interrupt_test().

Update #3199.

Location:
bsps
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bsps/powerpc/qoriq/start/bspsmp.c

    rb87efa7 rd556af36  
    211211void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
    212212{
    213 #ifdef QORIQ_IS_HYPERVISOR_GUEST
     213#ifndef QORIQ_IS_HYPERVISOR_GUEST
     214  rtems_status_code sc;
     215
     216  sc = rtems_interrupt_handler_install(
     217    QORIQ_IRQ_IPI_0 + IPI_INDEX,
     218    "IPI",
     219    RTEMS_INTERRUPT_UNIQUE,
     220    bsp_inter_processor_interrupt,
     221    NULL
     222  );
     223  if (sc != RTEMS_SUCCESSFUL) {
     224    bsp_fatal(QORIQ_FATAL_SMP_IPI_HANDLER_INSTALL);
     225  }
     226#endif
     227
    214228  (void) cpu_count;
    215 #else
    216   if (cpu_count > 1) {
    217     rtems_status_code sc;
    218 
    219     sc = rtems_interrupt_handler_install(
    220       QORIQ_IRQ_IPI_0 + IPI_INDEX,
    221       "IPI",
    222       RTEMS_INTERRUPT_UNIQUE,
    223       bsp_inter_processor_interrupt,
    224       NULL
    225     );
    226     if (sc != RTEMS_SUCCESSFUL) {
    227       bsp_fatal(QORIQ_FATAL_SMP_IPI_HANDLER_INSTALL);
    228     }
    229   }
    230 #endif
    231229}
    232230
  • bsps/riscv/griscv/start/bspsmp.c

    rb87efa7 rd556af36  
    5656uint32_t _CPU_SMP_Initialize(void)
    5757{
    58   if ( rtems_configuration_get_maximum_processors() > 1 ) {
    59     GRLIB_Cpu_Unmask_interrupt(GRLIB_mp_irq, _CPU_SMP_Get_current_processor());
     58  GRLIB_Cpu_Unmask_interrupt(GRLIB_mp_irq, _CPU_SMP_Get_current_processor());
    6059
    61     rtems_interrupt_handler_install(
    62       GRLIB_mp_irq,
    63       "IPI",
    64       RTEMS_INTERRUPT_SHARED,
    65       bsp_inter_processor_interrupt,
    66       NULL
    67     );
    68 
    69   }
     60  rtems_interrupt_handler_install(
     61    GRLIB_mp_irq,
     62    "IPI",
     63    RTEMS_INTERRUPT_SHARED,
     64    bsp_inter_processor_interrupt,
     65    NULL
     66  );
    7067
    7168  return grlib_get_cpu_count(GRLIB_IrqCtrl_Regs);
  • bsps/sparc/leon3/start/bspsmp.c

    rb87efa7 rd556af36  
    6161    bsp_fatal( LEON3_FATAL_INVALID_CACHE_CONFIG_MAIN_PROCESSOR );
    6262
    63   if ( rtems_configuration_get_maximum_processors() > 1 ) {
    64     LEON_Unmask_interrupt(LEON3_mp_irq);
    65     set_vector(bsp_inter_processor_interrupt, LEON_TRAP_TYPE(LEON3_mp_irq), 1);
    66   }
     63  LEON_Unmask_interrupt(LEON3_mp_irq);
     64  set_vector(bsp_inter_processor_interrupt, LEON_TRAP_TYPE(LEON3_mp_irq), 1);
    6765
    6866  return leon3_get_cpu_count(LEON3_IrqCtrl_Regs);
  • bsps/sparc/shared/irq/irq-shared.c

    rb87efa7 rd556af36  
    4646
    4747  for (i=0; i <= BSP_INTERRUPT_VECTOR_MAX_STD; i++) {
    48 #if defined(LEON3) && \
    49     (defined(RTEMS_SMP) || defined(RTEMS_MULTIPROCESSING))
    50     /* Don't install IRQ handler on IPI interrupt. An SMP kernel with max one
    51      * CPU does not use IPIs
    52      */
    53 #ifdef RTEMS_SMP
    54     if (rtems_configuration_get_maximum_processors() > 1)
    55 #endif
    56       if (i == LEON3_mp_irq)
    57         continue;
     48#if defined(LEON3) && (defined(RTEMS_SMP) || defined(RTEMS_MULTIPROCESSING))
     49    /* Don't install IRQ handler on IPI interrupt */
     50    if (i == LEON3_mp_irq)
     51      continue;
    5852#endif
    5953    vector = SPARC_ASYNCHRONOUS_TRAP(i) + 0x10;
Note: See TracChangeset for help on using the changeset viewer.