summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-09-30 13:27:25 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-22 12:06:46 +0200
commitc24d81a7f283b9021971451cbe95b1db067a07eb (patch)
tree337b04ff316f418bca433322892d62c3233fd4d3
parentb19ad40595587a045ca703e32aa1b9f4acd666bd (diff)
downloadlinux-stable-c24d81a7f283b9021971451cbe95b1db067a07eb.tar.gz
linux-stable-c24d81a7f283b9021971451cbe95b1db067a07eb.tar.bz2
linux-stable-c24d81a7f283b9021971451cbe95b1db067a07eb.zip
ARCv2: fix local_save_flags
commit cd5d38b052384daa2893e9a1d94900d5a20ed4b5 upstream. Commit d9676fa152c83b ("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: d9676fa152c83b ("ARCv2: Enable LOCKDEP") Cc: Evgeny Voevodin <evgeny.voevodin@intel.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/arc/include/asm/irqflags-arcv2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/include/asm/irqflags-arcv2.h b/arch/arc/include/asm/irqflags-arcv2.h
index d1ec7f6b31e0..e880dfa3fcd3 100644
--- a/arch/arc/include/asm/irqflags-arcv2.h
+++ b/arch/arc/include/asm/irqflags-arcv2.h
@@ -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;
}