51
51
52
52
#define AA (__x ) ((unsigned long)(__x))
53
53
54
-
55
- COMPAT_SYSCALL_DEFINE3 (ia32_truncate64 , const char __user * , filename ,
56
- unsigned long , offset_low , unsigned long , offset_high )
54
+ SYSCALL_DEFINE3 (ia32_truncate64 , const char __user * , filename ,
55
+ unsigned long , offset_low , unsigned long , offset_high )
57
56
{
58
57
return ksys_truncate (filename ,
59
58
((loff_t ) offset_high << 32 ) | offset_low );
60
59
}
61
60
62
- COMPAT_SYSCALL_DEFINE3 (ia32_ftruncate64 , unsigned int , fd ,
63
- unsigned long , offset_low , unsigned long , offset_high )
61
+ SYSCALL_DEFINE3 (ia32_ftruncate64 , unsigned int , fd ,
62
+ unsigned long , offset_low , unsigned long , offset_high )
64
63
{
65
64
return ksys_ftruncate (fd , ((loff_t ) offset_high << 32 ) | offset_low );
66
65
}
67
66
67
+ /* warning: next two assume little endian */
68
+ SYSCALL_DEFINE5 (ia32_pread64 , unsigned int , fd , char __user * , ubuf ,
69
+ u32 , count , u32 , poslo , u32 , poshi )
70
+ {
71
+ return ksys_pread64 (fd , ubuf , count ,
72
+ ((loff_t )AA (poshi ) << 32 ) | AA (poslo ));
73
+ }
74
+
75
+ SYSCALL_DEFINE5 (ia32_pwrite64 , unsigned int , fd , const char __user * , ubuf ,
76
+ u32 , count , u32 , poslo , u32 , poshi )
77
+ {
78
+ return ksys_pwrite64 (fd , ubuf , count ,
79
+ ((loff_t )AA (poshi ) << 32 ) | AA (poslo ));
80
+ }
81
+
82
+
83
+ /*
84
+ * Some system calls that need sign extended arguments. This could be
85
+ * done by a generic wrapper.
86
+ */
87
+ SYSCALL_DEFINE6 (ia32_fadvise64_64 , int , fd , __u32 , offset_low ,
88
+ __u32 , offset_high , __u32 , len_low , __u32 , len_high ,
89
+ int , advice )
90
+ {
91
+ return ksys_fadvise64_64 (fd ,
92
+ (((u64 )offset_high )<<32 ) | offset_low ,
93
+ (((u64 )len_high )<<32 ) | len_low ,
94
+ advice );
95
+ }
96
+
97
+ SYSCALL_DEFINE4 (ia32_readahead , int , fd , unsigned int , off_lo ,
98
+ unsigned int , off_hi , size_t , count )
99
+ {
100
+ return ksys_readahead (fd , ((u64 )off_hi << 32 ) | off_lo , count );
101
+ }
102
+
103
+ SYSCALL_DEFINE6 (ia32_sync_file_range , int , fd , unsigned int , off_low ,
104
+ unsigned int , off_hi , unsigned int , n_low ,
105
+ unsigned int , n_hi , int , flags )
106
+ {
107
+ return ksys_sync_file_range (fd ,
108
+ ((u64 )off_hi << 32 ) | off_low ,
109
+ ((u64 )n_hi << 32 ) | n_low , flags );
110
+ }
111
+
112
+ SYSCALL_DEFINE5 (ia32_fadvise64 , int , fd , unsigned int , offset_lo ,
113
+ unsigned int , offset_hi , size_t , len , int , advice )
114
+ {
115
+ return ksys_fadvise64_64 (fd , ((u64 )offset_hi << 32 ) | offset_lo ,
116
+ len , advice );
117
+ }
118
+
119
+ SYSCALL_DEFINE6 (ia32_fallocate , int , fd , int , mode ,
120
+ unsigned int , offset_lo , unsigned int , offset_hi ,
121
+ unsigned int , len_lo , unsigned int , len_hi )
122
+ {
123
+ return ksys_fallocate (fd , mode , ((u64 )offset_hi << 32 ) | offset_lo ,
124
+ ((u64 )len_hi << 32 ) | len_lo );
125
+ }
126
+
127
+ #ifdef CONFIG_IA32_EMULATION
68
128
/*
69
129
* Another set for IA32/LFS -- x86_64 struct stat is different due to
70
130
* support for 64bit inode numbers.
@@ -170,66 +230,6 @@ COMPAT_SYSCALL_DEFINE1(ia32_mmap, struct mmap_arg_struct32 __user *, arg)
170
230
a .offset >>PAGE_SHIFT );
171
231
}
172
232
173
- /* warning: next two assume little endian */
174
- COMPAT_SYSCALL_DEFINE5 (ia32_pread64 , unsigned int , fd , char __user * , ubuf ,
175
- u32 , count , u32 , poslo , u32 , poshi )
176
- {
177
- return ksys_pread64 (fd , ubuf , count ,
178
- ((loff_t )AA (poshi ) << 32 ) | AA (poslo ));
179
- }
180
-
181
- COMPAT_SYSCALL_DEFINE5 (ia32_pwrite64 , unsigned int , fd , const char __user * , ubuf ,
182
- u32 , count , u32 , poslo , u32 , poshi )
183
- {
184
- return ksys_pwrite64 (fd , ubuf , count ,
185
- ((loff_t )AA (poshi ) << 32 ) | AA (poslo ));
186
- }
187
-
188
-
189
- /*
190
- * Some system calls that need sign extended arguments. This could be
191
- * done by a generic wrapper.
192
- */
193
- COMPAT_SYSCALL_DEFINE6 (ia32_fadvise64_64 , int , fd , __u32 , offset_low ,
194
- __u32 , offset_high , __u32 , len_low , __u32 , len_high ,
195
- int , advice )
196
- {
197
- return ksys_fadvise64_64 (fd ,
198
- (((u64 )offset_high )<<32 ) | offset_low ,
199
- (((u64 )len_high )<<32 ) | len_low ,
200
- advice );
201
- }
202
-
203
- COMPAT_SYSCALL_DEFINE4 (ia32_readahead , int , fd , unsigned int , off_lo ,
204
- unsigned int , off_hi , size_t , count )
205
- {
206
- return ksys_readahead (fd , ((u64 )off_hi << 32 ) | off_lo , count );
207
- }
208
-
209
- COMPAT_SYSCALL_DEFINE6 (ia32_sync_file_range , int , fd , unsigned int , off_low ,
210
- unsigned int , off_hi , unsigned int , n_low ,
211
- unsigned int , n_hi , int , flags )
212
- {
213
- return ksys_sync_file_range (fd ,
214
- ((u64 )off_hi << 32 ) | off_low ,
215
- ((u64 )n_hi << 32 ) | n_low , flags );
216
- }
217
-
218
- COMPAT_SYSCALL_DEFINE5 (ia32_fadvise64 , int , fd , unsigned int , offset_lo ,
219
- unsigned int , offset_hi , size_t , len , int , advice )
220
- {
221
- return ksys_fadvise64_64 (fd , ((u64 )offset_hi << 32 ) | offset_lo ,
222
- len , advice );
223
- }
224
-
225
- COMPAT_SYSCALL_DEFINE6 (ia32_fallocate , int , fd , int , mode ,
226
- unsigned int , offset_lo , unsigned int , offset_hi ,
227
- unsigned int , len_lo , unsigned int , len_hi )
228
- {
229
- return ksys_fallocate (fd , mode , ((u64 )offset_hi << 32 ) | offset_lo ,
230
- ((u64 )len_hi << 32 ) | len_lo );
231
- }
232
-
233
233
/*
234
234
* The 32-bit clone ABI is CONFIG_CLONE_BACKWARDS
235
235
*/
@@ -252,3 +252,4 @@ COMPAT_SYSCALL_DEFINE5(ia32_clone, unsigned long, clone_flags,
252
252
253
253
return _do_fork (& args );
254
254
}
255
+ #endif /* CONFIG_IA32_EMULATION */
0 commit comments