Changeset c7b4eca7 in rtems


Ignore:
Timestamp:
Jul 27, 2021, 7:58:43 AM (3 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
bf338f04
Parents:
67c033d3
git-author:
Sebastian Huber <sebastian.huber@…> (07/27/21 07:58:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/27/21 08:03:19)
Message:

bsps/irq: bsp_interrupt_facility_initialize()

Do not return a status code in bsp_interrupt_facility_initialize() since this
leads to unreachable code in bsp_interrupt_initialize(). Use RTEMS_DEBUG
assertions in bsp_interrupt_facility_initialize() if necessary.

Location:
bsps
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/beagle/irq/irq.c

    r67c033d3 rc7b4eca7  
    164164}
    165165
    166 rtems_status_code bsp_interrupt_facility_initialize(void)
     166void bsp_interrupt_facility_initialize(void)
    167167{
    168168  int i;
     
    184184  arm_cp15_set_exception_handler(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt);
    185185  arm_cp15_set_vector_base_address(bsp_vector_table_begin);
    186 
    187   return RTEMS_SUCCESSFUL;
    188186}
  • bsps/arm/csb336/irq/irq.c

    r67c033d3 rc7b4eca7  
    8989}
    9090
    91 rtems_status_code bsp_interrupt_facility_initialize(void)
     91void bsp_interrupt_facility_initialize(void)
    9292{
    93 
    9493  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    95 
    96   return RTEMS_SUCCESSFUL;
    9794}
  • bsps/arm/csb337/irq/irq.c

    r67c033d3 rc7b4eca7  
    8484}
    8585
    86 rtems_status_code bsp_interrupt_facility_initialize(void)
     86void bsp_interrupt_facility_initialize(void)
    8787{
    8888  unsigned long i = 0;
     
    9696
    9797  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    98 
    99   return RTEMS_SUCCESSFUL;
    10098}
  • bsps/arm/edb7312/irq/irq.c

    r67c033d3 rc7b4eca7  
    126126}
    127127
    128 rtems_status_code bsp_interrupt_facility_initialize(void)
     128void bsp_interrupt_facility_initialize(void)
    129129{
    130130  uint32_t int_stat = 0;
     
    222222
    223223  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    224 
    225   return RTEMS_SUCCESSFUL;
    226 }
     224}
  • bsps/arm/gumstix/irq/irq.c

    r67c033d3 rc7b4eca7  
    8181}
    8282
    83 rtems_status_code bsp_interrupt_facility_initialize(void)
     83void bsp_interrupt_facility_initialize(void)
    8484{
    8585  /* disable all interrupts */
     
    9191  /* Install the IRQ exception handler */
    9292  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    93 
    94   return RTEMS_SUCCESSFUL;
    9593}
  • bsps/arm/lpc24xx/irq/irq.c

    r67c033d3 rc7b4eca7  
    121121}
    122122
    123 rtems_status_code bsp_interrupt_facility_initialize(void)
     123void bsp_interrupt_facility_initialize(void)
    124124{
    125125  volatile uint32_t *addr = VICVectAddrBase;
     
    158158  /* Install the IRQ exception handler */
    159159  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    160 
    161   return RTEMS_SUCCESSFUL;
    162160}
    163161
  • bsps/arm/lpc32xx/irq/irq.c

    r67c033d3 rc7b4eca7  
    348348}
    349349
    350 rtems_status_code bsp_interrupt_facility_initialize(void)
     350void bsp_interrupt_facility_initialize(void)
    351351{
    352352  size_t i = 0;
     
    386386
    387387  lpc32xx_set_exception_handler(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt);
    388 
    389   return RTEMS_SUCCESSFUL;
    390 }
     388}
  • bsps/arm/raspberrypi/irq/irq.c

    r67c033d3 rc7b4eca7  
    218218}
    219219
    220 rtems_status_code bsp_interrupt_facility_initialize(void)
     220void bsp_interrupt_facility_initialize(void)
    221221{
    222222   BCM2835_REG(BCM2835_IRQ_DISABLE1) = 0xffffffff;
     
    224224   BCM2835_REG(BCM2835_IRQ_DISABLE_BASIC) = 0xffffffff;
    225225   BCM2835_REG(BCM2835_IRQ_FIQ_CTRL) = 0;
    226    return RTEMS_SUCCESSFUL;
    227 }
     226}
  • bsps/arm/rtl22xx/irq/irq.c

    r67c033d3 rc7b4eca7  
    8383}
    8484
    85 rtems_status_code bsp_interrupt_facility_initialize(void)
     85void bsp_interrupt_facility_initialize(void)
    8686{
    8787  volatile uint32_t *ctrl = (volatile uint32_t *) VICVectCntlBase;
     
    110110  /* Install the IRQ exception handler */
    111111  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    112 
    113   return RTEMS_SUCCESSFUL;
    114112}
  • bsps/arm/shared/irq/irq-armv7m.c

    r67c033d3 rc7b4eca7  
    9595}
    9696
    97 rtems_status_code bsp_interrupt_facility_initialize(void)
     97void bsp_interrupt_facility_initialize(void)
    9898{
    9999  ARMV7M_Exception_handler *vector_table;
     
    119119
    120120  _ARMV7M_SCB->vtor = vector_table;
    121 
    122   return RTEMS_SUCCESSFUL;
    123121}
    124122
  • bsps/arm/smdk2410/irq/irq.c

    r67c033d3 rc7b4eca7  
    8282}
    8383
    84 rtems_status_code bsp_interrupt_facility_initialize(void)
     84void bsp_interrupt_facility_initialize(void)
    8585{
    8686  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL);
    87 
    88   return RTEMS_SUCCESSFUL;
    8987}
  • bsps/arm/tms570/irq/irq.c

    r67c033d3 rc7b4eca7  
    175175 * @retval RTEMS_SUCCESSFUL All is set
    176176 */
    177 rtems_status_code bsp_interrupt_facility_initialize(void)
     177void bsp_interrupt_facility_initialize(void)
    178178{
    179179  void (**vim_vec)(void) = (void (**)(void)) 0xFFF82000;
     
    242242  #endif
    243243  asm volatile ("mcr p15, 0, %0, c1, c0, 0\n": : "r" (sctlr));
    244 
    245   return RTEMS_SUCCESSFUL;
    246 }
     244}
  • bsps/i386/shared/irq/irq.c

    r67c033d3 rc7b4eca7  
    327327}
    328328
    329 rtems_status_code bsp_interrupt_facility_initialize(void)
     329void bsp_interrupt_facility_initialize(void)
    330330{
    331331  int i;
     
    348348  for (i = 0; i < BSP_IRQ_LINES_NUMBER; i++)
    349349    irq_trigger[i] = elcr_read_trigger(i);
    350 
    351   return RTEMS_SUCCESSFUL;
    352350}
    353351
  • bsps/include/bsp/irq-generic.h

    r67c033d3 rc7b4eca7  
    203203 * and disabled via your bsp_interrupt_vector_disable() function.  These
    204204 * functions have to work afterwards.
    205  *
    206  * @return On success RTEMS_SUCCESSFUL shall be returned.
    207  */
    208 rtems_status_code bsp_interrupt_facility_initialize(void);
     205 */
     206void bsp_interrupt_facility_initialize(void);
    209207
    210208/**
  • bsps/lm32/shared/irq/irq.c

    r67c033d3 rc7b4eca7  
    1313#include <bsp/irq-generic.h>
    1414
    15 rtems_status_code bsp_interrupt_facility_initialize(void)
     15void bsp_interrupt_facility_initialize(void)
    1616{
    17   return RTEMS_SUCCESSFUL;
     17  /* Nothing to do */
    1818}
    1919
  • bsps/mips/shared/irq/irq.c

    r67c033d3 rc7b4eca7  
    122122}
    123123
    124 rtems_status_code bsp_interrupt_facility_initialize(void)
     124void bsp_interrupt_facility_initialize(void)
    125125{
    126126  mips_install_isr_entries();
    127   return RTEMS_SUCCESSFUL;
    128127}
    129128
  • bsps/powerpc/gen5200/irq/irq.c

    r67c033d3 rc7b4eca7  
    746746}
    747747
    748 rtems_status_code bsp_interrupt_facility_initialize( void)
    749 {
     748void bsp_interrupt_facility_initialize( void)
     749{
     750  rtems_status_code sc;
     751
    750752  BSP_SIU_irq_init();
    751753
    752754  /* Install exception handler */
    753   if (ppc_exc_set_handler( ASM_EXT_VECTOR, C_dispatch_irq_handler)) {
    754     return RTEMS_IO_ERROR;
    755   }
    756   if (ppc_exc_set_handler( ASM_E300_SYSMGMT_VECTOR, C_dispatch_irq_handler)) {
    757     return RTEMS_IO_ERROR;
    758   }
    759 
    760   return RTEMS_SUCCESSFUL;
     755  sc = ppc_exc_set_handler( ASM_EXT_VECTOR, C_dispatch_irq_handler);
     756  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
     757  sc = ppc_exc_set_handler( ASM_E300_SYSMGMT_VECTOR, C_dispatch_irq_handler);
     758  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
    761759}
    762760
  • bsps/powerpc/gen83xx/irq/irq.c

    r67c033d3 rc7b4eca7  
    549549 * to implement nested interrupts.
    550550 */
    551 static rtems_status_code mpc83xx_ipic_calc_prio2mask(void)
    552 {
    553   rtems_status_code rc = RTEMS_SUCCESSFUL;
    554 
     551static void mpc83xx_ipic_calc_prio2mask(void)
     552{
    555553  /*
    556554   * FIXME: fill the array
    557555   */
    558   return rc;
    559556}
    560557
     
    562559 * Activate the interrupt controller
    563560 */
    564 static rtems_status_code mpc83xx_ipic_initialize(void)
     561static void mpc83xx_ipic_initialize(void)
    565562{
    566563  /*
     
    614611   * calculate priority masks
    615612   */
    616   return mpc83xx_ipic_calc_prio2mask();
     613  mpc83xx_ipic_calc_prio2mask();
    617614}
    618615
     
    625622}
    626623
    627 rtems_status_code bsp_interrupt_facility_initialize()
    628 {
     624void bsp_interrupt_facility_initialize()
     625{
     626  rtems_status_code sc;
     627
    629628  /* Install exception handler */
    630   if (ppc_exc_set_handler( ASM_EXT_VECTOR, mpc83xx_exception_handler)) {
    631     return RTEMS_IO_ERROR;
    632   }
    633   if (ppc_exc_set_handler( ASM_E300_SYSMGMT_VECTOR, mpc83xx_exception_handler)) {
    634     return RTEMS_IO_ERROR;
    635   }
    636   if (ppc_exc_set_handler( ASM_E300_CRIT_VECTOR, mpc83xx_exception_handler)) {
    637     return RTEMS_IO_ERROR;
    638   }
     629  sc = ppc_exc_set_handler( ASM_EXT_VECTOR, mpc83xx_exception_handler);
     630  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
     631  sc = ppc_exc_set_handler( ASM_E300_SYSMGMT_VECTOR, mpc83xx_exception_handler);
     632  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
     633  sc = ppc_exc_set_handler( ASM_E300_CRIT_VECTOR, mpc83xx_exception_handler);
     634  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
    639635
    640636  /* Initialize the interrupt controller */
    641   return mpc83xx_ipic_initialize();
    642 }
     637  mpc83xx_ipic_initialize();
     638}
  • bsps/powerpc/mpc55xxevb/start/irq.c

    r67c033d3 rc7b4eca7  
    132132}
    133133
    134 rtems_status_code bsp_interrupt_facility_initialize(void)
     134void bsp_interrupt_facility_initialize(void)
    135135{
    136136        rtems_vector_number vector;
     
    149149        /* Set current priority to 0 */
    150150        INTC.CPR.B.PRI = 0;
    151 
    152         return RTEMS_SUCCESSFUL;
    153151}
    154152
  • bsps/powerpc/mpc8260ads/irq/irq.c

    r67c033d3 rc7b4eca7  
    399399}
    400400
    401 rtems_status_code bsp_interrupt_facility_initialize()
    402 {
     401void bsp_interrupt_facility_initialize()
     402{
     403  rtems_status_code sc;
     404
    403405  /* Install exception handler */
    404   if (ppc_exc_set_handler( ASM_EXT_VECTOR, C_dispatch_irq_handler)) {
    405     return RTEMS_IO_ERROR;
    406   }
    407   if (ppc_exc_set_handler( ASM_DEC_VECTOR, C_dispatch_irq_handler)) {
    408     return RTEMS_IO_ERROR;
    409   }
     406  sc = ppc_exc_set_handler( ASM_EXT_VECTOR, C_dispatch_irq_handler);
     407  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
     408  sc = ppc_exc_set_handler( ASM_DEC_VECTOR, C_dispatch_irq_handler);
     409  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
    410410
    411411  /* Fill in priority masks */
     
    414414  /* Initialize the interrupt controller */
    415415  BSP_CPM_irq_init();
    416 
    417   return RTEMS_SUCCESSFUL;
    418 }
     416}
  • bsps/powerpc/psim/irq/irq_init.c

    r67c033d3 rc7b4eca7  
    159159}
    160160
    161 rtems_status_code bsp_interrupt_facility_initialize(void)
     161void bsp_interrupt_facility_initialize(void)
    162162{
     163  rtems_status_code sc;
     164
    163165  /* Install exception handler */
    164   if (ppc_exc_set_handler( ASM_EXT_VECTOR, psim_exception_handler)) {
    165     return RTEMS_IO_ERROR;
    166   }
    167  
    168   return RTEMS_SUCCESSFUL;
     166  sc = ppc_exc_set_handler( ASM_EXT_VECTOR, psim_exception_handler);
     167  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
    169168}
  • bsps/powerpc/qemuppc/irq/irq_init.c

    r67c033d3 rc7b4eca7  
    9595}
    9696
    97 rtems_status_code bsp_interrupt_facility_initialize(void)
     97void bsp_interrupt_facility_initialize(void)
    9898{
     99  rtems_status_code sc;
     100
    99101  /* Install exception handler */
    100   if (ppc_exc_set_handler( ASM_EXT_VECTOR, qemuppc_exception_handler)) {
    101     return RTEMS_IO_ERROR;
    102   }
    103 
    104   return RTEMS_SUCCESSFUL;
     102  sc = ppc_exc_set_handler( ASM_EXT_VECTOR, qemuppc_exception_handler);
     103  _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL);
    105104}
  • bsps/powerpc/qoriq/irq/irq.c

    r67c033d3 rc7b4eca7  
    182182}
    183183
    184 rtems_status_code bsp_interrupt_facility_initialize(void)
     184void bsp_interrupt_facility_initialize(void)
    185185{
    186186        unsigned int i;
     
    459459}
    460460
    461 rtems_status_code bsp_interrupt_facility_initialize(void)
     461void bsp_interrupt_facility_initialize(void)
    462462{
    463463        rtems_vector_number i = 0;
     
    495495                qoriq.pic.whoami;
    496496        }
    497 
    498         return RTEMS_SUCCESSFUL;
    499497}
    500498
  • bsps/powerpc/shared/irq/ppc-irq-generic.c

    r67c033d3 rc7b4eca7  
    152152}
    153153
    154 rtems_status_code bsp_interrupt_facility_initialize(void)
     154void bsp_interrupt_facility_initialize(void)
    155155{
    156156  /*
     
    158158   */
    159159  BSP_rtems_irq_mng_init(0);
    160   return RTEMS_SUCCESSFUL;
    161160}
  • bsps/powerpc/t32mppc/irq/irq.c

    r67c033d3 rc7b4eca7  
    8080}
    8181
    82 rtems_status_code bsp_interrupt_facility_initialize(void)
     82void bsp_interrupt_facility_initialize(void)
    8383{
    84         return RTEMS_SUCCESSFUL;
     84        /* Nothing to do */
    8585}
  • bsps/powerpc/tqm8xx/irq/irq.c

    r67c033d3 rc7b4eca7  
    227227 * Activate the CPIC
    228228 */
    229 static rtems_status_code mpc8xx_cpic_initialize( void)
    230 {
     229static void mpc8xx_cpic_initialize( void)
     230{
     231  rtems_status_code sc;
     232
    231233  /*
    232234   * mask off all interrupts
     
    241243   * enable CPIC interrupt in SIU interrupt controller
    242244   */
    243   return bsp_irq_enable_at_SIU(BSP_CPM_INTERRUPT);
     245  sc = bsp_irq_enable_at_SIU(BSP_CPM_INTERRUPT);
     246  _Assert_Unused_variable_equals(sc, RTEMS_SUCCESSFUL);
    244247}
    245248
     
    247250 * Activate the SIU interrupt controller
    248251 */
    249 static rtems_status_code mpc8xx_siu_int_initialize( void)
     252static void mpc8xx_siu_int_initialize( void)
    250253{
    251254  /*
     
    253256   */
    254257  m8xx.simask = 0;
    255 
    256   return RTEMS_SUCCESSFUL;
    257258}
    258259
     
    263264}
    264265
    265 rtems_status_code bsp_interrupt_facility_initialize()
    266 {
     266void bsp_interrupt_facility_initialize()
     267{
     268  rtems_status_code sc;
     269
    267270  /* Install exception handler */
    268   if (ppc_exc_set_handler(ASM_EXT_VECTOR, mpc8xx_exception_handler)) {
    269     return RTEMS_IO_ERROR;
    270   }
     271  sc = ppc_exc_set_handler(ASM_EXT_VECTOR, mpc8xx_exception_handler);
     272  _Assert_Unused_variable_equals(sc, RTEMS_SUCCESSFUL);
     273
    271274  /* Initialize the SIU interrupt controller */
    272   if (mpc8xx_siu_int_initialize()) {
    273     return RTEMS_IO_ERROR;
    274   }
     275  mpc8xx_siu_int_initialize();
     276
    275277  /* Initialize the CPIC interrupt controller */
    276   return mpc8xx_cpic_initialize();
    277 }
     278  mpc8xx_cpic_initialize();
     279}
  • bsps/powerpc/virtex/irq/irq_init.c

    r67c033d3 rc7b4eca7  
    204204}
    205205
    206 rtems_status_code bsp_interrupt_facility_initialize(void)
    207 {
     206void bsp_interrupt_facility_initialize(void)
     207{
     208  rtems_status_code sc;
     209
    208210  opb_intc_init();
    209211
    210   ppc_exc_set_handler(ASM_EXT_VECTOR, C_dispatch_irq_handler);
    211 
    212   return RTEMS_SUCCESSFUL;
    213 }
     212  sc = ppc_exc_set_handler(ASM_EXT_VECTOR, C_dispatch_irq_handler);
     213  _Assert_Unused_variable_equals(sc, RTEMS_SUCCESSFUL);
     214}
  • bsps/riscv/griscv/irq/irq.c

    r67c033d3 rc7b4eca7  
    7676}
    7777
    78 rtems_status_code bsp_interrupt_facility_initialize(void)
     78void bsp_interrupt_facility_initialize(void)
    7979{
    8080
     
    8484   */
    8585  set_csr(mie, MIP_MEIP);
    86 
    87   return RTEMS_SUCCESSFUL;
    8886}
    8987
  • bsps/riscv/riscv/irq/irq.c

    r67c033d3 rc7b4eca7  
    216216}
    217217
    218 rtems_status_code bsp_interrupt_facility_initialize(void)
     218void bsp_interrupt_facility_initialize(void)
    219219{
    220220  const void *fdt;
     
    223223  riscv_clint_init(fdt);
    224224  riscv_plic_init(fdt);
    225 
    226   return RTEMS_SUCCESSFUL;
    227225}
    228226
  • bsps/shared/dev/irq/arm-gicv2.c

    r67c033d3 rc7b4eca7  
    209209}
    210210
    211 rtems_status_code bsp_interrupt_facility_initialize(void)
     211void bsp_interrupt_facility_initialize(void)
    212212{
    213213  volatile gic_cpuif *cpuif = GIC_CPUIF;
     
    240240
    241241  enable_fiq();
    242   return RTEMS_SUCCESSFUL;
    243242}
    244243
  • bsps/shared/dev/irq/arm-gicv3.c

    r67c033d3 rc7b4eca7  
    389389}
    390390
    391 rtems_status_code bsp_interrupt_facility_initialize(void)
     391void bsp_interrupt_facility_initialize(void)
    392392{
    393393  volatile gic_dist *dist = ARM_GIC_DIST;
     
    424424
    425425  gicv3_init_cpu_interface();
    426   return RTEMS_SUCCESSFUL;
    427426}
    428427
  • bsps/shared/irq/irq-default.c

    r67c033d3 rc7b4eca7  
    9494}
    9595
    96 rtems_status_code bsp_interrupt_facility_initialize(void)
     96void bsp_interrupt_facility_initialize(void)
    9797{
    98   return RTEMS_NOT_IMPLEMENTED;
     98  /* Nothing to do */
    9999}
  • bsps/shared/irq/irq-generic.c

    r67c033d3 rc7b4eca7  
    161161void bsp_interrupt_initialize( void )
    162162{
    163   rtems_status_code sc;
    164 
    165   sc = bsp_interrupt_facility_initialize();
    166   if ( sc != RTEMS_SUCCESSFUL ) {
    167     bsp_fatal( BSP_FATAL_INTERRUPT_INITIALIZATION );
    168   }
    169 
     163  bsp_interrupt_facility_initialize();
    170164  bsp_interrupt_set_initialized();
    171165}
  • bsps/sparc/leon3/start/eirq.c

    r67c033d3 rc7b4eca7  
    4646#endif
    4747
    48 rtems_status_code bsp_interrupt_facility_initialize(void)
     48void bsp_interrupt_facility_initialize(void)
    4949{
    5050#if defined(RTEMS_SMP)
     
    5858  }
    5959#endif
    60 
    61   return RTEMS_SUCCESSFUL;
    6260}
    6361
  • bsps/sparc/shared/irq/irq-shared.c

    r67c033d3 rc7b4eca7  
    3636}
    3737
    38 rtems_status_code bsp_interrupt_facility_initialize(void)
     38void bsp_interrupt_facility_initialize(void)
    3939{
    4040  /* Nothing to do */
    41   return RTEMS_SUCCESSFUL;
    4241}
    4342
  • bsps/x86_64/amd64/interrupts/idt.c

    r67c033d3 rc7b4eca7  
    130130}
    131131
    132 rtems_status_code bsp_interrupt_facility_initialize(void)
     132void bsp_interrupt_facility_initialize(void)
    133133{
    134134  uintptr_t old;
     
    138138
    139139  lidt(&idtr);
    140 
    141   return RTEMS_SUCCESSFUL;
    142140}
    143141
Note: See TracChangeset for help on using the changeset viewer.