qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Add readahead syscall
@ 2008-10-08 18:54 Kirill A. Shutemov
  2008-10-08 18:54 ` [Qemu-devel] [PATCH] Fix getdents* syscalls Kirill A. Shutemov
  2008-10-13 21:09 ` [Qemu-devel] [PATCH] Add readahead syscall Aurelien Jarno
  0 siblings, 2 replies; 22+ messages in thread
From: Kirill A. Shutemov @ 2008-10-08 18:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kirill A. Shutemov

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
---
 linux-user/syscall.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f1f050e..dc7e561 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5761,7 +5761,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
 #ifdef TARGET_NR_readahead
     case TARGET_NR_readahead:
-        goto unimplemented;
+#if TARGET_ABI_BITS == 32
+#ifdef TARGET_ARM
+        if (((CPUARMState *)cpu_env)->eabi)
+        {
+            arg2 = arg3;
+            arg3 = arg4;
+            arg4 = arg5;
+        }
+#endif
+        ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4));
+#else
+        ret = get_errno(readahead(arg1, arg2, arg3));
+#endif
+        break;
 #endif
 #ifdef TARGET_NR_setxattr
     case TARGET_NR_setxattr:
-- 
1.5.6.5.GIT

^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH] Add readahead syscall
@ 2008-10-13 10:10 Kirill A. Shutemov
  0 siblings, 0 replies; 22+ messages in thread
From: Kirill A. Shutemov @ 2008-10-13 10:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kirill A. Shutemov, Paul Brook

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
---
 linux-user/syscall.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f1f050e..dc7e561 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5761,7 +5761,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
 #ifdef TARGET_NR_readahead
     case TARGET_NR_readahead:
-        goto unimplemented;
+#if TARGET_ABI_BITS == 32
+#ifdef TARGET_ARM
+        if (((CPUARMState *)cpu_env)->eabi)
+        {
+            arg2 = arg3;
+            arg3 = arg4;
+            arg4 = arg5;
+        }
+#endif
+        ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4));
+#else
+        ret = get_errno(readahead(arg1, arg2, arg3));
+#endif
+        break;
 #endif
 #ifdef TARGET_NR_setxattr
     case TARGET_NR_setxattr:
-- 
1.5.6.5.GIT

^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH] Add fadvise64 stubs
@ 2008-10-01 13:56 Kirill A. Shutemov
  2008-10-01 13:56 ` [Qemu-devel] [PATCH] Add mincore syscall Kirill A. Shutemov
  0 siblings, 1 reply; 22+ messages in thread
From: Kirill A. Shutemov @ 2008-10-01 13:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kirill A. Shutemov, Riku Voipio

Since these are only hints, we happily fake them for now
to make applications not barf on ENOSYS.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
---
 linux-user/syscall.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 40c0ed8..4695416 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5578,6 +5578,27 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
     case TARGET_NR_mincore:
         goto unimplemented;
 #endif
+#ifdef TARGET_NR_arm_fadvise64_64
+    case TARGET_NR_arm_fadvise64_64:
+        {
+            /*
+             * arm_fadvise64_64 looks like fadvise64_64 but
+             * with different argument order
+             */
+            abi_long temp;
+            temp = arg3;
+            arg3 = arg4;
+            arg4 = temp;
+        }
+#endif
+#if defined(TARGET_NR_fadvise64_64) || defined(TARGET_NR_arm_fadvise64_64)
+#ifdef TARGET_NR_fadvise64_64
+    case TARGET_NR_fadvise64_64:
+#endif
+        /* This is a hint, so ignoring and returning success is ok.  */
+        ret = get_errno(0);
+        break;
+#endif
 #ifdef TARGET_NR_madvise
     case TARGET_NR_madvise:
         /* A straight passthrough may not be safe because qemu sometimes
-- 
1.5.6.5.GIT

^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH] Add readahead syscall
@ 2008-09-19 13:33 Riku Voipio
  2008-09-19 14:16 ` Kirill A. Shutemov
  2008-09-21 13:03 ` Paul Brook
  0 siblings, 2 replies; 22+ messages in thread
From: Riku Voipio @ 2008-09-19 13:33 UTC (permalink / raw)
  To: qemu-devel


Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/syscall.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index cb75c94..6b38d8a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5738,7 +5738,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
 #ifdef TARGET_NR_readahead
     case TARGET_NR_readahead:
-        goto unimplemented;
+        ret = get_errno(readahead(arg1, arg2, arg3));
+        break;
 #endif
 #ifdef TARGET_NR_setxattr
     case TARGET_NR_setxattr:
-- 
1.5.6.5


-- 
"rm -rf" only sounds scary if you don't have backups

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2008-10-13 21:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08 18:54 [Qemu-devel] [PATCH] Add readahead syscall Kirill A. Shutemov
2008-10-08 18:54 ` [Qemu-devel] [PATCH] Fix getdents* syscalls Kirill A. Shutemov
2008-10-08 18:54   ` [Qemu-devel] [PATCH] Fix and cleanup IPCOP_msg* ipc calls handling Kirill A. Shutemov
2008-10-08 18:54     ` [Qemu-devel] [PATCH] Implement msg* syscalls Kirill A. Shutemov
2008-10-08 18:54       ` [Qemu-devel] [PATCH] Fix and cleanup IPCOP_sem* ipc calls handling Kirill A. Shutemov
2008-10-08 18:54         ` [Qemu-devel] [PATCH] Implement sem* syscalls Kirill A. Shutemov
2008-10-08 18:54           ` [Qemu-devel] [PATCH] Fix and cleanup IPCOP_shm* ipc calls handling Kirill A. Shutemov
2008-10-08 18:54             ` [Qemu-devel] [PATCH] Implement shm* syscalls Kirill A. Shutemov
2008-10-08 18:54               ` [Qemu-devel] [PATCH] Fix fstatat64()/newfstatat() syscall implementation Kirill A. Shutemov
2008-10-08 18:54                 ` [Qemu-devel] [PATCH] Introduce --enable-binfmt-misc configure option Kirill A. Shutemov
2008-10-09 17:40                 ` [Qemu-devel] [PATCH, v2] Fix fstatat64()/newfstatat() syscall implementation Kirill A. Shutemov
2008-10-09 17:42           ` [Qemu-devel] [PATCH, v2] Implement sem* syscalls Kirill A. Shutemov
2008-10-09 17:41         ` [Qemu-devel] [PATCH, v2] Fix and cleanup IPCOP_sem* ipc calls handling Kirill A. Shutemov
2008-10-13 21:09   ` [Qemu-devel] [PATCH] Fix getdents* syscalls Aurelien Jarno
2008-10-13 21:09 ` [Qemu-devel] [PATCH] Add readahead syscall Aurelien Jarno
  -- strict thread matches above, loose matches on Subject: below --
2008-10-13 10:10 Kirill A. Shutemov
2008-10-01 13:56 [Qemu-devel] [PATCH] Add fadvise64 stubs Kirill A. Shutemov
2008-10-01 13:56 ` [Qemu-devel] [PATCH] Add mincore syscall Kirill A. Shutemov
2008-10-01 13:56   ` [Qemu-devel] [PATCH] Add readahead syscall Kirill A. Shutemov
2008-09-19 13:33 Riku Voipio
2008-09-19 14:16 ` Kirill A. Shutemov
2008-09-21 13:03 ` Paul Brook
2008-09-21 14:01   ` Kirill A. Shutemov
2008-09-21 14:09     ` Paul Brook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).