]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arc: interrupts - fix mask setup
authorIgor Guryanov <guryanov@synopsys.com>
Wed, 24 Dec 2014 13:31:26 +0000 (16:31 +0300)
committerAlexey Brodkin <abrodkin@synopsys.com>
Thu, 15 Jan 2015 19:38:42 +0000 (22:38 +0300)
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>
arch/arc/cpu/arc700/interrupts.c

index 7dde74b4385653c75c82a88a34288ef92ee17f14..d7cab3bb409d4727123eba4afb23b9ecb93fb0cf 100644 (file)
@@ -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 */