On 03/05/2015 04:24 PM, Jiri Jaburek wrote:
> The ifdef'd part is identical to how arm/ppc handles big endianness,
> however the syscall number and argument order are different.
> 
> Signed-off-by: Jiri Jaburek <jjabu...@redhat.com>
> ---
>  testcases/kernel/syscalls/sync_file_range/sync_file_range01.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c 
> b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
> index 3d26f8f..3eac52d 100644
> --- a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
> +++ b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
> @@ -196,7 +196,7 @@ void setup(void)
>  static inline long syncfilerange(int fd, off64_t offset, off64_t nbytes,
>                                unsigned int flags)
>  {
> -
> +/* arm and powerpc */
>  #if (defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__))
>  #if (__WORDSIZE == 32)
>  #if __BYTE_ORDER == __BIG_ENDIAN
> @@ -210,10 +210,16 @@ static inline long syncfilerange(int fd, off64_t 
> offset, off64_t nbytes,
>  #else
>       return ltp_syscall(__NR_sync_file_range2, fd, flags, offset, nbytes);
>  #endif
> +
> +/* s390 */
> +#elif (defined(__s390__) || defined(__s390x__)) && __WORDSIZE == 32
> +       return ltp_syscall(__NR_sync_file_range, fd, (int)(offset >> 32),
> +               (int)offset, (int)(nbytes >> 32), (int)nbytes, flags);
> +

Ugh, I somehow managed to leave spaces instead of tabs here, will post
v2 with correct formatting, sorry.

> +/* other */
>  #else
>       return ltp_syscall(__NR_sync_file_range, fd, offset, nbytes, flags);
>  #endif
> -
>  }
>  
>  
> /******************************************************************************/
> 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to