1*bb898558SAl Viro #ifndef ASM_X86__VSYSCALL_H 2*bb898558SAl Viro #define ASM_X86__VSYSCALL_H 3*bb898558SAl Viro 4*bb898558SAl Viro enum vsyscall_num { 5*bb898558SAl Viro __NR_vgettimeofday, 6*bb898558SAl Viro __NR_vtime, 7*bb898558SAl Viro __NR_vgetcpu, 8*bb898558SAl Viro }; 9*bb898558SAl Viro 10*bb898558SAl Viro #define VSYSCALL_START (-10UL << 20) 11*bb898558SAl Viro #define VSYSCALL_SIZE 1024 12*bb898558SAl Viro #define VSYSCALL_END (-2UL << 20) 13*bb898558SAl Viro #define VSYSCALL_MAPPED_PAGES 1 14*bb898558SAl Viro #define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) 15*bb898558SAl Viro 16*bb898558SAl Viro #ifdef __KERNEL__ 17*bb898558SAl Viro #include <linux/seqlock.h> 18*bb898558SAl Viro 19*bb898558SAl Viro #define __section_vgetcpu_mode __attribute__ ((unused, __section__ (".vgetcpu_mode"), aligned(16))) 20*bb898558SAl Viro #define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16))) 21*bb898558SAl Viro 22*bb898558SAl Viro /* Definitions for CONFIG_GENERIC_TIME definitions */ 23*bb898558SAl Viro #define __section_vsyscall_gtod_data __attribute__ \ 24*bb898558SAl Viro ((unused, __section__ (".vsyscall_gtod_data"),aligned(16))) 25*bb898558SAl Viro #define __section_vsyscall_clock __attribute__ \ 26*bb898558SAl Viro ((unused, __section__ (".vsyscall_clock"),aligned(16))) 27*bb898558SAl Viro #define __vsyscall_fn \ 28*bb898558SAl Viro __attribute__ ((unused, __section__(".vsyscall_fn"))) notrace 29*bb898558SAl Viro 30*bb898558SAl Viro #define VGETCPU_RDTSCP 1 31*bb898558SAl Viro #define VGETCPU_LSL 2 32*bb898558SAl Viro 33*bb898558SAl Viro extern int __vgetcpu_mode; 34*bb898558SAl Viro extern volatile unsigned long __jiffies; 35*bb898558SAl Viro 36*bb898558SAl Viro /* kernel space (writeable) */ 37*bb898558SAl Viro extern int vgetcpu_mode; 38*bb898558SAl Viro extern struct timezone sys_tz; 39*bb898558SAl Viro 40*bb898558SAl Viro extern void map_vsyscall(void); 41*bb898558SAl Viro 42*bb898558SAl Viro #endif /* __KERNEL__ */ 43*bb898558SAl Viro 44*bb898558SAl Viro #endif /* ASM_X86__VSYSCALL_H */ 45