Commit a64bf26a authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Change 64bit epoll ABI for AMD64

As discussed earlier. The 64bit epoll ABI on AMD64 is changed to
match 32bit. This way we avoid emulation overhead.

To catch old binaries I allocate new syscall slots.
parent 78b9519b
...@@ -486,10 +486,10 @@ __SYSCALL(__NR_get_thread_area, sys_ni_syscall) /* use arch_prctl */ ...@@ -486,10 +486,10 @@ __SYSCALL(__NR_get_thread_area, sys_ni_syscall) /* use arch_prctl */
__SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie) __SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie)
#define __NR_epoll_create 213 #define __NR_epoll_create 213
__SYSCALL(__NR_epoll_create, sys_epoll_create) __SYSCALL(__NR_epoll_create, sys_epoll_create)
#define __NR_epoll_ctl 214 #define __NR_epoll_ctl_old 214
__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) __SYSCALL(__NR_epoll_ctl_old, sys_ni_syscall)
#define __NR_epoll_wait 215 #define __NR_epoll_wait_old 215
__SYSCALL(__NR_epoll_wait, sys_epoll_wait) __SYSCALL(__NR_epoll_wait_old, sys_ni_syscall)
#define __NR_remap_file_pages 216 #define __NR_remap_file_pages 216
__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
#define __NR_getdents64 217 #define __NR_getdents64 217
...@@ -522,8 +522,12 @@ __SYSCALL(__NR_clock_getres, sys_clock_getres) ...@@ -522,8 +522,12 @@ __SYSCALL(__NR_clock_getres, sys_clock_getres)
__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep) __SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep)
#define __NR_exit_group 231 #define __NR_exit_group 231
__SYSCALL(__NR_exit_group, sys_exit_group) __SYSCALL(__NR_exit_group, sys_exit_group)
#define __NR_epoll_wait 232
__SYSCALL(__NR_epoll_wait, sys_epoll_wait)
#define __NR_epoll_ctl 233
__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
#define __NR_syscall_max __NR_exit_group #define __NR_syscall_max __NR_epoll_ctl
#ifndef __NO_STUBS #ifndef __NO_STUBS
/* user-visible error numbers are in the range -1 - -4095 */ /* user-visible error numbers are in the range -1 - -4095 */
......
...@@ -23,10 +23,20 @@ ...@@ -23,10 +23,20 @@
/* Set the Edge Triggered behaviour for the target file descriptor */ /* Set the Edge Triggered behaviour for the target file descriptor */
#define EPOLLET (1 << 31) #define EPOLLET (1 << 31)
/*
* On x86-64 make the 64bit structure have the same alignment as the
* 32bit structure. This makes 32bit emulation easier.
*/
#ifdef __x86_64__
#define EPOLL_PACKED __attribute__((packed))
#else
#define EPOLL_PACKED
#endif
struct epoll_event { struct epoll_event {
__u32 events; __u32 events;
__u64 data; __u64 data;
}; } EPOLL_PACKED;
#ifdef __KERNEL__ #ifdef __KERNEL__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment