2008-07-16 Till Straumann <strauman@slac.stanford.edu>

* shared/include/powerpc-utility.h: Added
	GET_INTERRUPT_MASK macro.
This commit is contained in:
Till Straumann
2008-07-16 21:38:05 +00:00
parent c702dd809e
commit 7d453cf211
2 changed files with 13 additions and 1 deletions

View File

@@ -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.

View File

@@ -498,13 +498,20 @@ static inline void ppc_set_time_base_64( uint64_t val)
\name:
.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