All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "walt@tilera.com" <walt@tilera.com>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user.
Date: Fri, 13 Feb 2015 13:44:15 +0800	[thread overview]
Message-ID: <54DD8F2F.2090703@sunrus.com.cn> (raw)
In-Reply-To: <CAFEAcA92NezC0Aij1Oi7+8Jck4hU603X5ahDJPCKS6BWTfakRA@mail.gmail.com>

On 2/13/15 12:56, Peter Maydell wrote:
> On 13 February 2015 at 04:43, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>> Originally, I have tried to remove TARGET_NR_open and others, they can
>> not pass building, and I also noticed about NR_openat. But at last, I
>> still remain TARGET_NR_open and others (with related comments):
>>
>>  - Another platforms (e.g. microblaze, arm64) defined them, too.
>>
>>  - It is only for linux-user, can bypass Linux tile kernel. So it is
>>    still correct.
> 
> The question is, does the Linux kernel for this architecture implement
> a particular syscall (eg NR_open)? (That is, is there a syscall number
> defined, and if you try to execute a syscall with this syscall number,
> does it work, or does it fail?) If it does implement it, then you need to
> #define TARGET_NR_open appropriately. If not, then don't define that.
> If QEMU doesn't build as a result, this probably means our linux-user
> code doesn't expect a target architecture with no implementation of
> that syscall. In that case you should fix the linux-user code (eg
> by adding ifdefs).
>

The tilegx 64-bit Linux kernel doesn't support TARGET_NR_open and others.

>>  - It really wastes memory and storage a little, but for me, the related
>>    maintainers (not me) need to consider about whether let the code more
>>    complex or save memory a little.
> 
> Neither code complexity nor memory use are important here. It is an
> issue of correctness.
> 

Which issue of correctness will occur? I can not enum it. For me, they
are only the waste code:

 - linux-user already bypasses target linux kernel, and libc for tilegx
   can not generate these calls (not defined for libc, either).

 - For any informal using, linux-user can still operate NR_open and
   others, it is harmless.

 - It is about compatible (not about correctness issues).

I guess, tilegx is the new processor than most of others within Tilera,
so it does not want to compatible with the old calls (then can save
memory and spaces, also can let things a little simpler).


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

  reply	other threads:[~2015-02-13  5:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12  0:00 [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user Chen Gang S
2015-02-12  0:12 ` Chen Gang S
2015-02-12  0:24   ` Chris Metcalf
2015-02-12  3:32     ` Chen Gang S
2015-02-12  3:48       ` Chen Gang S
2015-02-12 22:32         ` Chris Metcalf
2015-02-13  4:03           ` Chen Gang S
2015-02-12 22:31       ` Chris Metcalf
2015-02-13  4:43         ` Chen Gang S
2015-02-13  4:56           ` Peter Maydell
2015-02-13  5:44             ` Chen Gang S [this message]
2015-02-13  5:43               ` Peter Maydell
2015-02-13  6:34                 ` Chen Gang S
2015-02-12  0:49 ` Peter Maydell
2015-02-12  2:53   ` Chen Gang S

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=54DD8F2F.2090703@sunrus.com.cn \
    --to=gang.chen@sunrus.com.cn \
    --cc=cmetcalf@ezchip.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=walt@tilera.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.