summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-02-21 15:43:11 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-02-21 15:43:11 +0400
commita2e6177c931793b4ffb30e722fce6fc7aaff9fa5 (patch)
tree0895af3e52ec595b2834f8e2ac286201adaa068c /arch/arm/include
parentb28a960c42fcd9cfc987441fa6d1c1a471f0f9ed (diff)
parentf0d7515372ff0ea53fd66099533d3c8e0464cbbf (diff)
downloadlinux-a2e6177c931793b4ffb30e722fce6fc7aaff9fa5.tar.xz
Merge tag 'v7m-next' of git://git.pengutronix.de/git/ukl/linux into devel-testing
Two bugfixes and trivial suspend support for v7m. Given that the bugfixes are only relevant when an oops is in progress and admitting that there are not so many v7m users I don't see an urge to include the bugfixes in 3.14 and so target 3.15-rc1 for this pull request.
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/ptrace.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
index 04c99f36ff7f..627a03ebb987 100644
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
@@ -27,9 +27,13 @@ struct pt_regs {
#define thumb_mode(regs) (0)
#endif
+#ifndef CONFIG_CPU_V7M
#define isa_mode(regs) \
- ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \
- (((regs)->ARM_cpsr & PSR_T_BIT) >> 5))
+ ((((regs)->ARM_cpsr & PSR_J_BIT) >> (__ffs(PSR_J_BIT) - 1)) | \
+ (((regs)->ARM_cpsr & PSR_T_BIT) >> (__ffs(PSR_T_BIT))))
+#else
+#define isa_mode(regs) 1 /* Thumb */
+#endif
#define processor_mode(regs) \
((regs)->ARM_cpsr & MODE_MASK)