Skip to content
Snippets Groups Projects
Commit c0e9535e authored by Igor Guryanov's avatar Igor Guryanov Committed by Alexey Brodkin
Browse files

arc: interrupts - fix mask setup


To disable interrupts we need to reset corresponding flags in STATUS32
register. For this we need to OR flags for interrupts level1 and level2
and then AND with current value in STATUS32.

Before that implementation was incorrect.

Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: default avatarIgor Guryanov <guryanov@synopsys.com>
parent e47d7338
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ int interrupt_init(void) ...@@ -23,7 +23,7 @@ int interrupt_init(void)
int disable_interrupts(void) int disable_interrupts(void)
{ {
int status = read_aux_reg(ARC_AUX_STATUS32); int status = read_aux_reg(ARC_AUX_STATUS32);
int state = (status | E1_MASK | E2_MASK) ? 1 : 0; int state = (status & (E1_MASK | E2_MASK)) ? 1 : 0;
status &= ~(E1_MASK | E2_MASK); status &= ~(E1_MASK | E2_MASK);
/* STATUS32 register is updated indirectly with "FLAG" instruction */ /* STATUS32 register is updated indirectly with "FLAG" instruction */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment