* [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. @ 2013-07-02 9:11 Dongxue Zhang 2013-07-02 9:29 ` Jia Liu 0 siblings, 1 reply; 7+ messages in thread From: Dongxue Zhang @ 2013-07-02 9:11 UTC (permalink / raw) To: qemu-devel; +Cc: Dongxue Zhang Make target-openrisc running OK by add typename in openrisc_cpu_class_by_name(). Signed-off-by: Dongxue Zhang <elta.era@gmail.com> --- 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_model) { ObjectClass *oc; + char *typename; if (cpu_model == NULL) { return NULL; } - oc = object_class_by_name(cpu_model); + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); + oc = object_class_by_name(typename); if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_OPENRISC_CPU) || object_class_is_abstract(oc))) { return NULL; -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. 2013-07-02 9:11 [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models Dongxue Zhang @ 2013-07-02 9:29 ` Jia Liu 2013-07-02 10:18 ` Andreas Färber 0 siblings, 1 reply; 7+ messages in thread From: Jia Liu @ 2013-07-02 9:29 UTC (permalink / raw) To: Dongxue Zhang; +Cc: qemu-devel@nongnu.org [-- Attachment #1: Type: text/plain, Size: 1142 bytes --] Hi Dongxue, On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang <elta.era@gmail.com> wrote: > > Make target-openrisc running OK by add typename in openrisc_cpu_class_by_name(). > > Signed-off-by: Dongxue Zhang <elta.era@gmail.com> > --- > 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_model) > { > ObjectClass *oc; > + char *typename; > > if (cpu_model == NULL) { > return NULL; > } > > - oc = object_class_by_name(cpu_model); > + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); > + oc = object_class_by_name(typename); > if (oc != 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. > > -- > 1.8.1.2 > > Regards, Jia [-- Attachment #2: Type: text/html, Size: 1508 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. 2013-07-02 9:29 ` Jia Liu @ 2013-07-02 10:18 ` Andreas Färber 2013-07-02 12:30 ` Jia Liu 2013-07-05 23:48 ` Jia Liu 0 siblings, 2 replies; 7+ messages in thread From: Andreas Färber @ 2013-07-02 10:18 UTC (permalink / raw) To: Jia Liu; +Cc: Dongxue Zhang, qemu-devel Hi Jia, Am 02.07.2013 11:29, schrieb Jia Liu: > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang <elta.era@gmail.com > <mailto:elta.era@gmail.com>> wrote: >> >> Make target-openrisc running OK by add typename in > openrisc_cpu_class_by_name(). >> >> Signed-off-by: Dongxue Zhang <elta.era@gmail.com > <mailto:elta.era@gmail.com>> >> --- >> 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_model) >> { >> ObjectClass *oc; >> + char *typename; >> >> if (cpu_model == NULL) { >> return NULL; >> } >> >> - oc = object_class_by_name(cpu_model); >> + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); >> + oc = object_class_by_name(typename); >> if (oc != 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. If you could upload a Linux test image somewhere that may help avoid breakages in the future. Also we reported that there was no maintainer for target-openrisc/ in MAINTAINERS file, do you want to put yourself there so that you are CC'ed on patches? Here's a pointer to the latest refactoring that partially affects or32: http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg05354.html Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. 2013-07-02 10:18 ` Andreas Färber @ 2013-07-02 12:30 ` Jia Liu 2013-07-07 16:08 ` Andreas Färber 2013-07-05 23:48 ` Jia Liu 1 sibling, 1 reply; 7+ messages in thread From: Jia Liu @ 2013-07-02 12:30 UTC (permalink / raw) To: Andreas Färber; +Cc: Dongxue Zhang, qemu-devel [-- Attachment #1: Type: text/plain, Size: 2569 bytes --] Hi Andreas, On Tue, Jul 2, 2013 at 6:18 PM, Andreas Färber <afaerber@suse.de> wrote: > > Hi Jia, > > Am 02.07.2013 11:29, schrieb Jia Liu: > > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang <elta.era@gmail.com > > <mailto:elta.era@gmail.com>> wrote: > >> > >> Make target-openrisc running OK by add typename in > > openrisc_cpu_class_by_name(). > >> > >> Signed-off-by: Dongxue Zhang <elta.era@gmail.com > > <mailto:elta.era@gmail.com>> > >> --- > >> 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_model) > >> { > >> ObjectClass *oc; > >> + char *typename; > >> > >> if (cpu_model == NULL) { > >> return NULL; > >> } > >> > >> - oc = object_class_by_name(cpu_model); > >> + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); > >> + oc = object_class_by_name(typename); > >> if (oc != 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. 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. > > If you could upload a Linux test image somewhere that may help avoid > breakages in the future. I find some Linux test images at http://qemu-project.org/Testing . How can I upload one upon to there? > > Also we reported that there was no maintainer for target-openrisc/ in > MAINTAINERS file, do you want to put yourself there so that you are > CC'ed on patches? Thank you, I'll submit a patch to add myself into MAINTAINERS file and review target-openrisc. > > Here's a pointer to the latest refactoring that partially affects or32: > http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg05354.html Thank you for patching target-openrisc, I'll test it. > > Regards, > Andreas > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg Regards, Jia [-- Attachment #2: Type: text/html, Size: 3534 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. 2013-07-02 12:30 ` Jia Liu @ 2013-07-07 16:08 ` Andreas Färber 2013-07-08 2:06 ` Jia Liu 0 siblings, 1 reply; 7+ messages in thread From: Andreas Färber @ 2013-07-07 16:08 UTC (permalink / raw) 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ärber <afaerber@suse.de > <mailto:afaerber@suse.de>> wrote: >> Am 02.07.2013 11:29, schrieb Jia Liu: >> > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang <elta.era@gmail.com > <mailto:elta.era@gmail.com> >> > <mailto:elta.era@gmail.com <mailto:elta.era@gmail.com>>> wrote: >> >> >> >> Make target-openrisc running OK by add typename in >> > openrisc_cpu_class_by_name(). >> >> >> >> Signed-off-by: Dongxue Zhang <elta.era@gmail.com > <mailto:elta.era@gmail.com> >> > <mailto:elta.era@gmail.com <mailto:elta.era@gmail.com>>> >> >> --- >> >> 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_model) >> >> { >> >> ObjectClass *oc; >> >> + char *typename; >> >> >> >> if (cpu_model == NULL) { >> >> return NULL; >> >> } >> >> >> >> - oc = object_class_by_name(cpu_model); >> >> + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); >> >> + oc = object_class_by_name(typename); >> >> if (oc != 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 <your@email> 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. > > 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 -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. 2013-07-07 16:08 ` Andreas Färber @ 2013-07-08 2:06 ` Jia Liu 0 siblings, 0 replies; 7+ messages in thread From: Jia Liu @ 2013-07-08 2:06 UTC (permalink / raw) To: Andreas Färber; +Cc: Dongxue Zhang, qemu-devel, qemu-stable [-- Attachment #1: Type: text/plain, Size: 3655 bytes --] Hi Andreas, On Mon, Jul 8, 2013 at 12:08 AM, Andreas Färber <afaerber@suse.de> wrote: > > Hi, > > Am 02.07.2013 14:30, schrieb Jia Liu: > > On Tue, Jul 2, 2013 at 6:18 PM, Andreas Färber <afaerber@suse.de > > <mailto:afaerber@suse.de>> wrote: > >> Am 02.07.2013 11:29, schrieb Jia Liu: > >> > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang <elta.era@gmail.com > > <mailto:elta.era@gmail.com> > >> > <mailto:elta.era@gmail.com <mailto:elta.era@gmail.com>>> wrote: > >> >> > >> >> Make target-openrisc running OK by add typename in > >> > openrisc_cpu_class_by_name(). > >> >> > >> >> Signed-off-by: Dongxue Zhang <elta.era@gmail.com > > <mailto:elta.era@gmail.com> > >> > <mailto:elta.era@gmail.com <mailto:elta.era@gmail.com>>> > >> >> --- > >> >> 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_model) > >> >> { > >> >> ObjectClass *oc; > >> >> + char *typename; > >> >> > >> >> if (cpu_model == NULL) { > >> >> return NULL; > >> >> } > >> >> > >> >> - oc = object_class_by_name(cpu_model); > >> >> + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); > >> >> + oc = object_class_by_name(typename); > >> >> if (oc != 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. Thanks, we will working on this. > > > > 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 <your@email> 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. > > > > 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 > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg Regards, Jia [-- Attachment #2: Type: text/html, Size: 5340 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. 2013-07-02 10:18 ` Andreas Färber 2013-07-02 12:30 ` Jia Liu @ 2013-07-05 23:48 ` Jia Liu 1 sibling, 0 replies; 7+ messages in thread From: Jia Liu @ 2013-07-05 23:48 UTC (permalink / raw) To: Andreas Färber; +Cc: Dongxue Zhang, qemu-devel [-- Attachment #1: Type: text/plain, Size: 2293 bytes --] Hi Andreas, On Tue, Jul 2, 2013 at 6:18 PM, Andreas Färber <afaerber@suse.de> wrote: > > Hi Jia, > > Am 02.07.2013 11:29, schrieb Jia Liu: > > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang <elta.era@gmail.com > > <mailto:elta.era@gmail.com>> wrote: > >> > >> Make target-openrisc running OK by add typename in > > openrisc_cpu_class_by_name(). > >> > >> Signed-off-by: Dongxue Zhang <elta.era@gmail.com > > <mailto:elta.era@gmail.com>> > >> --- > >> 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_model) > >> { > >> ObjectClass *oc; > >> + char *typename; > >> > >> if (cpu_model == NULL) { > >> return NULL; > >> } > >> > >> - oc = object_class_by_name(cpu_model); > >> + typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); > >> + oc = object_class_by_name(typename); > >> if (oc != 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. > > If you could upload a Linux test image somewhere that may help avoid > breakages in the future. I've upload a Linux test image to my Google Drive. https://docs.google.com/file/d/0BxeTrz3x0CBLbTNmU0lrV1Y0V0U/edit > > Also we reported that there was no maintainer for target-openrisc/ in > MAINTAINERS file, do you want to put yourself there so that you are > CC'ed on patches? > > Here's a pointer to the latest refactoring that partially affects or32: > http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg05354.html > > Regards, > Andreas > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg Regards, Jia [-- Attachment #2: Type: text/html, Size: 3341 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-07-08 2:07 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-02 9:11 [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models Dongxue Zhang 2013-07-02 9:29 ` Jia Liu 2013-07-02 10:18 ` Andreas Färber 2013-07-02 12:30 ` Jia Liu 2013-07-07 16:08 ` Andreas Färber 2013-07-08 2:06 ` Jia Liu 2013-07-05 23:48 ` Jia Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).