Skip to content

Commit

Permalink
ARCv2: fix local_save_flags
Browse files Browse the repository at this point in the history
Commit d9676fa ("ARCv2: Enable LOCKDEP"), changed
local_save_flags() to not return raw STATUS32 but encoded in the form
such that it could be fed directly to CLRI/SETI instructions.
However the STATUS32.E[] was not captured correctly as it corresponds to
bits [4:1] in the register and not [3:0]

Fixes: d9676fa ("ARCv2: Enable LOCKDEP")
Cc: Evgeny Voevodin <evgeny.voevodin@intel.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Sep 30, 2016
1 parent 3528f84 commit cd5d38b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/irqflags-arcv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static inline long arch_local_save_flags(void)
*/
temp = (1 << 5) |
((!!(temp & STATUS_IE_MASK)) << CLRI_STATUS_IE_BIT) |
(temp & CLRI_STATUS_E_MASK);
((temp >> 1) & CLRI_STATUS_E_MASK);
return temp;
}

Expand Down

0 comments on commit cd5d38b

Please sign in to comment.