From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvrVv-0007IU-7Y for qemu-devel@nongnu.org; Sun, 07 Jul 2013 12:08:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvrVu-0001GO-0D for qemu-devel@nongnu.org; Sun, 07 Jul 2013 12:08:39 -0400 Message-ID: <51D9927F.1040402@suse.de> Date: Sun, 07 Jul 2013 18:08:31 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1372756315-17437-1-git-send-email-elta.era@gmail.com> <51D2A905.2080708@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jia Liu , Dongxue Zhang Cc: qemu-devel , qemu-stable Hi, Am 02.07.2013 14:30, schrieb Jia Liu: > On Tue, Jul 2, 2013 at 6:18 PM, Andreas F=E4rber > wrote: >> Am 02.07.2013 11:29, schrieb Jia Liu: >> > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang >> > >> wrote: >> >> >> >> Make target-openrisc running OK by add typename in >> > openrisc_cpu_class_by_name(). >> >> >> >> Signed-off-by: Dongxue Zhang >> > >> >> >> --- >> >> target-openrisc/cpu.c | 4 +++- >> >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> >> >> diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c >> >> index fd90d37..d38c28b 100644 >> >> --- a/target-openrisc/cpu.c >> >> +++ b/target-openrisc/cpu.c >> >> @@ -96,12 +96,14 @@ static void openrisc_cpu_initfn(Object *obj) >> >> static ObjectClass *openrisc_cpu_class_by_name(const char *cpu_mod= el) >> >> { >> >> ObjectClass *oc; >> >> + char *typename; >> >> >> >> if (cpu_model =3D=3D NULL) { >> >> return NULL; >> >> } >> >> >> >> - oc =3D object_class_by_name(cpu_model); >> >> + typename =3D g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_mode= l); >> >> + oc =3D object_class_by_name(typename); >> >> if (oc !=3D NULL && (!object_class_dynamic_cast(oc, >> > TYPE_OPENRISC_CPU) || >> >> object_class_is_abstract(oc))) { >> >> return NULL; >> > >> > Thanks for your fix, it looks and test good to me. >> >> Sorry for the breakage. Do you want to add a >> Reviewed-by/Tested-by/Acked-by? I'd queue it for you then. Thanks, queued on qom-cpu (with extended commit message): https://github.com/afaerber/qemu-cpu/commits/qom-cpu CC'ing qemu-stable. I also note that my mistake made it possible to use -cpu or1200-or32-cpu or -cpu any-or32-cpu instead of -cpu or1200 or -cpu any, which this patch reverts. I believe that to be intentional. Otherwise we can extend the patch to allow both. > Thank you very much! May you please tell me how can I make a > Reviewed-by/Tested-by/Acked-by? I don't know too much about it. You can see how it's used on the list almost every day. ;) Reviewed-by: Your Name means that you have reviewed the patch to be sensible, functionally correct and containing no style issues= . Tested-by should be obvious. Based on your email I've added that one for now. Acked-by is short for acknowledged and, depending on interpretation, means either that the change/concept looks okay or that it has been reviewed and compile-tested. Anthony prefers to get Reviewed-bys. >> If you could upload a Linux test image somewhere that may help avoid >> breakages in the future. >=20 > I find some Linux test images at http://qemu-project.org/Testing . How > can I upload one upon to there? We can't. For one the Wiki has an upload file size limit, for another hosting GPL'ed binaries requires to either host or supply on request the corresponding source code (but IANAL). Regards, 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