Ticket #1822: lm32_irqfix.diff

File lm32_irqfix.diff, 736 bytes (added by Sebastien Bourdeauducq, on Jun 20, 2011 at 10:38:28 AM)

patch

  • cpukit/score/cpu/lm32/rtems/score/lm32.h

    diff --git a/cpukit/score/cpu/lm32/rtems/score/lm32.h b/cpukit/score/cpu/lm32/rtems/score/lm32.h
    index 61dfc1d..5c801c9 100644
    a b extern "C" { 
    9292#define lm32_interrupt_unmask( _mask ) \
    9393  do { register uint32_t im; \
    9494    __asm__ volatile ("rcsr %0,im":"=r"(im)); \
    95     im |= _mask; \
     95    im |= ((uint32_t)_mask); \
    9696    __asm__ volatile ("wcsr im,%0"::"r"(im)); \
    9797  } while (0)
    9898
    9999#define lm32_interrupt_mask( _mask ) \
    100100  do { register uint32_t im; \
    101101    __asm__ volatile ("rcsr %0,im":"=r"(im)); \
    102     im &= ~_mask; \
     102    im &= ~((uint32_t)_mask); \
    103103    __asm__ volatile ("wcsr im,%0"::"r"(im)); \
    104104  } while (0)
    105105