diff options
author | Igor Guryanov <guryanov@synopsys.com> | 2014-12-24 16:31:26 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2015-01-15 22:38:42 +0300 |
commit | c0e9535e1d582ec089c743b705752392fcf3d9a2 (patch) | |
tree | f9f4fb4500bf09c68456d9debc932dfb35d9af8a | |
parent | e47d733867b2da336754718f7eaa7f51655dbefa (diff) | |
download | talos-obmc-uboot-c0e9535e1d582ec089c743b705752392fcf3d9a2.tar.gz talos-obmc-uboot-c0e9535e1d582ec089c743b705752392fcf3d9a2.zip |
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: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Igor Guryanov <guryanov@synopsys.com>
-rw-r--r-- | arch/arc/cpu/arc700/interrupts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/cpu/arc700/interrupts.c b/arch/arc/cpu/arc700/interrupts.c index 7dde74b438..d7cab3bb40 100644 --- a/arch/arc/cpu/arc700/interrupts.c +++ b/arch/arc/cpu/arc700/interrupts.c @@ -23,7 +23,7 @@ int interrupt_init(void) int disable_interrupts(void) { 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); /* STATUS32 register is updated indirectly with "FLAG" instruction */ |