nios2: _Swap(): optimize irq unlock
If the CPU lacks certain features the only writable bit in the status register is the PIE bit, so just write the saved value back. Change-Id: I91537ff640aa9977d19587c4b0ae414028752341 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
69abfbdc9b
commit
fda3bc1c8c
1 changed files with 7 additions and 1 deletions
|
@ -103,6 +103,10 @@ BRANCH_LABEL(next_chosen)
|
||||||
* key was supplied as argument to _Swap()
|
* key was supplied as argument to _Swap()
|
||||||
*/
|
*/
|
||||||
ldw r3, __tTCS_coopReg_OFFSET + __t_coop_key_OFFSET(r11)
|
ldw r3, __tTCS_coopReg_OFFSET + __t_coop_key_OFFSET(r11)
|
||||||
|
#if (NIOS2_NUM_OF_SHADOW_REG_SETS > 0) || \
|
||||||
|
(defined NIOS2_EIC_PRESENT) || \
|
||||||
|
(defined NIOS2_MMU_PRESENT) || \
|
||||||
|
(defined NIOS2_MPU_PRESENT)
|
||||||
andi r3, r3, NIOS2_STATUS_PIE_MSK
|
andi r3, r3, NIOS2_STATUS_PIE_MSK
|
||||||
beq r3, zero, no_unlock
|
beq r3, zero, no_unlock
|
||||||
rdctl r3, status
|
rdctl r3, status
|
||||||
|
@ -110,7 +114,9 @@ BRANCH_LABEL(next_chosen)
|
||||||
wrctl status, r3
|
wrctl status, r3
|
||||||
|
|
||||||
BRANCH_LABEL(no_unlock)
|
BRANCH_LABEL(no_unlock)
|
||||||
|
#else
|
||||||
|
wrctl status, r3
|
||||||
|
#endif
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue