From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmCPT-0002l4-Ft for qemu-devel@nongnu.org; Tue, 20 Sep 2016 00:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmCPP-0003Bj-8h for qemu-devel@nongnu.org; Tue, 20 Sep 2016 00:11:54 -0400 Date: Tue, 20 Sep 2016 12:23:42 +1000 From: David Gibson Message-ID: <20160920022342.GH20488@umbus> References: <1471354850-5549-1-git-send-email-michael@walle.cc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nOM8ykUjac0mNN89" Content-Disposition: inline In-Reply-To: <1471354850-5549-1-git-send-email-michael@walle.cc> Subject: Re: [Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Walle Cc: Riku Voipio , Tom Musta , qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org --nOM8ykUjac0mNN89 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 t= he > 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? >=20 > Signed-off-by: Michael Walle > --- > 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(-) >=20 > 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 |=3D feature; } } w= hile (0) > #define GET_FEATURE2(flag, feature) = \ > - do { if (cpu->env.insns_flags2 & flag) { features |=3D feature; } } = while (0) > + do { if ((cpu->env.insns_flags2 & flag) =3D=3D flag) \ > + { features |=3D feature; } } while (0) =2E.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); --=20 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 --nOM8ykUjac0mNN89 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4J2rAAoJEGw4ysog2bOSSLoQAI2LFOyNnCVq18J/EIFUTiWi tglETrNiPuclaO+pkYIeiDWrzJMbNwPjNAhyveXt1hNfQDc6YL2kd5w45tAlWlVd XaznaQsK19TiCKiefycT+BWkmji6oQmjt9A6h4YKeUDuEyfhKZAAYbwHdVxvXrcq XTzRTvZy5JPIiMbIb3kA864TBOpaYd34F5nx3uGcuRLB2wvrtk6KPULSsEzrv1a7 873KH3Snur0YjRpFzRGfmXWl/LF/tae6OA4Bu/L59cayPgcHYCUph9CyxOx3jOzq a+FxFv3Ss76TLjJIqJ3okOjiWtw2WZPk3Q5RjUaq+J2UNGY4JS5XyEpFUJazlm4w vPPp59O8XLFQU1vRmCXWe1/HEitawYFTbSZU91kuHHfOQJG4pjunyEFJNnwtrwd6 xeaaotMT/8JMPSqpVKACBwTwyB+Y30PpDL5IyrUMzRzUngXXTGH7mYDLdVYX76a7 b++X9Wc6idLWg/s/AMCgvyAohCrJXHnUrABssQG8nlJEWEw2uBjcgDoYWU1vFk1Y +rEDqTc2lOAS3zCptd4jVYgknmHzsgsZ4W0LvZ530gr6dibEs2P2Pl6W0UXWh/3r cIHWSbYEilTFlJfvdCz8FRT0RhuETSmgJ/ey5gl68B7PLwr78HLQQ09zqAPqnb2w Nsvt+aJZ6kcLWcDLwMTJ =nvE+ -----END PGP SIGNATURE----- --nOM8ykUjac0mNN89--