Commit 5055c677 authored by Deepa Dinamani's avatar Deepa Dinamani Committed by Arnd Bergmann

compat: Make compat helpers independent of CONFIG_COMPAT

Many of the compat time syscalls are also repurposed as 32 bit
native syscalls to provide backward compatibility while adding
new y2038 safe sycalls.
Enabling the helpers makes this possible.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 60cc43fc
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include <linux/types.h> #include <linux/types.h>
#ifdef CONFIG_COMPAT
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/param.h> /* for HZ */ #include <linux/param.h> /* for HZ */
#include <linux/sem.h> #include <linux/sem.h>
...@@ -20,9 +18,11 @@ ...@@ -20,9 +18,11 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/unistd.h> #include <linux/unistd.h>
#ifdef CONFIG_COMPAT
#include <asm/compat.h> #include <asm/compat.h>
#include <asm/siginfo.h> #include <asm/siginfo.h>
#include <asm/signal.h> #include <asm/signal.h>
#endif
#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
/* /*
...@@ -83,6 +83,8 @@ ...@@ -83,6 +83,8 @@
static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
#endif /* COMPAT_SYSCALL_DEFINEx */ #endif /* COMPAT_SYSCALL_DEFINEx */
#ifdef CONFIG_COMPAT
#ifndef compat_user_stack_pointer #ifndef compat_user_stack_pointer
#define compat_user_stack_pointer() current_user_stack_pointer() #define compat_user_stack_pointer() current_user_stack_pointer()
#endif #endif
...@@ -1016,7 +1018,9 @@ static inline struct compat_timeval ns_to_compat_timeval(s64 nsec) ...@@ -1016,7 +1018,9 @@ static inline struct compat_timeval ns_to_compat_timeval(s64 nsec)
#else /* !CONFIG_COMPAT */ #else /* !CONFIG_COMPAT */
#define is_compat_task() (0) #define is_compat_task() (0)
#ifndef in_compat_syscall
static inline bool in_compat_syscall(void) { return false; } static inline bool in_compat_syscall(void) { return false; }
#endif
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
......
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