From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0AIl-0008K5-Ja for qemu-devel@nongnu.org; Fri, 28 Oct 2016 12:46:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0AIg-0008VN-Kp for qemu-devel@nongnu.org; Fri, 28 Oct 2016 12:46:43 -0400 Message-ID: <1477673163.32311.39.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Fri, 28 Oct 2016 11:46:03 -0500 In-Reply-To: References: <1477620301-24822-1-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] powernv: CPU compatibility modes don't make sense for powernv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?C=E9dric?= Le Goater , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Fri, 2016-10-28 at 18:40 +0200, C=C3=A9dric Le Goater wrote: >=C2=A0 > It makes perfect sense. The "cpu-version" property is for PAPR, not > for OPAL. > hostboot and skiboot put SPR_PVR in this property.=C2=A0 >=20 > I will be careful using 'CPU_CORE(pc)->nr_threads' in the ICP patches > also.=C2=A0 No, the cpu-version is part of the old OF bindings afaik, at least it exists under OPAL, so it should be there but yes, it should just contain the PVR. Cheers, Ben. > Reviewed-by: C=C3=A9dric Le Goater >=20 > Thanks, >=20 > C. >=20 >=20 > >=20 > >=20 > > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c > > index 82276e0..6af3424 100644 > > --- a/hw/ppc/pnv.c > > +++ b/hw/ppc/pnv.c > > @@ -110,7 +110,7 @@ static void powernv_create_core_node(PnvChip > > *chip, PnvCore *pc, void *fdt) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0CPUState *cs =3D CPU(DEVICE(pc->threads= )); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DeviceClass *dc =3D DEVICE_GET_CLASS(cs= ); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0PowerPCCPU *cpu =3D POWERPC_CPU(cs); > > -=C2=A0=C2=A0=C2=A0=C2=A0int smt_threads =3D ppc_get_compat_smt_threa= ds(cpu); > > +=C2=A0=C2=A0=C2=A0=C2=A0int smt_threads =3D CPU_CORE(pc)->nr_threads= ; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0CPUPPCState *env =3D &cpu->env; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0PowerPCCPUClass *pcc =3D POWERPC_CPU_GE= T_CLASS(cs); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0uint32_t servers_prop[smt_threads]; > > @@ -206,10 +206,6 @@ static void powernv_create_core_node(PnvChip > > *chip, PnvCore *pc, void *fdt) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0_FDT((fdt_setprop(fdt, offset, "ibm,pa-= features", > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= pa_features, sizeof(pa_features)))); > > =C2=A0 > > -=C2=A0=C2=A0=C2=A0=C2=A0if (cpu->cpu_version) { > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0_FDT((fdt_setprop_ce= ll(fdt, offset, "cpu-version", cpu- > > >cpu_version))); > > -=C2=A0=C2=A0=C2=A0=C2=A0} > > - > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* Build interrupt servers properties *= / > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0for (i =3D 0; i < smt_threads; i++) { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0servers_prop[i]= =3D cpu_to_be32(pc->pir + i); > >=20