qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Doug Kwan <dougkwan@google.com>
Cc: Riku Voipio <riku.voipio@iki.fi>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2 1/3] linux-user: Support little-endian PPC64 in user mode.
Date: Sat, 10 May 2014 10:55:20 +0100	[thread overview]
Message-ID: <CAFEAcA8xoACS1+DA64gq+baObDi9Mi09SrLp9Re+DCaW9Z3RCg@mail.gmail.com> (raw)
In-Reply-To: <1399713400-8619-2-git-send-email-dougkwan@google.com>

On 10 May 2014 10:16, Doug Kwan <dougkwan@google.com> wrote:
> diff --git a/linux-user/uname.c b/linux-user/uname.c
> index f5d4c66..cb1f9a3 100644
> --- a/linux-user/uname.c
> +++ b/linux-user/uname.c
> @@ -65,6 +65,12 @@ const char *cpu_to_uname_machine(void *cpu_env)
>          return "i586";
>      }
>      return "i686";
> +#elif defined(TARGET_PPC64)
> +#ifdef TARGET_WORDS_BIGENDIAN
> +    return UNAME_MACHINE;
> +#else
> +    return UNAME_MACHINE "le";
> +#endif
>  #else
>      /* default is #define-d in each arch/ subdir */
>      return UNAME_MACHINE;

I think it would be nicer just to define UNAME_MACHINE correctly
in linux-user/ppc/syscall.h. We should restrict the per-CPU ifdefs
in uname.c to just those CPUs which need to pick the uname based
on runtime CPU features.

thanks
-- PMM

  reply	other threads:[~2014-05-10  9:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-10  9:16 [Qemu-devel] [PATCH v2 0/3] Adding new user mode target ppc64le-linux-user Doug Kwan
2014-05-10  9:16 ` [Qemu-devel] [PATCH v2 1/3] linux-user: Support little-endian PPC64 in user mode Doug Kwan
2014-05-10  9:55   ` Peter Maydell [this message]
2014-05-10 10:02   ` Peter Maydell
2014-05-10  9:16 ` [Qemu-devel] [PATCH v2 2/3] PPC: Allow little-endian " Doug Kwan
2014-05-10 10:13   ` Peter Maydell
2014-05-13  7:05   ` Alexander Graf
2014-05-13  7:30     ` Doug Kwan (關振德)
2014-05-13  7:32       ` Alexander Graf
2014-05-10  9:16 ` [Qemu-devel] [PATCH v2 3/3] Add a new user mode target for little-endian PPC64 Doug Kwan
2014-05-10 10:00   ` Peter Maydell
2014-05-12 13:05   ` Tom Musta
2014-05-13  6:45     ` Doug Kwan (關振德)
2014-05-13  7:06 ` [Qemu-devel] [PATCH v2 0/3] Adding new user mode target ppc64le-linux-user Alexander Graf
2014-05-13 12:08   ` [Qemu-devel] [Qemu-ppc] " Tom Musta

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=CAFEAcA8xoACS1+DA64gq+baObDi9Mi09SrLp9Re+DCaW9Z3RCg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=agraf@suse.de \
    --cc=dougkwan@google.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).