summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/vsyscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/vsyscall.h')
-rw-r--r--arch/x86/include/asm/vsyscall.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h
index d55597351f6a..bb710cb0cdc1 100644
--- a/arch/x86/include/asm/vsyscall.h
+++ b/arch/x86/include/asm/vsyscall.h
@@ -31,6 +31,18 @@ extern struct timezone sys_tz;
extern void map_vsyscall(void);
+/* Emulation */
+
+static inline bool is_vsyscall_entry(unsigned long addr)
+{
+ return (addr & ~0xC00UL) == VSYSCALL_START;
+}
+
+static inline int vsyscall_entry_nr(unsigned long addr)
+{
+ return (addr & 0xC00UL) >> 10;
+}
+
#endif /* __KERNEL__ */
#endif /* _ASM_X86_VSYSCALL_H */
OpenPOWER on IntegriCloud