]> err.no Git - linux-2.6/blobdiff - include/asm-x86_64/unwind.h
[PATCH] dm: ioctl: add noflush suspend
[linux-2.6] / include / asm-x86_64 / unwind.h
index b8fa5cb7ff88e2f51efea28db8751bec6ecd989c..2f6349e4871765aaee69e23275c0755e4a9d98da 100644 (file)
@@ -87,20 +87,16 @@ extern int arch_unwind_init_running(struct unwind_frame_info *,
 
 static inline int arch_unw_user_mode(const struct unwind_frame_info *info)
 {
-#if 0 /* This can only work when selector register saves/restores
-         are properly annotated (and tracked in UNW_REGISTER_INFO). */
-       return user_mode(&info->regs);
-#else
-       return (long)info->regs.rip >= 0
+       return user_mode(&info->regs)
+              || (long)info->regs.rip >= 0
               || (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END)
               || (long)info->regs.rsp >= 0;
-#endif
 }
 
 #else
 
-#define UNW_PC(frame) ((void)(frame), 0)
-#define UNW_SP(frame) ((void)(frame), 0)
+#define UNW_PC(frame) ((void)(frame), 0UL)
+#define UNW_SP(frame) ((void)(frame), 0UL)
 
 static inline int arch_unw_user_mode(const void *info)
 {