From: David Gibson <david@gibson.dropbear.id.au>
To: Michael Walle <michael@walle.cc>
Cc: Riku Voipio <riku.voipio@iki.fi>, Tom Musta <tommusta@gmail.com>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP
Date: Tue, 20 Sep 2016 12:23:42 +1000 [thread overview]
Message-ID: <20160920022342.GH20488@umbus> (raw)
In-Reply-To: <1471354850-5549-1-git-send-email-michael@walle.cc>
[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]
On Tue, Aug 16, 2016 at 03:40:50PM +0200, Michael Walle wrote:
> Only the POWER[789] CPUs should have the ARCH_206 bit set. This is what the
> linux kernel does. I guess this was also the intention of commit 0e019746.
> We have to make sure all *206 bits are set.
Hrm.. it's not clear to me how this patch fixes things. What was
incorrect with the previous logic?
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> checkpatch.pl flags one warning, but I think this is a false positive.
Yes, I think so to, but..
> linux-user/elfload.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index f807baf..4945d48 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -742,7 +742,8 @@ static uint32_t get_elf_hwcap(void)
> #define GET_FEATURE(flag, feature) \
> do { if (cpu->env.insns_flags & flag) { features |= feature; } } while (0)
> #define GET_FEATURE2(flag, feature) \
> - do { if (cpu->env.insns_flags2 & flag) { features |= feature; } } while (0)
> + do { if ((cpu->env.insns_flags2 & flag) == flag) \
> + { features |= feature; } } while (0)
..given that you're splitting this to >1 line, I think you might as
well expand it fully into a more normal indent style, which should also
shut up the stylebot.
> GET_FEATURE(PPC_64B, QEMU_PPC_FEATURE_64);
> GET_FEATURE(PPC_FLOAT, QEMU_PPC_FEATURE_HAS_FPU);
> GET_FEATURE(PPC_ALTIVEC, QEMU_PPC_FEATURE_HAS_ALTIVEC);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-09-20 4:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 13:40 [Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP Michael Walle
2016-08-16 14:50 ` no-reply
2016-09-20 2:23 ` David Gibson [this message]
2016-09-20 6:55 ` Michael Walle
2016-09-20 13:12 ` David Gibson
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=20160920022342.GH20488@umbus \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=michael@walle.cc \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=tommusta@gmail.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 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).