From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3z4X-0000Hp-P1 for qemu-devel@nongnu.org; Tue, 08 Nov 2016 00:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3z4T-0002EV-OW for qemu-devel@nongnu.org; Tue, 08 Nov 2016 00:35:49 -0500 Date: Tue, 8 Nov 2016 14:48:40 +1100 From: David Gibson Message-ID: <20161108034840.GO28688@umbus.fritz.box> References: <1477825928-10803-1-git-send-email-david@gibson.dropbear.id.au> <1477825928-10803-7-git-send-email-david@gibson.dropbear.id.au> <902ea0f3-272c-66ec-f6f5-e08c23b2e465@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wxIXENaY2CYUgF8u" Content-Disposition: inline In-Reply-To: <902ea0f3-272c-66ec-f6f5-e08c23b2e465@ozlabs.ru> Subject: Re: [Qemu-devel] [RFC 06/17] ppc: Rename cpu_version to compat_pvr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: nikunj@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, thuth@redhat.com, lvivier@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org --wxIXENaY2CYUgF8u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 04, 2016 at 01:26:41PM +1100, Alexey Kardashevskiy wrote: > On 30/10/16 22:11, David Gibson wrote: > > The 'cpu_version' field in PowerPCCPU is badly named. It's named after= the > > 'cpu-version' device tree property where it is advertised, but that mea= ning > > may not be obvious in most places it appears. > >=20 > > Worse, it doesn't even really correspond to that device tree property. = The > > property contains either the processor's PVR, or, if the CPU is running= in > > a compatibility mode, a special "logical PVR" representing which mode. > >=20 > > Rename the cpu_version field, and a number of related variables to > > compat_pvr to make this clearer. > >=20 > > Signed-off-by: David Gibson > > --- > > hw/ppc/spapr.c | 4 ++-- > > hw/ppc/spapr_hcall.c | 30 +++++++++++++++--------------- > > target-ppc/cpu.h | 6 +++--- > > target-ppc/kvm.c | 4 ++-- > > target-ppc/kvm_ppc.h | 4 ++-- > > target-ppc/translate_init.c | 10 +++++----- > > 6 files changed, 29 insertions(+), 29 deletions(-) > >=20 > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index b7762ee..276cefa 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -149,8 +149,8 @@ static int spapr_fixup_cpu_smt_dt(void *fdt, int of= fset, PowerPCCPU *cpu, > > uint32_t gservers_prop[smt_threads * 2]; > > int index =3D ppc_get_vcpu_dt_id(cpu); > > =20 > > - if (cpu->cpu_version) { > > - ret =3D fdt_setprop_cell(fdt, offset, "cpu-version", cpu->cpu_= version); > > + if (cpu->compat_pvr) { >=20 >=20 > Nit: g_assert(cpu->compat_pvr & 0x0F000000); may be? That change wouldn't belong in this patch, which is purely a mechanical s/cpu_version/compat_pvr/. In general, I have considered such an assert(), but held back, because I hand't spotted an actual document saying that range was explicitly reserved for logical PVRs. If you have such a reference, I'll look at adding such an assert somewhere. --=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 --wxIXENaY2CYUgF8u Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYIUsYAAoJEGw4ysog2bOS/NsP/j57DjSm5gcXjp7P+GVuqmKO 5pFnI9g2tL7vmuGejO1idK5c2/Vja7qzhLMNSiw+bDI5VydNam2r6JdnTh9oqjQ5 W3cZQGAxifzLmI6oBUQDetuNXE7CgQBUB4MfEHB39XKmrE5nGZTE8y3MMGehe5qM U4cv3jUb9PIZgJexyfIqCXjupvziYGQNcs4MP5uFMcfJu0dCdVIS/ExCjc105WRh fHOl3ZGmbe33Q4aKr4G1FZViDHv3J0+ZIWwLvC2MWLD8dO+/jF64pVu0WfSi+bS5 Xv7JG6rrZVWbODsnBwu6G9VIeG9/RPKlqpXl3oHKu5K53aw7h21SqUwB9RJc2dK7 nSEVjwROL/+i4c6HwO0Wy3s0p3jwub4vPWGYRWviIq9ggyhoIoh65Yx5FmwRxQIU lqtlBKCkUM5rGZGAgu9w1wsCFeGGUB+API9h7H8iuZ+AtKTfZ14wpMpgyXWwRWNJ 0ANimMfkxVP8n+OLKNfhPcH80EIQUcbBC0RW5pdHn/dPzLNoQinGfF7Hwq3Qnwfy 6ubd4Q28F1W/EeDqxr3ugUb1IHSUJ6LyP9Z6VteWATxfBrGSmJrV200R1u/23PMr ZnVu2kQjb9bzXHjgTdcnbYonJuTxW6SFgp9onGA0TMOstueltArz4C9d5zEXpDId fg8K7kj3q5jIt+Ie1VE6 =GTWJ -----END PGP SIGNATURE----- --wxIXENaY2CYUgF8u--