Changeset c6810c8 in rtems


Ignore:
Timestamp:
Jun 19, 2017, 12:09:28 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
ae3e6af8
Parents:
b361cb6c
git-author:
Sebastian Huber <sebastian.huber@…> (06/19/17 12:09:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/20/17 05:42:25)
Message:

bsps: Improve interrupt vector enable/disable API

Change bsp_interrupt_vector_enable() and bsp_interrupt_vector_disable()
to not return a status code. Add bsp_interrupt_assert() and use it to
validate the vector number in the vector enable/disable implementations.

Location:
c/src/lib
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/beagle/irq.c

    rb361cb6c rc6810c8  
    9696}
    9797
    98 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     98void bsp_interrupt_vector_enable(rtems_vector_number vector)
    9999{
    100100  uint32_t mask, cur;
    101101  uint32_t mir_reg = omap_get_mir_reg(vector, &mask);
    102102
     103  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     104
    103105  cur = mmio_read(omap_intr.base + mir_reg);
    104106  mmio_write(omap_intr.base + mir_reg, cur & ~mask);
    105107  flush_data_cache();
    106 
    107   return RTEMS_SUCCESSFUL;
    108108}
    109109
    110 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     110void bsp_interrupt_vector_disable(rtems_vector_number vector)
    111111{
    112112  uint32_t mask, cur;
    113113  uint32_t mir_reg = omap_get_mir_reg(vector, &mask);
    114114
     115  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     116
    115117  cur = mmio_read(omap_intr.base + mir_reg);
    116118  mmio_write(omap_intr.base + mir_reg, cur | mask);
    117119  flush_data_cache();
    118 
    119   return RTEMS_SUCCESSFUL;
    120120}
    121121
  • c/src/lib/libbsp/arm/edb7312/irq/irq.c

    rb361cb6c rc6810c8  
    2828}
    2929
    30 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     30void bsp_interrupt_vector_enable(rtems_vector_number vector)
    3131{
     32    bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     33
    3234    if(vector >= BSP_EXTFIQ && vector <= BSP_SSEOTI)
    3335    {
     
    5052        *EP7312_INTMR3 |= (1 << (vector - 21));
    5153    }
    52 
    53   return RTEMS_SUCCESSFUL;
    5454}
    5555
    56 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     56void bsp_interrupt_vector_disable(rtems_vector_number vector)
    5757{
     58    bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     59
    5860    if(vector >= BSP_EXTFIQ && vector <= BSP_SSEOTI)
    5961    {
     
    7678        *EP7312_INTMR3 &= ~(1 << (vector - 21));
    7779    }
    78 
    79   return RTEMS_SUCCESSFUL;
    8080}
    8181
  • c/src/lib/libbsp/arm/gdbarmsim/irq/irq.c

    rb361cb6c rc6810c8  
    5151#ifdef ARM_MULTILIB_ARCH_V4
    5252
    53 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     53void bsp_interrupt_vector_enable(rtems_vector_number vector)
    5454{
    55   return RTEMS_SUCCESSFUL;
     55  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    5656}
    5757
    58 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     58void bsp_interrupt_vector_disable(rtems_vector_number vector)
    5959{
    60   return RTEMS_SUCCESSFUL;
     60  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    6161}
    6262
  • c/src/lib/libbsp/arm/lpc24xx/irq/irq.c

    rb361cb6c rc6810c8  
    6565#ifdef ARM_MULTILIB_ARCH_V4
    6666
    67 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     67void bsp_interrupt_vector_enable(rtems_vector_number vector)
    6868{
     69  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    6970  VICIntEnable = 1U << vector;
    70 
    71   return RTEMS_SUCCESSFUL;
    7271}
    7372
    74 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     73void bsp_interrupt_vector_disable(rtems_vector_number vector)
    7574{
     75  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    7676  VICIntEnClear = 1U << vector;
    77 
    78   return RTEMS_SUCCESSFUL;
    7977}
    8078
  • c/src/lib/libbsp/arm/lpc32xx/irq/irq.c

    rb361cb6c rc6810c8  
    5151static lpc32xx_irq_fields lpc32xx_irq_enable;
    5252
    53 static inline bool lpc32xx_irq_is_valid(rtems_vector_number vector)
    54 {
    55   return vector <= BSP_INTERRUPT_VECTOR_MAX;
    56 }
    57 
    5853static inline bool lpc32xx_irq_priority_is_valid(unsigned priority)
    5954{
     
    131126void lpc32xx_irq_set_priority(rtems_vector_number vector, unsigned priority)
    132127{
    133   if (lpc32xx_irq_is_valid(vector)) {
     128  if (bsp_interrupt_is_valid_vector(vector)) {
    134129    rtems_interrupt_level level;
    135130    unsigned i = 0;
     
    157152unsigned lpc32xx_irq_get_priority(rtems_vector_number vector)
    158153{
    159   if (lpc32xx_irq_is_valid(vector)) {
     154  if (bsp_interrupt_is_valid_vector(vector)) {
    160155    return lpc32xx_irq_priority_table [vector];
    161156  } else {
     
    166161void lpc32xx_irq_set_activation_polarity(rtems_vector_number vector, lpc32xx_irq_activation_polarity activation_polarity)
    167162{
    168   if (lpc32xx_irq_is_valid(vector)) {
     163  if (bsp_interrupt_is_valid_vector(vector)) {
    169164    rtems_interrupt_level level;
    170165
     
    181176lpc32xx_irq_activation_polarity lpc32xx_irq_get_activation_polarity(rtems_vector_number vector)
    182177{
    183   if (lpc32xx_irq_is_valid(vector)) {
     178  if (bsp_interrupt_is_valid_vector(vector)) {
    184179    if (lpc32xx_irq_is_bit_set_in_register(vector, LPC32XX_IRQ_OFFSET_APR)) {
    185180      return LPC32XX_IRQ_ACTIVE_HIGH_OR_RISING_EDGE;
     
    194189void lpc32xx_irq_set_activation_type(rtems_vector_number vector, lpc32xx_irq_activation_type activation_type)
    195190{
    196   if (lpc32xx_irq_is_valid(vector)) {
     191  if (bsp_interrupt_is_valid_vector(vector)) {
    197192    rtems_interrupt_level level;
    198193
     
    209204lpc32xx_irq_activation_type lpc32xx_irq_get_activation_type(rtems_vector_number vector)
    210205{
    211   if (lpc32xx_irq_is_valid(vector)) {
     206  if (bsp_interrupt_is_valid_vector(vector)) {
    212207    if (lpc32xx_irq_is_bit_set_in_register(vector, LPC32XX_IRQ_OFFSET_ATR)) {
    213208      return LPC32XX_IRQ_EDGE_SENSITIVE;
     
    266261}
    267262
    268 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
    269 {
    270   if (lpc32xx_irq_is_valid(vector)) {
    271     rtems_interrupt_level level;
    272 
    273     rtems_interrupt_disable(level);
    274     lpc32xx_irq_set_bit_in_register(vector, LPC32XX_IRQ_OFFSET_ER);
    275     lpc32xx_irq_set_bit_in_field(vector, &lpc32xx_irq_enable);
    276     rtems_interrupt_enable(level);
    277   }
    278 
    279   return RTEMS_SUCCESSFUL;
    280 }
    281 
    282 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
    283 {
    284   if (lpc32xx_irq_is_valid(vector)) {
    285     rtems_interrupt_level level;
    286 
    287     rtems_interrupt_disable(level);
    288     lpc32xx_irq_clear_bit_in_field(vector, &lpc32xx_irq_enable);
    289     lpc32xx_irq_clear_bit_in_register(vector, LPC32XX_IRQ_OFFSET_ER);
    290     rtems_interrupt_enable(level);
    291   }
    292 
    293   return RTEMS_SUCCESSFUL;
     263void bsp_interrupt_vector_enable(rtems_vector_number vector)
     264{
     265  rtems_interrupt_level level;
     266
     267  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     268
     269  rtems_interrupt_disable(level);
     270  lpc32xx_irq_set_bit_in_register(vector, LPC32XX_IRQ_OFFSET_ER);
     271  lpc32xx_irq_set_bit_in_field(vector, &lpc32xx_irq_enable);
     272  rtems_interrupt_enable(level);
     273}
     274
     275void bsp_interrupt_vector_disable(rtems_vector_number vector)
     276{
     277  rtems_interrupt_level level;
     278
     279  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     280
     281  rtems_interrupt_disable(level);
     282  lpc32xx_irq_clear_bit_in_field(vector, &lpc32xx_irq_enable);
     283  lpc32xx_irq_clear_bit_in_register(vector, LPC32XX_IRQ_OFFSET_ER);
     284  rtems_interrupt_enable(level);
    294285}
    295286
  • c/src/lib/libbsp/arm/raspberrypi/irq/irq.c

    rb361cb6c rc6810c8  
    140140}
    141141
    142 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     142void bsp_interrupt_vector_enable(rtems_vector_number vector)
    143143{
    144   if ( vector > BSP_INTERRUPT_VECTOR_MAX )
    145     return RTEMS_INVALID_ID;
    146 
     144  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    147145  BCM2835_REG(bsp_vector_to_reg(vector)->enable_reg_addr) =
    148146              bsp_vector_to_mask(vector);
    149 
    150   return RTEMS_SUCCESSFUL;
    151147}
    152148
    153 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     149void bsp_interrupt_vector_disable(rtems_vector_number vector)
    154150{
    155   if ( vector > BSP_INTERRUPT_VECTOR_MAX )
    156     return RTEMS_INVALID_ID;
    157 
     151  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    158152  BCM2835_REG(bsp_vector_to_reg(vector)->disable_reg_addr) =
    159153              bsp_vector_to_mask(vector);
    160 
    161   return RTEMS_SUCCESSFUL;
    162154}
    163155
  • c/src/lib/libbsp/arm/shared/arm-gic-irq.c

    rb361cb6c rc6810c8  
    4545}
    4646
    47 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     47void bsp_interrupt_vector_enable(rtems_vector_number vector)
    4848{
    49   rtems_status_code sc = RTEMS_SUCCESSFUL;
     49  volatile gic_dist *dist = ARM_GIC_DIST;
    5050
    51   if (bsp_interrupt_is_valid_vector(vector)) {
    52     volatile gic_dist *dist = ARM_GIC_DIST;
     51  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    5352
    54     gic_id_enable(dist, vector);
    55   } else {
    56     sc = RTEMS_INVALID_ID;
    57   }
    58 
    59   return sc;
     53  gic_id_enable(dist, vector);
    6054}
    6155
    62 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     56void bsp_interrupt_vector_disable(rtems_vector_number vector)
    6357{
    64   rtems_status_code sc = RTEMS_SUCCESSFUL;
     58  volatile gic_dist *dist = ARM_GIC_DIST;
    6559
    66   if (bsp_interrupt_is_valid_vector(vector)) {
    67     volatile gic_dist *dist = ARM_GIC_DIST;
     60  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    6861
    69     gic_id_disable(dist, vector);
    70   } else {
    71     sc = RTEMS_INVALID_ID;
    72   }
    73 
    74   return sc;
     62  gic_id_disable(dist, vector);
    7563}
    7664
  • c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c

    rb361cb6c rc6810c8  
    2323#ifdef ARM_MULTILIB_ARCH_V7M
    2424
    25 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     25void bsp_interrupt_vector_enable(rtems_vector_number vector)
    2626{
    27   if (bsp_interrupt_is_valid_vector(vector)) {
    28     _ARMV7M_NVIC_Set_enable((int) vector);
    29   }
    30 
    31   return RTEMS_SUCCESSFUL;
     27  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     28  _ARMV7M_NVIC_Set_enable((int) vector);
    3229}
    3330
    34 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     31void bsp_interrupt_vector_disable(rtems_vector_number vector)
    3532{
    36   if (bsp_interrupt_is_valid_vector(vector)) {
    37     _ARMV7M_NVIC_Clear_enable((int) vector);
    38   }
    39 
    40   return RTEMS_SUCCESSFUL;
     33  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     34  _ARMV7M_NVIC_Clear_enable((int) vector);
    4135}
    4236
  • c/src/lib/libbsp/arm/tms570/irq/irq.c

    rb361cb6c rc6810c8  
    2828#include <bsp/irq.h>
    2929#include <rtems/score/armv4.h>
    30 
    31 /**
    32  * @brief Check if isr vector is valid
    33  *
    34  * Check if isr vector is valid by using BSP_INTERRUPT_VECTOR_MAX and
    35  * BSP_INTERRUPT_VECTOR_MIN defined in irq.h
    36  *
    37  * @param[in] vector interrupt vector to be checked.
    38  * @retval TRUE vector is valid.
    39  * @retval FALSE vector is invalid
    40  */
    41 static inline bool tms570_irq_is_valid(
    42   rtems_vector_number vector
    43 )
    44 {
    45   return (vector <= BSP_INTERRUPT_VECTOR_MAX) &&
    46          (vector > BSP_INTERRUPT_VECTOR_MIN);
    47 }
    4830
    4931unsigned int priorityTable[BSP_INTERRUPT_VECTOR_MAX+1];
     
    6547)
    6648{
    67   if ( tms570_irq_is_valid(vector) ) {
     49  if ( bsp_interrupt_is_valid_vector(vector) ) {
    6850    priorityTable[vector] = priority;
    6951  }
     
    8567)
    8668{
    87   if ( tms570_irq_is_valid(vector) ) {
     69  if ( bsp_interrupt_is_valid_vector(vector) ) {
    8870   return priorityTable[vector];
    8971 }
     
    11597 * @retval RTEMS_SUCCESSFUL interrupt source enabled.
    11698 */
    117 rtems_status_code bsp_interrupt_vector_enable(
     99void bsp_interrupt_vector_enable(
    118100  rtems_vector_number vector
    119101)
    120102{
    121   if( !tms570_irq_is_valid(vector) ) {
    122     return RTEMS_INVALID_ID;
    123   }
    124 
     103  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    125104  TMS570_VIM.REQENASET[vector >> 5] = 1 << (vector & 0x1f);
    126 
    127   return RTEMS_SUCCESSFUL;
    128105}
    129106
     
    137114 * @retval RTEMS_SUCCESSFUL interrupt source disabled.
    138115 */
    139 rtems_status_code bsp_interrupt_vector_disable(
     116void bsp_interrupt_vector_disable(
    140117  rtems_vector_number vector
    141118)
    142119{
    143   if( !tms570_irq_is_valid(vector) ) {
    144     return RTEMS_INVALID_ID;
    145   }
    146 
     120  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    147121  TMS570_VIM.REQENACLR[vector >> 5] = 1 << (vector & 0x1f);
    148 
    149   return RTEMS_SUCCESSFUL;
    150122}
    151123
  • c/src/lib/libbsp/epiphany/epiphany_sim/irq/irq.c

    rb361cb6c rc6810c8  
    5454}
    5555
    56 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     56void bsp_interrupt_vector_enable(rtems_vector_number vector)
    5757{
    58   return 0;
     58  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    5959}
    6060
    61 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     61void bsp_interrupt_vector_disable(rtems_vector_number vector)
    6262{
    63   return 0;
     63  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    6464}
  • c/src/lib/libbsp/i386/pc386/timer/timer.c

    rb361cb6c rc6810c8  
    154154}
    155155
    156 static int timerIsOn(const rtems_raw_irq_connect_data *used)
    157 {
    158   return bsp_interrupt_vector_enable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
    159 }
    160 
    161156static rtems_raw_irq_connect_data timer_raw_irq_data = {
    162157  BSP_PERIODIC_TIMER + BSP_IRQ_VECTOR_BASE,
     
    164159  timerOn,
    165160  timerOff,
    166   timerIsOn
     161  NULL
    167162};
    168163
  • c/src/lib/libbsp/i386/shared/comm/i386-stub-glue.c

    rb361cb6c rc6810c8  
    174174}
    175175
    176 static int BSP_uart_isOn(const rtems_raw_irq_connect_data* used)
    177 {
    178   return bsp_interrupt_vector_enable(used->idtIndex - BSP_IRQ_VECTOR_BASE);
    179 }
    180 
    181176/*
    182177 * In order to have a possibility to break into
     
    211206    uart_raw_irq_data.on  = BSP_uart_on;
    212207    uart_raw_irq_data.off = BSP_uart_off;
    213     uart_raw_irq_data.isOn= BSP_uart_isOn;
    214208
    215209    /* Install ISR  */
  • c/src/lib/libbsp/i386/shared/irq/irq.c

    rb361cb6c rc6810c8  
    271271}
    272272
    273 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
    274 {
    275   if (bsp_interrupt_vector_is_valid(vector))
    276     BSP_irq_enable_at_i8259a(vector);
    277   return RTEMS_SUCCESSFUL;
    278 }
    279 
    280 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
    281 {
    282   if (bsp_interrupt_vector_is_valid(vector))
    283     BSP_irq_disable_at_i8259a(vector);
    284   return RTEMS_SUCCESSFUL;
     273void bsp_interrupt_vector_enable(rtems_vector_number vector)
     274{
     275  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     276  BSP_irq_enable_at_i8259a(vector);
     277}
     278
     279void bsp_interrupt_vector_disable(rtems_vector_number vector)
     280{
     281  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     282  BSP_irq_disable_at_i8259a(vector);
    285283}
    286284
  • c/src/lib/libbsp/lm32/shared/irq/irq.c

    rb361cb6c rc6810c8  
    1818}
    1919
    20 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     20void bsp_interrupt_vector_enable(rtems_vector_number vector)
    2121{
     22  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    2223  lm32_interrupt_unmask(1 << vector);
    23   return RTEMS_SUCCESSFUL;
    2424}
    2525
    26 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     26void bsp_interrupt_vector_disable(rtems_vector_number vector)
    2727{
     28  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    2829  lm32_interrupt_mask(1 << vector);
    29   return RTEMS_SUCCESSFUL;
    3030}
  • c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c

    rb361cb6c rc6810c8  
    6060}
    6161
    62 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
    63 {
    64   rtems_status_code sc = RTEMS_SUCCESSFUL;
    65 
    66   if (bsp_interrupt_is_valid_vector(vector)) {
    67     volatile uint32_t *imr = vector_to_imr(vector);
    68     uint32_t bit = vector_to_bit(vector);
    69     rtems_interrupt_level level;
    70 
    71     rtems_interrupt_disable(level);
    72     *imr &= ~bit;
    73     rtems_interrupt_enable(level);
    74   } else {
    75     sc = RTEMS_INVALID_ID;
    76   }
    77 
    78   return sc;
    79 }
    80 
    81 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
    82 {
    83   rtems_status_code sc = RTEMS_SUCCESSFUL;
    84 
    85   if (bsp_interrupt_is_valid_vector(vector)) {
    86     volatile uint32_t *imr = vector_to_imr(vector);
    87     uint32_t bit = vector_to_bit(vector);
    88     rtems_interrupt_level level;
    89 
    90     rtems_interrupt_disable(level);
    91     *imr |= bit;
    92     rtems_interrupt_enable(level);
    93   } else {
    94     sc = RTEMS_INVALID_ID;
    95   }
    96 
    97   return sc;
     62void bsp_interrupt_vector_enable(rtems_vector_number vector)
     63{
     64  volatile uint32_t *imr = vector_to_imr(vector);
     65  uint32_t bit = vector_to_bit(vector);
     66  rtems_interrupt_level level;
     67
     68  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     69
     70  rtems_interrupt_disable(level);
     71  *imr &= ~bit;
     72  rtems_interrupt_enable(level);
     73}
     74
     75void bsp_interrupt_vector_disable(rtems_vector_number vector)
     76{
     77  volatile uint32_t *imr = vector_to_imr(vector);
     78  uint32_t bit = vector_to_bit(vector);
     79  rtems_interrupt_level level;
     80
     81  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     82
     83  rtems_interrupt_disable(level);
     84  *imr |= bit;
     85  rtems_interrupt_enable(level);
    9886}
    9987
  • c/src/lib/libbsp/mips/shared/irq/irq.c

    rb361cb6c rc6810c8  
    6868}
    6969
    70 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     70void bsp_interrupt_vector_enable(rtems_vector_number vector)
    7171{
    72   return RTEMS_SUCCESSFUL;
     72  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    7373}
    7474
    75 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     75void bsp_interrupt_vector_disable(rtems_vector_number vector)
    7676{
    77   return RTEMS_SUCCESSFUL;
     77  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    7878}
    7979
  • c/src/lib/libbsp/or1k/generic_or1k/irq/irq.c

    rb361cb6c rc6810c8  
    3333}
    3434
    35 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     35void bsp_interrupt_vector_enable(rtems_vector_number vector)
    3636{
    37   return 0;
     37  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3838}
    3939
    40 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     40void bsp_interrupt_vector_disable(rtems_vector_number vector)
    4141{
    42   return 0;
     42  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    4343}
  • c/src/lib/libbsp/powerpc/gen5200/irq/irq.c

    rb361cb6c rc6810c8  
    360360 * This function enables a given siu interrupt
    361361 */
    362 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqLine)
    363 {
    364   int base_index = get_siu_irq_base_index( irqLine);
    365 
    366   if (is_siu_irq( irqLine)) {
     362void bsp_interrupt_vector_enable( rtems_vector_number vector)
     363{
     364  int base_index = get_siu_irq_base_index( vector);
     365
     366  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     367
     368  if (is_siu_irq( vector)) {
    367369    rtems_interrupt_level level;
    368370
     
    371373    switch (base_index) {
    372374      case BSP_PER_IRQ_LOWEST_OFFSET:
    373         BSP_enable_per_irq_at_siu( irqLine);
     375        BSP_enable_per_irq_at_siu( vector);
    374376        break;
    375377      case BSP_MAIN_IRQ_LOWEST_OFFSET:
    376         BSP_enable_main_irq_at_siu( irqLine);
     378        BSP_enable_main_irq_at_siu( vector);
    377379        break;
    378380      case BSP_CRIT_IRQ_LOWEST_OFFSET:
    379         BSP_enable_crit_irq_at_siu( irqLine);
     381        BSP_enable_crit_irq_at_siu( vector);
    380382        break;
    381383      default:
     
    387389    rtems_interrupt_enable( level);
    388390  }
    389 
    390   return RTEMS_SUCCESSFUL;
    391391}
    392392
     
    394394 * This function disables a given siu interrupt
    395395 */
    396 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqLine)
    397 {
    398   int base_index = get_siu_irq_base_index( irqLine);
    399 
    400   if (is_siu_irq( irqLine)) {
     396void bsp_interrupt_vector_disable( rtems_vector_number vector)
     397{
     398  int base_index = get_siu_irq_base_index( vector);
     399
     400  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     401
     402  if (is_siu_irq( vector)) {
    401403    rtems_interrupt_level level;
    402404
     
    405407    switch (base_index) {
    406408      case BSP_PER_IRQ_LOWEST_OFFSET:
    407         BSP_disable_per_irq_at_siu( irqLine);
     409        BSP_disable_per_irq_at_siu( vector);
    408410        break;
    409411      case BSP_MAIN_IRQ_LOWEST_OFFSET:
    410         BSP_disable_main_irq_at_siu( irqLine);
     412        BSP_disable_main_irq_at_siu( vector);
    411413        break;
    412414      case BSP_CRIT_IRQ_LOWEST_OFFSET:
    413         BSP_disable_crit_irq_at_siu( irqLine);
     415        BSP_disable_crit_irq_at_siu( vector);
    414416        break;
    415417      default:
     
    421423    rtems_interrupt_enable( level);
    422424  }
    423 
    424   return RTEMS_SUCCESSFUL;
    425425}
    426426
  • c/src/lib/libbsp/powerpc/gen83xx/irq/irq.c

    rb361cb6c rc6810c8  
    377377 * functions to enable/disable a source at the ipic
    378378 */
    379 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
    380 {
    381   rtems_vector_number vecnum = irqnum - BSP_IPIC_IRQ_LOWEST_OFFSET;
     379void bsp_interrupt_vector_enable( rtems_vector_number vector)
     380{
     381  rtems_vector_number vecnum = vector - BSP_IPIC_IRQ_LOWEST_OFFSET;
    382382  const BSP_isrc_rsc_t *rsc_ptr;
     383
     384  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    383385
    384386  if (MPC83XX_IPIC_IS_VALID_VECTOR( vecnum)) {
     
    393395    }
    394396  }
    395 
    396   return RTEMS_SUCCESSFUL;
    397 }
    398 
    399 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
    400 {
    401   rtems_vector_number vecnum = irqnum - BSP_IPIC_IRQ_LOWEST_OFFSET;
     397}
     398
     399void bsp_interrupt_vector_disable( rtems_vector_number vector)
     400{
     401  rtems_vector_number vecnum = vector - BSP_IPIC_IRQ_LOWEST_OFFSET;
    402402  const BSP_isrc_rsc_t *rsc_ptr;
     403
     404  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    403405
    404406  if (MPC83XX_IPIC_IS_VALID_VECTOR( vecnum)) {
     
    413415    }
    414416  }
    415 
    416   return RTEMS_SUCCESSFUL;
    417417}
    418418
  • c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c

    rb361cb6c rc6810c8  
    329329}
    330330
    331 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
    332 {
     331void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
     332{
     333  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     334
    333335  if (is_cpm_irq(irqnum)) {
    334336    /*
     
    337339    BSP_irq_enable_at_cpm (irqnum);
    338340  }
    339 
    340   return RTEMS_SUCCESSFUL;
    341 }
    342 
    343 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
    344 {
     341}
     342
     343void bsp_interrupt_vector_disable( rtems_vector_number irqnum)
     344{
     345  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     346
    345347  if (is_cpm_irq(irqnum)) {
    346348    /*
     
    349351    BSP_irq_disable_at_cpm (irqnum);
    350352  }
    351 
    352   return RTEMS_SUCCESSFUL;
    353353}
    354354
  • c/src/lib/libbsp/powerpc/psim/irq/irq_init.c

    rb361cb6c rc6810c8  
    103103 * functions to enable/disable a source at the ipic
    104104 */
    105 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
     105void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
    106106{
    107107  /* FIXME: do something */
    108   return RTEMS_SUCCESSFUL;
     108  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    109109}
    110110
    111 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
     111void bsp_interrupt_vector_disable( rtems_vector_number irqnum)
    112112{
    113113  /* FIXME: do something */
    114   return RTEMS_SUCCESSFUL;
     114  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    115115}
    116116
  • c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c

    rb361cb6c rc6810c8  
    3939 * functions to enable/disable a source at the ipic
    4040 */
    41 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
     41void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
    4242{
    4343  /* FIXME: do something */
    44   return RTEMS_SUCCESSFUL;
     44  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    4545}
    4646
    47 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
     47void bsp_interrupt_vector_disable( rtems_vector_number irqnum)
    4848{
    4949  /* FIXME: do something */
    50   return RTEMS_SUCCESSFUL;
     50  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    5151}
    5252
  • c/src/lib/libbsp/powerpc/qoriq/irq/irq.c

    rb361cb6c rc6810c8  
    176176static rtems_status_code pic_vector_enable(rtems_vector_number vector, uint32_t msk)
    177177{
    178         rtems_status_code sc = RTEMS_SUCCESSFUL;
    179 
    180         if (bsp_interrupt_is_valid_vector(vector)) {
    181                 volatile qoriq_pic_src_cfg *src_cfg = get_src_cfg(vector);
    182                 rtems_interrupt_lock_context lock_context;
    183 
    184                 rtems_interrupt_lock_acquire(&lock, &lock_context);
    185                 src_cfg->vpr = (src_cfg->vpr & ~VPR_MSK) | msk;
    186                 rtems_interrupt_lock_release(&lock, &lock_context);
    187         }
    188 
    189         return sc;
    190 }
    191 
    192 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
    193 {
    194         return pic_vector_enable(vector, 0);
    195 }
    196 
    197 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
    198 {
    199         return pic_vector_enable(vector, VPR_MSK);
     178        volatile qoriq_pic_src_cfg *src_cfg = get_src_cfg(vector);
     179        rtems_interrupt_lock_context lock_context;
     180
     181        bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     182
     183        rtems_interrupt_lock_acquire(&lock, &lock_context);
     184        src_cfg->vpr = (src_cfg->vpr & ~VPR_MSK) | msk;
     185        rtems_interrupt_lock_release(&lock, &lock_context);
     186}
     187
     188void bsp_interrupt_vector_enable(rtems_vector_number vector)
     189{
     190        pic_vector_enable(vector, 0);
     191}
     192
     193void bsp_interrupt_vector_disable(rtems_vector_number vector)
     194{
     195        pic_vector_enable(vector, VPR_MSK);
    200196}
    201197
  • c/src/lib/libbsp/powerpc/t32mppc/irq/irq.c

    rb361cb6c rc6810c8  
    1515#include <bsp/irq-generic.h>
    1616
    17 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     17void bsp_interrupt_vector_enable(rtems_vector_number vector)
    1818{
    19         return RTEMS_INVALID_ID;
     19        bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    2020}
    2121
    22 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     22void bsp_interrupt_vector_disable(rtems_vector_number vector)
    2323{
    24         return RTEMS_INVALID_ID;
     24        bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    2525}
    2626
  • c/src/lib/libbsp/powerpc/tqm8xx/irq/irq.c

    rb361cb6c rc6810c8  
    6464}
    6565
    66 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
    67 {
    68   if (BSP_IS_CPM_IRQ(irqnum)) {
    69     bsp_irq_enable_at_CPM(irqnum);
    70     return RTEMS_SUCCESSFUL;
    71   }
    72   else if (BSP_IS_SIU_IRQ(irqnum)) {
    73     bsp_irq_enable_at_SIU(irqnum);
    74     return RTEMS_SUCCESSFUL;
    75   }
    76   return RTEMS_INVALID_ID;
    77 }
    78 
    79 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum)
    80 {
    81   if (BSP_IS_CPM_IRQ(irqnum)) {
    82     bsp_irq_disable_at_CPM(irqnum);
    83     return RTEMS_SUCCESSFUL;
    84   }
    85   else if (BSP_IS_SIU_IRQ(irqnum)) {
    86     bsp_irq_disable_at_SIU(irqnum);
    87     return RTEMS_SUCCESSFUL;
    88   }
    89   return RTEMS_INVALID_ID;
     66void bsp_interrupt_vector_enable(rtems_vector_number vector)
     67{
     68  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     69
     70  if (BSP_IS_CPM_IRQ(vector)) {
     71    bsp_irq_enable_at_CPM(vector);
     72  } else if (BSP_IS_SIU_IRQ(vector)) {
     73    bsp_irq_enable_at_SIU(vector);
     74  }
     75}
     76
     77void bsp_interrupt_vector_disable(rtems_vector_number vector)
     78{
     79  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     80
     81  if (BSP_IS_CPM_IRQ(vector)) {
     82    bsp_irq_disable_at_CPM(vector);
     83  } else if (BSP_IS_SIU_IRQ(vector)) {
     84    bsp_irq_disable_at_SIU(vector);
     85  }
    9086}
    9187
  • c/src/lib/libbsp/powerpc/virtex/irq/irq_init.c

    rb361cb6c rc6810c8  
    133133}
    134134
    135 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     135void bsp_interrupt_vector_enable(rtems_vector_number vector)
    136136{
    137   rtems_status_code sc = RTEMS_SUCCESSFUL;
     137  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    138138
    139   if (bsp_interrupt_is_valid_vector(vector)) {
    140     if (BSP_IS_OPBINTC_IRQ(vector)) {
    141       BSP_irq_enable_at_opbintc(vector);
    142     }
    143   } else {
    144     sc = RTEMS_INVALID_ID;
     139  if (BSP_IS_OPBINTC_IRQ(vector)) {
     140    BSP_irq_enable_at_opbintc(vector);
    145141  }
    146 
    147   return sc;
    148142}
    149143
    150 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     144void bsp_interrupt_vector_disable(rtems_vector_number vector)
    151145{
    152   rtems_status_code sc = RTEMS_SUCCESSFUL;
     146  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    153147
    154   if (bsp_interrupt_is_valid_vector(vector)) {
    155     if (BSP_IS_OPBINTC_IRQ(vector)) {
    156       BSP_irq_disable_at_opbintc(vector);
    157     }
    158   } else {
    159     sc = RTEMS_INVALID_ID;
     148  if (BSP_IS_OPBINTC_IRQ(vector)) {
     149    BSP_irq_disable_at_opbintc(vector);
    160150  }
    161 
    162   return sc;
    163151}
    164152
  • c/src/lib/libbsp/shared/include/irq-generic.h

    rb361cb6c rc6810c8  
    1010 * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
    1111 *
    12  * Copyright (c) 2008-2014 embedded brains GmbH.
     12 * Copyright (c) 2008, 2017 embedded brains GmbH.
    1313 *
    1414 *  embedded brains GmbH
     
    3131
    3232#include <rtems/irq-extension.h>
     33#include <rtems/score/assert.h>
    3334
    3435#ifdef RTEMS_SMP
     
    7172  #define bsp_interrupt_fence(order) do { } while (0)
    7273#endif
     74
     75#define bsp_interrupt_assert(e) _Assert(e)
    7376
    7477struct bsp_interrupt_handler_entry {
     
    216219 * This function shall enable the vector at the corresponding facility (in most
    217220 * cases the interrupt controller).  It will be called then the first handler
    218  * is installed for the vector in bsp_interrupt_handler_install().  It is
    219  * guaranteed that the vector number is within the BSP_INTERRUPT_VECTOR_MIN and
    220  * BSP_INTERRUPT_VECTOR_MAX range.
     221 * is installed for the vector in bsp_interrupt_handler_install() for example.
     222 *
     223 * @note The implementation should use
     224 * bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector)) to valdiate the
     225 * vector number.
    221226 *
    222227 * @note You must not install or remove an interrupt handler in this function.
    223228 * This may result in a deadlock.
    224  *
    225  * @return On success RTEMS_SUCCESSFUL shall be returned.
    226  */
    227 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector);
     229 */
     230void bsp_interrupt_vector_enable(rtems_vector_number vector);
    228231
    229232/**
     
    232235 * This function shall disable the vector at the corresponding facility (in
    233236 * most cases the interrupt controller).  It will be called then the last
    234  * handler is removed for the vector in bsp_interrupt_handler_remove().  It is
    235  * guaranteed that the vector number is within the BSP_INTERRUPT_VECTOR_MIN and
    236  * BSP_INTERRUPT_VECTOR_MAX range.
     237 * handler is removed for the vector in bsp_interrupt_handler_remove() for
     238 * example.
     239 *
     240 * @note The implementation should use
     241 * bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector)) to valdiate the
     242 * vector number.
    237243 *
    238244 * @note You must not install or remove an interrupt handler in this function.
    239245 * This may result in a deadlock.
    240  *
    241  * @return On success RTEMS_SUCCESSFUL shall be returned.
    242  */
    243 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector);
     246 */
     247void bsp_interrupt_vector_disable(rtems_vector_number vector);
    244248
    245249/**
  • c/src/lib/libbsp/shared/src/irq-generic.c

    rb361cb6c rc6810c8  
    208208)
    209209{
    210   rtems_status_code sc = RTEMS_SUCCESSFUL;
    211210  rtems_interrupt_level level;
    212211  rtems_vector_number index = 0;
     
    347346  /* Enable the vector if necessary */
    348347  if (enable_vector) {
    349     sc = bsp_interrupt_vector_enable(vector);
    350     if (sc != RTEMS_SUCCESSFUL) {
    351       bsp_interrupt_unlock();
    352       return sc;
    353     }
     348    bsp_interrupt_vector_enable(vector);
    354349  }
    355350
     
    376371)
    377372{
    378   rtems_status_code sc = RTEMS_SUCCESSFUL;
    379373  rtems_interrupt_level level;
    380374  rtems_vector_number index = 0;
     
    447441
    448442      /* Disable the vector */
    449       sc = bsp_interrupt_vector_disable(vector);
     443      bsp_interrupt_vector_disable(vector);
    450444
    451445      /* Clear entry */
     
    459453      /* Allow shared handlers */
    460454      bsp_interrupt_set_handler_unique(index, false);
    461 
    462       /* Check status code */
    463       if (sc != RTEMS_SUCCESSFUL) {
    464         bsp_interrupt_unlock();
    465         return sc;
    466       }
    467455    } else {
    468456      /*
  • c/src/lib/libbsp/shared/src/irq-server.c

    rb361cb6c rc6810c8  
    5757  rtems_interrupt_server_entry *e = arg;
    5858
    59   bsp_interrupt_vector_disable(e->vector);
     59  if (bsp_interrupt_is_valid_vector(e->vector)) {
     60    bsp_interrupt_vector_disable(e->vector);
     61  }
    6062
    6163  rtems_interrupt_lock_acquire(&bsp_interrupt_server_lock, &lock_context);
     
    325327      } while (action != NULL);
    326328
    327       bsp_interrupt_vector_enable(vector);
     329      if (bsp_interrupt_is_valid_vector(vector)) {
     330        bsp_interrupt_vector_enable(vector);
     331      }
    328332    }
    329333  }
  • c/src/lib/libbsp/sparc/shared/irq/irq-shared.c

    rb361cb6c rc6810c8  
    7171}
    7272
    73 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     73void bsp_interrupt_vector_enable(rtems_vector_number vector)
    7474{
    7575  int irq = (int)vector;
     76  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    7677  BSP_Cpu_Unmask_interrupt(irq, bsp_irq_cpu(irq));
    77 
    78   return RTEMS_SUCCESSFUL;
    7978}
    8079
    81 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     80void bsp_interrupt_vector_disable(rtems_vector_number vector)
    8281{
    8382  int irq = (int)vector;
     83  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    8484  BSP_Cpu_Mask_interrupt(irq, bsp_irq_cpu(irq));
    85 
    86   return RTEMS_SUCCESSFUL;
    8785}
    8886
  • c/src/lib/libcpu/arm/at91rm9200/irq/irq.c

    rb361cb6c rc6810c8  
    2828}
    2929
    30 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     30void bsp_interrupt_vector_enable(rtems_vector_number vector)
    3131{
     32  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3233  AIC_CTL_REG(AIC_IECR) = 1 << vector;
    33 
    34   return RTEMS_SUCCESSFUL;
    3534}
    3635
    37 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     36void bsp_interrupt_vector_disable(rtems_vector_number vector)
    3837{
     38  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3939  AIC_CTL_REG(AIC_IDCR) = 1 << vector;
    40 
    41   return RTEMS_SUCCESSFUL;
    4240}
    4341
  • c/src/lib/libcpu/arm/lpc22xx/irq/irq.c

    rb361cb6c rc6810c8  
    2727}
    2828
    29 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     29void bsp_interrupt_vector_enable(rtems_vector_number vector)
    3030{
     31  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3132  VICIntEnable |= 1 << vector;
    32 
    33   return RTEMS_SUCCESSFUL;
    3433}
    3534
    36 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     35void bsp_interrupt_vector_disable(rtems_vector_number vector)
    3736{
     37  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3838  VICIntEnClr = 1 << vector;
    39 
    40   return RTEMS_SUCCESSFUL;
    4139}
    4240
  • c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c

    rb361cb6c rc6810c8  
    2727}
    2828
    29 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     29void bsp_interrupt_vector_enable(rtems_vector_number vector)
    3030{
    31   if (vector >= MC9328MXL_NUM_INTS)
    32      return RTEMS_INVALID_ID;
     31  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3332
    34   MC9328MXL_AITC_INTENNUM = vector;
    35 
    36   return RTEMS_SUCCESSFUL;
     33  if (vector < MC9328MXL_NUM_INTS)
     34    MC9328MXL_AITC_INTENNUM = vector;
    3735}
    3836
    39 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     37void bsp_interrupt_vector_disable(rtems_vector_number vector)
    4038{
    41   if (vector >= MC9328MXL_NUM_INTS)
    42      return RTEMS_INVALID_ID;
     39  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    4340
    44   MC9328MXL_AITC_INTDISNUM = vector;
    45 
    46   return RTEMS_SUCCESSFUL;
     41  if (vector < MC9328MXL_NUM_INTS)
     42    MC9328MXL_AITC_INTDISNUM = vector;
    4743}
    4844
  • c/src/lib/libcpu/arm/pxa255/irq/irq.c

    rb361cb6c rc6810c8  
    2525}
    2626
    27 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     27void bsp_interrupt_vector_enable(rtems_vector_number vector)
    2828{
     29  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    2930  XSCALE_INT_ICMR |= 1 << vector;
    30 
    31   return RTEMS_SUCCESSFUL;
    3231}
    3332
    34 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     33void bsp_interrupt_vector_disable(rtems_vector_number vector)
    3534{
     35  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3636  XSCALE_INT_ICMR  &= ~(1 << vector);
    37 
    38   return RTEMS_SUCCESSFUL;
    3937}
    4038
  • c/src/lib/libcpu/arm/s3c24xx/irq/irq.c

    rb361cb6c rc6810c8  
    2828}
    2929
    30 rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
     30void bsp_interrupt_vector_enable(rtems_vector_number vector)
    3131{
    32   return RTEMS_SUCCESSFUL;
     32  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3333}
    3434
    35 rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
     35void bsp_interrupt_vector_disable(rtems_vector_number vector)
    3636{
    37   return RTEMS_SUCCESSFUL;
     37  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
    3838}
    3939
  • c/src/lib/libcpu/powerpc/mpc55xx/irq/irq.c

    rb361cb6c rc6810c8  
    181181}
    182182
    183 rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number vector)
     183void bsp_interrupt_vector_enable( rtems_vector_number vector)
    184184{
    185         if (MPC55XX_IRQ_IS_VALID( vector)) {
    186                 return mpc55xx_intc_set_priority( vector, MPC55XX_INTC_DEFAULT_PRIORITY);
    187         } else {
    188                 return RTEMS_SUCCESSFUL;
    189         }
     185        bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     186        mpc55xx_intc_set_priority( vector, MPC55XX_INTC_DEFAULT_PRIORITY);
    190187}
    191188
    192 rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number vector)
     189void bsp_interrupt_vector_disable( rtems_vector_number vector)
    193190{
    194         if (MPC55XX_IRQ_IS_VALID( vector)) {
    195                 return mpc55xx_intc_set_priority( vector, MPC55XX_INTC_DISABLED_PRIORITY);
    196         } else {
    197                 return RTEMS_SUCCESSFUL;
    198         }
     191        bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
     192        mpc55xx_intc_set_priority( vector, MPC55XX_INTC_DISABLED_PRIORITY);
    199193}
Note: See TracChangeset for help on using the changeset viewer.