summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/ptrace.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-11-14 10:01:49 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-11-14 10:01:49 +0100
commitd4bfeabe9ff7967f4b8c24aabf2de1ce3a909cd9 (patch)
tree6b419b8497c7d57ddec20a3558697ef36ea37b11 /arch/x86/include/asm/ptrace.h
parent8a7a8e1eab929eb3a5b735a788a23b9731139046 (diff)
parentb29c6ef7bb1257853c1e31616d84f55e561cf631 (diff)
Merge branch 'linus' into timers/urgent
Get upstream changes so dependent patches can be applied.
Diffstat (limited to 'arch/x86/include/asm/ptrace.h')
-rw-r--r--arch/x86/include/asm/ptrace.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index c0e3c45cf6ab..14131dd06b29 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -136,9 +136,9 @@ static inline int v8086_mode(struct pt_regs *regs)
#endif
}
-#ifdef CONFIG_X86_64
static inline bool user_64bit_mode(struct pt_regs *regs)
{
+#ifdef CONFIG_X86_64
#ifndef CONFIG_PARAVIRT
/*
* On non-paravirt systems, this is the only long mode CPL 3
@@ -149,8 +149,12 @@ static inline bool user_64bit_mode(struct pt_regs *regs)
/* Headers are too twisted for this to go in paravirt.h. */
return regs->cs == __USER_CS || regs->cs == pv_info.extra_user_64bit_cs;
#endif
+#else /* !CONFIG_X86_64 */
+ return false;
+#endif
}
+#ifdef CONFIG_X86_64
#define current_user_stack_pointer() current_pt_regs()->sp
#define compat_user_stack_pointer() current_pt_regs()->sp
#endif