public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "lina.zhao" <lina.zhao@windriver.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [patch] sync_file_range01 change for arm
Date: Mon, 18 Oct 2010 10:13:04 +0800	[thread overview]
Message-ID: <4CBBAD30.6070403@windriver.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

Hi,

arm use __NR_sync_file_range2 not __NR_sync_file_range for system call.
the test casecheck __NR_sync_file_range for arm,
So test react "System doesn't support" for arm.
but actually arm use __NR_sync_file_range2 to support the system call.

powerpc is big endian, arm is small endian, so the parameter dealing is 
different.

Thanks,
Lina

[-- Attachment #2: sync_file_range.patch --]
[-- Type: text/x-diff, Size: 1658 bytes --]

From c4c30c43eba9c7af025496f23bb5936f0e9f0b76 Mon Sep 17 00:00:00 2001
From: Lina Zhao <lina.zhao@windriver.com>
Date: Thu, 14 Oct 2010 16:21:12 +0800
Subject: [PATCH] arm use __NR_sync_file_range2 not __NR_sync_file_range for system call.

So test react "System doesn't support" for arm.
but actually arm use __NR_sync_file_range2 to support the system call.

signed-off-by: Lina Zhao <lina.zhao@windriver.com>
---
 .../syscalls/sync_file_range/sync_file_range01.c   |    8 +++++++-
 1 files changed, 7 insertions(+), 1 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 53619b5..be82de8 100644
--- a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
+++ b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
@@ -96,7 +96,7 @@
 #include "usctest.h"
 #include "linux_syscall_numbers.h"
 
-#if defined(__powerpc__) || defined(__powerpc64__)
+#if defined(__powerpc__) || defined(__powerpc64__) || defined(__arm__)
 #ifndef __NR_sync_file_range2
 #define __NR_sync_file_range2 -1	//DUMMY VALUE
 int arch_support = 0;		//Architecure is not supported
@@ -246,6 +246,12 @@ static inline long syncfilerange(int fd, off64_t offset, off64_t nbytes,
 #elif (defined(__powerpc64__) || defined(__powerpc__)) && (__WORDSIZE==64)
 
 	return syscall(__NR_sync_file_range2, fd, flags, offset, nbytes);
+
+#elif (defined(__arm__))
+
+	return syscall(__NR_sync_file_range2, fd, flags,(int)offset,
+			(int)(offset >> 32),(int)nbytes,(int)(nbytes >> 32));
+
 #else
 
 	return syscall(__NR_sync_file_range, fd, offset, nbytes, flags);
-- 
1.6.3.1


[-- Attachment #3: Type: text/plain, Size: 369 bytes --]

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2010-10-18  2:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18  2:13 lina.zhao [this message]
2010-10-18 10:08 ` [LTP] [patch] sync_file_range01 change for arm Garrett Cooper
2010-10-19  5:12   ` lina.zhao
2010-10-19  6:36     ` Garrett Cooper
2010-10-22 12:47   ` Cyril Hrubis

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=4CBBAD30.6070403@windriver.com \
    --to=lina.zhao@windriver.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