diff -upN reference/arch/i386/kernel/vsyscall-int80.S current/arch/i386/kernel/vsyscall-int80.S --- reference/arch/i386/kernel/vsyscall-int80.S 2004-04-07 14:53:56.000000000 -0700 +++ current/arch/i386/kernel/vsyscall-int80.S 2004-04-29 10:39:28.000000000 -0700 @@ -1,3 +1,6 @@ +#include +#include +#include /* * Code for the vsyscall page. This version uses the old int $0x80 method. * @@ -12,8 +15,26 @@ .type __kernel_vsyscall,@function __kernel_vsyscall: .LSTART_vsyscall: +#ifdef CONFIG_VSYSCALL_GTOD + cmp $__NR_gettimeofday, %eax + je .Lvgettimeofday +#endif /* CONFIG_VSYSCALL_GTOD */ int $0x80 ret + +#ifdef CONFIG_VSYSCALL_GTOD +/* vsyscall-gettimeofday code */ +.Lvgettimeofday: + pushl %edx + pushl %ecx + pushl %ebx + call VSYSCALL_GTOD_START + popl %ebx + popl %ecx + popl %edx + ret +#endif /* CONFIG_VSYSCALL_GTOD */ + .LEND_vsyscall: .size __kernel_vsyscall,.-.LSTART_vsyscall .previous diff -upN reference/arch/i386/kernel/vsyscall-sysenter.S current/arch/i386/kernel/vsyscall-sysenter.S --- reference/arch/i386/kernel/vsyscall-sysenter.S 2004-04-29 10:39:15.000000000 -0700 +++ current/arch/i386/kernel/vsyscall-sysenter.S 2004-04-29 10:39:28.000000000 -0700 @@ -1,3 +1,6 @@ +#include +#include +#include /* * Code for the vsyscall page. This version uses the sysenter instruction. * @@ -12,6 +15,10 @@ .type __kernel_vsyscall,@function __kernel_vsyscall: .LSTART_vsyscall: +#ifdef CONFIG_VSYSCALL_GTOD + cmp $__NR_gettimeofday, %eax + je .Lvgettimeofday +#endif /* CONFIG_VSYSCALL_GTOD */ cmpl $192, %eax jne 1f int $0x80 @@ -41,6 +48,20 @@ SYSENTER_RETURN: pop %ecx .Lpop_ecx: ret + +#ifdef CONFIG_VSYSCALL_GTOD +/* vsyscall-gettimeofday code */ +.Lvgettimeofday: + pushl %edx + pushl %ecx + pushl %ebx + call VSYSCALL_GTOD_START + popl %ebx + popl %ecx + popl %edx + ret +#endif /* CONFIG_VSYSCALL_GTOD */ + .LEND_vsyscall: .size __kernel_vsyscall,.-.LSTART_vsyscall .previous