* [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; 9+ 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] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Add readahead syscall
2008-09-19 13:33 [Qemu-devel] [PATCH] Add readahead syscall Riku Voipio
@ 2008-09-19 14:16 ` Kirill A. Shutemov
2008-09-21 13:03 ` Paul Brook
1 sibling, 0 replies; 9+ messages in thread
From: Kirill A. Shutemov @ 2008-09-19 14:16 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
On Fri, Sep 19, 2008 at 04:33:23PM +0300, Riku Voipio wrote:
>
> 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:
Looks good for me. Added to my patchset.
> --
> 1.5.6.5
>
>
> --
> "rm -rf" only sounds scary if you don't have backups
>
>
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Add readahead syscall
2008-09-19 13:33 [Qemu-devel] [PATCH] Add readahead syscall 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
1 sibling, 1 reply; 9+ messages in thread
From: Paul Brook @ 2008-09-21 13:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Riku Voipio
> #ifdef TARGET_NR_readahead
> case TARGET_NR_readahead:
> - goto unimplemented;
> + ret = get_errno(readahead(arg1, arg2, arg3));
> + break;
This is wrong on 32-bit targets, and especially wrong on ARM where there are
two variants.
Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Add readahead syscall
2008-09-21 13:03 ` Paul Brook
@ 2008-09-21 14:01 ` Kirill A. Shutemov
2008-09-21 14:09 ` Paul Brook
0 siblings, 1 reply; 9+ messages in thread
From: Kirill A. Shutemov @ 2008-09-21 14:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Riku Voipio
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Sun, Sep 21, 2008 at 02:03:16PM +0100, Paul Brook wrote:
> > #ifdef TARGET_NR_readahead
> > case TARGET_NR_readahead:
> > - goto unimplemented;
> > + ret = get_errno(readahead(arg1, arg2, arg3));
> > + break;
>
> This is wrong on 32-bit targets, and especially wrong on ARM where there are
> two variants.
Two variants?
$ git grep readahead arch/arm/include/asm/unistd.h
arch/arm/include/asm/unistd.h:#define __NR_readahead (__NR_SYSCALL_BASE+225)
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Add readahead syscall
2008-09-21 14:01 ` Kirill A. Shutemov
@ 2008-09-21 14:09 ` Paul Brook
0 siblings, 0 replies; 9+ messages in thread
From: Paul Brook @ 2008-09-21 14:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Kirill A. Shutemov, Riku Voipio
On Sunday 21 September 2008, Kirill A. Shutemov wrote:
> On Sun, Sep 21, 2008 at 02:03:16PM +0100, Paul Brook wrote:
> > > #ifdef TARGET_NR_readahead
> > > case TARGET_NR_readahead:
> > > - goto unimplemented;
> > > + ret = get_errno(readahead(arg1, arg2, arg3));
> > > + break;
> >
> > This is wrong on 32-bit targets, and especially wrong on ARM where there
> > are two variants.
>
> Two variants?
EABI and old-abi.
Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH] Add readahead syscall
2008-10-01 13:56 ` [Qemu-devel] [PATCH] Add mincore syscall Kirill A. Shutemov
@ 2008-10-01 13:56 ` Kirill A. Shutemov
0 siblings, 0 replies; 9+ messages in thread
From: Kirill A. Shutemov @ 2008-10-01 13:56 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 10af2e5..e01b4d4 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5749,7 +5749,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] 9+ messages in thread
* [Qemu-devel] [PATCH] Add readahead syscall
@ 2008-10-08 18:54 Kirill A. Shutemov
2008-10-13 21:09 ` Aurelien Jarno
0 siblings, 1 reply; 9+ 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] 9+ messages in thread
* [Qemu-devel] [PATCH] Add readahead syscall
@ 2008-10-13 10:10 Kirill A. Shutemov
0 siblings, 0 replies; 9+ 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] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Add readahead syscall
2008-10-08 18:54 Kirill A. Shutemov
@ 2008-10-13 21:09 ` Aurelien Jarno
0 siblings, 0 replies; 9+ messages in thread
From: Aurelien Jarno @ 2008-10-13 21:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Kirill A. Shutemov
Applied, thanks.
On Wed, Oct 08, 2008 at 09:54:25PM +0300, Kirill A. Shutemov wrote:
> 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
>
>
>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-10-13 21:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 13:33 [Qemu-devel] [PATCH] Add readahead syscall 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
-- strict thread matches above, loose matches on Subject: below --
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-10-08 18:54 Kirill A. Shutemov
2008-10-13 21:09 ` Aurelien Jarno
2008-10-13 10:10 Kirill A. Shutemov
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).