From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFPFS-0000xA-1L for qemu-devel@nongnu.org; Fri, 30 Aug 2013 10:00:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFPFI-0007o9-4B for qemu-devel@nongnu.org; Fri, 30 Aug 2013 10:00:25 -0400 Message-ID: <5220A56D.3060500@suse.de> Date: Fri, 30 Aug 2013 16:00:13 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1376606111-3518-1-git-send-email-afaerber@suse.de> <1376606111-3518-3-git-send-email-afaerber@suse.de> <521ECE43.1090401@ozlabs.ru> <521EDC6A.4020401@suse.de> <5220360D.8050305@ozlabs.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Alexey Kardashevskiy , qemu-ppc , qemu-devel@nongnu.org, Prerna Saxena Am 30.08.2013 15:54, schrieb Alexander Graf: >=20 > On 30.08.2013, at 08:05, Alexey Kardashevskiy wrote: >=20 >> On 08/29/2013 03:30 PM, Andreas F=E4rber wrote: >>> Am 29.08.2013 06:29, schrieb Alexey Kardashevskiy: >>>> On 08/16/2013 08:35 AM, Andreas F=E4rber wrote: >>>>> Instead of relying on cpu_model, obtain the device tree node label >>>>> per CPU. Use DeviceClass::fw_name when available. This implicitly >>>>> resolves HOST@0 node labels for those CPUs through inheritance. >>>>> >>>>> Whenever DeviceClass::fw_name is not available, derive it from the = CPU's >>>>> type name and fill it in for that class with a "PowerPC," prefix fo= r >>>>> PAPR compliance. >>>> >>>> >>>> I'd rather use the family's @desc instead of CPU class name, would b= e >>>> simpler and we would not have nodes like "PowerPC,POWER7-family@0" (= this is >>>> what I get when comment out dc->fw_name for power7 with my PVR patch= , just >>>> to test). >>> >>> Negative, desc is a free-text field and may contain spaces, parenthes= is, >>> etc. Each model may set desc differently btw, so given my change requ= est >>> for the comparison, we might end up with "POWER7 v2.1" on that >>> particular PVR. >> >> These patches are for spapr and spapr-supported CPUs have short nice n= ames >> in @desc. But ok, may be that's a wrong idea. >> >> >>>> Either way, in what case do you expect that code to work at all? pow= er7, >>>> 7+, 8 have fw_name field initialized, what else is really supported = for >>>> spapr and requires this workaround? >>> >>> 970 comes to mind? Anyway, this was just a more direct way to address >>> the issues raised by Prerna. If you guys don't see the need to enforc= e >>> these naming rules beyond a supported list of POWER CPUs then we can >>> strip it down further, possibly falling back to a fixed >>> "PowerPC,UNKNOWN" rather than trying to construct a name. >> >> >> The direct way would be to finish what the series started and assign >> reasonable fw_name values to every existing family class (970, cell, >> power6, rs64?). >=20 > I agree :). Then there's no need for magic fw_name generation anymore a= nd we have a very obvious code path, making the code simple. >=20 >> There is very limited set of spapr CPU families, they are all there (e= xcept >> power7+ but I'll have a patch for that too) and new CPU family will re= quire >> a new class anyway (so we will put fw_name there when we'll be adding = the >> class) OR we implement "compatibility mode" which will use one of exis= ting >> classes so we get a correct fw_name either way. >=20 > Well, I think it makes sense to always provide a fw_name field, regardl= ess of whether that particular CPU works with sPAPR or not. We could use = the same field for ePAPR too for example. So does ePAPR have the same or similar naming rules? Could you supply us with verified e500 etc. names so that it's not pure speculation on my par= t? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg