aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2007-03-07 23:41:21 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-08 10:38:22 -0500
commitf6dfb4fd7dd94429ef1d5233688aaed2a63f856b (patch)
tree81c29bfad51e187830ca059855aa285e350c9481 /include/linux/compat.h
parentb40df5743ee8aed8674edbbb77b8fd3c8c7a747f (diff)
[PATCH] Add epoll compat_ code to fs/compat.c
IA64 and ARM-OABI are currently using their own version of epoll compat_ code. An architecture needs epoll_event translation if alignof(u64) in 32 bit mode is different from alignof(u64) in 64 bit mode. If an architecture needs epoll_event translation, it must define struct compat_epoll_event in asm/compat.h and set CONFIG_HAVE_COMPAT_EPOLL_EVENT and use compat_sys_epoll_ctl and compat_sys_epoll_wait. All 64 bit architecture should use compat_sys_epoll_pwait. [sfr: restructure and move to fs/compat.c, remove MIPS version of compat_sys_epoll_pwait, use __put_user_unaligned] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 80b17f440ec1..ccd863dd77fa 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -234,5 +234,24 @@ asmlinkage long compat_sys_migrate_pages(compat_pid_t pid,
234 compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, 234 compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes,
235 const compat_ulong_t __user *new_nodes); 235 const compat_ulong_t __user *new_nodes);
236 236
237/*
238 * epoll (fs/eventpoll.c) compat bits follow ...
239 */
240#ifndef CONFIG_HAS_COMPAT_EPOLL_EVENT
241struct epoll_event;
242#define compat_epoll_event epoll_event
243#else
244asmlinkage long compat_sys_epoll_ctl(int epfd, int op, int fd,
245 struct compat_epoll_event __user *event);
246asmlinkage long compat_sys_epoll_wait(int epfd,
247 struct compat_epoll_event __user *events,
248 int maxevents, int timeout);
249#endif
250asmlinkage long compat_sys_epoll_pwait(int epfd,
251 struct compat_epoll_event __user *events,
252 int maxevents, int timeout,
253 const compat_sigset_t __user *sigmask,
254 compat_size_t sigsetsize);
255
237#endif /* CONFIG_COMPAT */ 256#endif /* CONFIG_COMPAT */
238#endif /* _LINUX_COMPAT_H */ 257#endif /* _LINUX_COMPAT_H */