diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2008-07-16 21:38:05 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2008-07-16 21:38:05 +0000 |
commit | 7d453cf211d5e732923db5127b764220da8ac29e (patch) | |
tree | 849a7b1e64d3ef7a67005443f81199c60ace14fe /c/src/lib/libcpu | |
parent | 2008-07-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-7d453cf211d5e732923db5127b764220da8ac29e.tar.bz2 |
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* shared/include/powerpc-utility.h: Added
GET_INTERRUPT_MASK macro.
Diffstat (limited to 'c/src/lib/libcpu')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/shared/include/powerpc-utility.h | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index c67d919d2f..29803fec08 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,8 @@ +2008-07-16 Till Straumann <strauman@slac.stanford.edu> + + * shared/include/powerpc-utility.h: Added + GET_INTERRUPT_MASK macro. + 2008-07-16 Joel Sherrill <joel.sherrill@oarcorp.com> * mpc6xx/clock/c_clock.c: Add fast idle. diff --git a/c/src/lib/libcpu/powerpc/shared/include/powerpc-utility.h b/c/src/lib/libcpu/powerpc/shared/include/powerpc-utility.h index 44a9a68216..23f00ff4a5 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/powerpc-utility.h +++ b/c/src/lib/libcpu/powerpc/shared/include/powerpc-utility.h @@ -499,12 +499,19 @@ static inline void ppc_set_time_base_64( uint64_t val) .endm /* + * Obtain interrupt mask + */ +.macro GET_INTERRUPT_MASK mask + mfspr \mask, sprg0 +.endm + +/* * Disables all asynchronous exeptions (interrupts) which may cause a context * switch. */ .macro INTERRUPT_DISABLE level, mask mfmsr \level - mfspr \mask, sprg0 + GET_INTERRUPT_MASK mask=\mask andc \mask, \level, \mask mtmsr \mask .endm |