qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Riku Voipio <riku.voipio@iki.fi>,
	Laurent Vivier <laurent@vivier.eu>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Yongbok Kim <Yongbok.Kim@imgtec.com>,
	Leon Alrae <leon.alrae@imgtec.com>,
	Petar Jovanovic <petar.jovanovic@imgtec.com>,
	Miodrag Dinic <miodrag.dinic@imgtec.com>,
	aleksandar.rikalo@imgtec.com,
	Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] linux-user: Fix fadvise64() syscall support for Mips32
Date: Tue, 4 Oct 2016 13:42:50 -0700	[thread overview]
Message-ID: <CAFEAcA8CSHofEUMxwtcUvShQ70ORqrDpxYfqLADGQP-CSO6USQ@mail.gmail.com> (raw)
In-Reply-To: <20161004180516.65847-5-aleksandar.markovic@rt-rk.com>

On 4 October 2016 at 11:05, Aleksandar Markovic
<aleksandar.markovic@rt-rk.com> wrote:
> From: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
>
> By looking at the file arch/mips/kernel/sys.S in Linux kernel,

There doesn't appear to be a file by that name:
http://lxr.free-electrons.com/source/arch/mips/kernel/

> it can be deduced that, for Mips32 platform, syscall
> corresponding to number _NR_fadvise64 translates to kernel
> function sys_fadvise64_64, and that argument layout is as
> follows:
>           0             32 0             32
>          +----------------+----------------+
>   (arg1) |       fd       |     __pad      | (arg2)
>          +----------------+----------------+
>   (arg3) |             buffer              | (arg4)
>          +----------------+----------------+
>   (arg5) |               len               | (arg6)
>          +----------------+----------------+
>   (arg7) |     advise     |    not used    | (arg8)
>          +----------------+----------------+
>
> This can be deduced from glibc code as well, and relevant commits
> in linux kernel and glibc.
>
> Mips32 uniqness is that it does not define _NR_fadvise64_64,
> however its fadvise64 implemantation is identical to
> fadvise64_64 impleanentation on most other platforms.
>
> This patch also fixes the failure LTP test posix_fadvise03, if
> executed on Qemu-emulated Mips32 platform (user mode).

We could alternatively fix this by having
#define TARGET_NR_fadvise64_64 (TARGET_NR_Linux + 254)
in linux-user/mips/syscall_nr.h rather than
#define TARGET_NR_fadvise64 (TARGET_NR_Linux + 254)

right?

thanks
-- PMM

  reply	other threads:[~2016-10-04 20:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 18:05 [Qemu-devel] [PATCH 0/4] linux-user: Several mostly Mips related patches Aleksandar Markovic
2016-10-04 18:05 ` [Qemu-devel] [PATCH 1/4] linux-user: Add support for sysfs() syscall Aleksandar Markovic
2016-10-04 20:35   ` Peter Maydell
2016-10-04 21:03     ` Aleksandar Markovic
2016-10-04 18:05 ` [Qemu-devel] [PATCH 2/4] linux-user: Update termbits.h for Mips32 Aleksandar Markovic
2016-10-04 18:05 ` [Qemu-devel] [PATCH 3/4] linux-user: Redirect termbits.h for Mips64 to " Aleksandar Markovic
2016-10-04 18:05 ` [Qemu-devel] [PATCH 4/4] linux-user: Fix fadvise64() syscall support " Aleksandar Markovic
2016-10-04 20:42   ` Peter Maydell [this message]
2016-10-04 20:58     ` Aleksandar Markovic
2016-10-05 10:02       ` Aleksandar Markovic
2016-10-05 12:38         ` Peter Maydell
2016-10-06 11:03           ` Aleksandar Markovic

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=CAFEAcA8CSHofEUMxwtcUvShQ70ORqrDpxYfqLADGQP-CSO6USQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=Yongbok.Kim@imgtec.com \
    --cc=aleksandar.markovic@imgtec.com \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=aleksandar.rikalo@imgtec.com \
    --cc=aurelien@aurel32.net \
    --cc=laurent@vivier.eu \
    --cc=leon.alrae@imgtec.com \
    --cc=miodrag.dinic@imgtec.com \
    --cc=petar.jovanovic@imgtec.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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;
as well as URLs for NNTP newsgroup(s).