|
@@ -135,9 +135,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
|
|
@@ -148,8 +148,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
|