From: Jiri Jaburek <jjaburek@redhat.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] syscalls/sync_file_range01: support 31-bit s390
Date: Fri, 06 Mar 2015 17:21:14 +0100 [thread overview]
Message-ID: <54F9D3FA.6040503@redhat.com> (raw)
In-Reply-To: <1425569098-19519-1-git-send-email-jjaburek@redhat.com>
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 <jjaburek@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
next prev parent reply other threads:[~2015-03-06 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 15:24 [LTP] [PATCH] syscalls/sync_file_range01: support 31-bit s390 Jiri Jaburek
2015-03-06 16:21 ` Jiri Jaburek [this message]
2015-03-06 16:39 ` [LTP] [PATCHv2] " Jiri Jaburek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F9D3FA.6040503@redhat.com \
--to=jjaburek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox