[PATCHv6 3/7] wire up sys_time_change_notify() on x86

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexander Shishkin
Date: Thursday, November 11, 2010 - 12:29 pm

This patch adds a new syscall of the following form:

int sys_time_change_notify(int fd, unsigned int flags)

This syscall is used for registering an eventfd for system time
change notification.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: x86@kernel.org
CC: Christoph Hellwig <hch@lst.de>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Eric Paris <eparis@redhat.com>
CC: Russell King <rmk+kernel@arm.linux.org.uk>
CC: David Howells <dhowells@redhat.com>
CC: Jiri Slaby <jslaby@suse.cz>
CC: "David S. Miller" <davem@davemloft.net>
CC: linux-kernel@vger.kernel.org
---
 arch/x86/ia32/ia32entry.S          |    1 +
 arch/x86/include/asm/unistd_32.h   |    3 ++-
 arch/x86/include/asm/unistd_64.h   |    2 ++
 arch/x86/kernel/syscall_table_32.S |    1 +
 4 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 518bb99..6981bdc 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -851,4 +851,5 @@ ia32_sys_call_table:
 	.quad sys_fanotify_init
 	.quad sys32_fanotify_mark
 	.quad sys_prlimit64		/* 340 */
+	.quad sys_time_change_notify
 ia32_syscall_end:
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h
index b766a5e..17ac4f5 100644
--- a/arch/x86/include/asm/unistd_32.h
+++ b/arch/x86/include/asm/unistd_32.h
@@ -346,10 +346,11 @@
 #define __NR_fanotify_init	338
 #define __NR_fanotify_mark	339
 #define __NR_prlimit64		340
+#define __NR_time_change_notify	341
 
 #ifdef __KERNEL__
 
-#define NR_syscalls 341
+#define NR_syscalls 342
 
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h
index 363e9b8..3d745f9 100644
--- a/arch/x86/include/asm/unistd_64.h
+++ b/arch/x86/include/asm/unistd_64.h
@@ -669,6 +669,8 @@ __SYSCALL(__NR_fanotify_init, sys_fanotify_init)
 __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
 #define __NR_prlimit64				302
 __SYSCALL(__NR_prlimit64, sys_prlimit64)
+#define __NR_time_change_notify			303
+__SYSCALL(__NR_time_change_notify, sys_time_change_notify)
 
 #ifndef __NO_STUBS
 #define __ARCH_WANT_OLD_READDIR
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index b35786d..b1ae9d4 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -340,3 +340,4 @@ ENTRY(sys_call_table)
 	.long sys_fanotify_init
 	.long sys_fanotify_mark
 	.long sys_prlimit64		/* 340 */
+	.long sys_time_change_notify
-- 
1.7.2.1.45.gb66c2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Thu Nov 11, 12:29 pm)
[PATCHv6 1/7] notify userspace about time changes, Alexander Shishkin, (Thu Nov 11, 12:29 pm)
[PATCHv6 2/7] wire up sys_time_change_notify() on ARM, Alexander Shishkin, (Thu Nov 11, 12:29 pm)
[PATCHv6 3/7] wire up sys_time_change_notify() on x86, Alexander Shishkin, (Thu Nov 11, 12:29 pm)
[PATCHv6 4/7] wire up sys_time_change_notify() on ia64, Alexander Shishkin, (Thu Nov 11, 12:29 pm)
[PATCHv6 5/7] wire up sys_time_change_notify() on s390, Alexander Shishkin, (Thu Nov 11, 12:30 pm)
[PATCHv6 6/7] wire up sys_time_change_notify() on powerpc, Alexander Shishkin, (Thu Nov 11, 12:30 pm)
[PATCHv6 7/7] wire up sys_time_change_notify() on blackfin, Alexander Shishkin, (Thu Nov 11, 12:30 pm)
Re: [PATCHv6 0/7] system time changes notification, Valdis.Kletnieks, (Thu Nov 11, 1:28 pm)
Re: [PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Thu Nov 11, 1:51 pm)
Re: [PATCHv6 1/7] notify userspace about time changes, Arnd Bergmann, (Thu Nov 11, 1:55 pm)
Re: [PATCHv6 0/7] system time changes notification, Thomas Gleixner, (Thu Nov 11, 2:16 pm)
Re: [PATCHv6 0/7] system time changes notification, Kyle Moffett, (Thu Nov 11, 3:11 pm)
Re: [PATCHv6 0/7] system time changes notification, john stultz, (Thu Nov 11, 3:36 pm)
Re: [PATCHv6 0/7] system time changes notification, Thomas Gleixner, (Thu Nov 11, 3:50 pm)
Re: [PATCHv6 0/7] system time changes notification, Kyle Moffett, (Thu Nov 11, 4:19 pm)
Re: [PATCHv6 0/7] system time changes notification, john stultz, (Thu Nov 11, 4:41 pm)
Re: [PATCHv6 0/7] system time changes notification, john stultz, (Thu Nov 11, 4:45 pm)
Re: [PATCHv6 0/7] system time changes notification, Davide Libenzi, (Thu Nov 11, 7:35 pm)
Re: [PATCHv6 0/7] system time changes notification, Kay Sievers, (Fri Nov 12, 3:47 am)
Re: [PATCHv6 0/7] system time changes notification, Richard Cochran, (Fri Nov 12, 3:53 am)
Re: [PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Fri Nov 12, 5:30 am)
Re: [PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Wed Nov 17, 12:06 pm)
Re: [PATCHv6 0/7] system time changes notification, Davide Libenzi, (Wed Nov 17, 1:42 pm)
Re: [PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Wed Nov 17, 2:29 pm)
Re: [PATCHv6 0/7] system time changes notification, Kay Sievers, (Wed Nov 17, 2:34 pm)
Re: [PATCHv6 0/7] system time changes notification, Thomas Gleixner, (Wed Nov 17, 2:46 pm)
Re: [PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Thu Nov 18, 2:49 am)
Re: [PATCHv6 0/7] system time changes notification, Artem Bityutskiy, (Thu Nov 18, 6:08 am)
Re: [PATCHv6 0/7] system time changes notification, Alexander Shishkin, (Thu Nov 18, 8:59 am)