From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgN5-0007xs-7d for qemu-devel@nongnu.org; Wed, 08 Jun 2016 12:30:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAgN3-0004Rs-6R for qemu-devel@nongnu.org; Wed, 08 Jun 2016 12:30:22 -0400 Date: Wed, 8 Jun 2016 13:30:11 -0300 From: Eduardo Habkost Message-ID: <20160608163011.GL18662@thinpad.lan.raisama.net> References: <1465226212-254093-1-git-send-email-imammedo@redhat.com> <1465226212-254093-8-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465226212-254093-8-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH 07/10] target-sparc: cpu: use sparc_cpu_parse_features() directly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, blauwirbel@gmail.com, qemu-arm@nongnu.org, pbonzini@redhat.com, rth@twiddle.net On Mon, Jun 06, 2016 at 05:16:49PM +0200, Igor Mammedov wrote: > make SPARC target use sparc_cpu_parse_features() directly > so it won't get in the way of switching other propertified > targets to handling features as global properties. > > Signed-off-by: Igor Mammedov I would like to apply this to the x86 tree, to allow the remaining patches to be applied. May I get an Acked-by from the SPARC maintainers? > --- > SPARC target could be switched to features properties > later but that would need quite a bit of refactoring > in generating necessary CPU types and adding appropriate > properties. > --- > target-sparc/cpu.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c > index 5b74cfc..e4089f2 100644 > --- a/target-sparc/cpu.c > +++ b/target-sparc/cpu.c > @@ -101,9 +101,11 @@ static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info) > #endif > } > > +static void sparc_cpu_parse_features(CPUState *cs, char *features, > + Error **errp); > + > static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model) > { > - CPUClass *cc = CPU_GET_CLASS(cpu); > CPUSPARCState *env = &cpu->env; > char *s = g_strdup(cpu_model); > char *featurestr, *name = strtok(s, ","); > @@ -119,7 +121,7 @@ static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model) > memcpy(env->def, def, sizeof(*def)); > > featurestr = strtok(NULL, ","); > - cc->parse_features(CPU(cpu), featurestr, &err); > + sparc_cpu_parse_features(CPU(cpu), featurestr, &err); > g_free(s); > if (err) { > error_report_err(err); > @@ -840,7 +842,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) > scc->parent_reset = cc->reset; > cc->reset = sparc_cpu_reset; > > - cc->parse_features = sparc_cpu_parse_features; > cc->has_work = sparc_cpu_has_work; > cc->do_interrupt = sparc_cpu_do_interrupt; > cc->cpu_exec_interrupt = sparc_cpu_exec_interrupt; > -- > 1.8.3.1 > -- Eduardo