Changeset 9aff7e56 in rtems


Ignore:
Timestamp:
Jan 11, 2021, 4:23:16 PM (3 months ago)
Author:
Alex White <alex.white@…>
Branches:
master
Children:
07297812
Parents:
bbc9974a
git-author:
Alex White <alex.white@…> (01/11/21 16:23:16)
git-committer:
Joel Sherrill <joel@…> (03/05/21 14:43:15)
Message:

score/aarch64: Fix interrupt level reads

Location:
cpukit/score/cpu/aarch64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/aarch64/cpu.c

    rbbc9974a r9aff7e56  
    167167  );
    168168
    169   return level & AARCH64_PSTATE_I;
     169  return ( level & AARCH64_PSTATE_I ) != 0;
    170170}
    171171
  • cpukit/score/cpu/aarch64/include/rtems/score/cpu.h

    rbbc9974a r9aff7e56  
    216216static inline uint64_t AArch64_interrupt_disable( void )
    217217{
    218   uint64_t level = _CPU_ISR_Get_level();
     218  uint64_t level;
     219
    219220  __asm__ volatile (
     221    "mrs %[level], DAIF\n"
    220222    "msr DAIFSet, #0x2\n"
     223    : [level] "=&r" (level)
    221224  );
     225
    222226  return level;
    223227}
     
    251255RTEMS_INLINE_ROUTINE bool _CPU_ISR_Is_enabled( uint64_t level )
    252256{
    253   return ( level & AARCH64_PSTATE_I ) == 0;
     257  return level == 0;
    254258}
    255259
Note: See TracChangeset for help on using the changeset viewer.