Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
46836613
Commit
46836613
authored
Nov 23, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMPAT_SYSCALL_DEFINE: infrastructure
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
541880d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
arch/s390/include/asm/compat.h
arch/s390/include/asm/compat.h
+3
-0
include/linux/compat.h
include/linux/compat.h
+42
-0
No files found.
arch/s390/include/asm/compat.h
View file @
46836613
...
...
@@ -7,6 +7,9 @@
#include <linux/sched.h>
#include <linux/thread_info.h>
#define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p(typeof(0?(t)0:0ULL), u64))
#define __SC_DELOUSE(t,v) (t)(__TYPE_IS_PTR(t) ? ((v) & 0x7fffffff) : (v))
#define PSW32_MASK_PER 0x40000000UL
#define PSW32_MASK_DAT 0x04000000UL
#define PSW32_MASK_IO 0x02000000UL
...
...
include/linux/compat.h
View file @
46836613
...
...
@@ -23,6 +23,48 @@
#define COMPAT_USE_64BIT_TIME 0
#endif
#ifndef __SC_DELOUSE
#define __SC_DELOUSE(t,v) ((t)(unsigned long)(v))
#endif
#define __SC_CCAST1(t1, a1) __SC_DELOUSE(t1,a1)
#define __SC_CCAST2(t2, a2, ...) __SC_DELOUSE(t2,a2), __SC_CCAST1(__VA_ARGS__)
#define __SC_CCAST3(t3, a3, ...) __SC_DELOUSE(t3,a3), __SC_CCAST2(__VA_ARGS__)
#define __SC_CCAST4(t4, a4, ...) __SC_DELOUSE(t4,a4), __SC_CCAST3(__VA_ARGS__)
#define __SC_CCAST5(t5, a5, ...) __SC_DELOUSE(t5,a5), __SC_CCAST4(__VA_ARGS__)
#define __SC_CCAST6(t6, a6, ...) __SC_DELOUSE(t6,a6), __SC_CCAST5(__VA_ARGS__)
#define COMPAT_SYSCALL_DEFINE1(name, ...) \
COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINE2(name, ...) \
COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINE3(name, ...) \
COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINE4(name, ...) \
COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINE5(name, ...) \
COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINE6(name, ...) \
COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)); \
static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)); \
asmlinkage long compat_SyS##name(__SC_LONG##x(__VA_ARGS__)) \
{ \
return (long) C_SYSC##name(__SC_CCAST##x(__VA_ARGS__)); \
} \
SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \
static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__))
#else
/* CONFIG_HAVE_SYSCALL_WRAPPERS */
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__))
#endif
/* CONFIG_HAVE_SYSCALL_WRAPPERS */
#define compat_jiffies_to_clock_t(x) \
(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment