From patchwork Thu Jun 9 17:11:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 9167779 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D2FC8607DA for ; Thu, 9 Jun 2016 18:59:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C344028310 for ; Thu, 9 Jun 2016 18:59:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7E4528356; Thu, 9 Jun 2016 18:59:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5510028310 for ; Thu, 9 Jun 2016 18:59:01 +0000 (UTC) Received: from localhost ([::1]:36518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB5AS-0003R8-H7 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 09 Jun 2016 14:59:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3UF-0000Zz-Fn for qemu-devel@nongnu.org; Thu, 09 Jun 2016 13:11:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB3UD-0007Zs-Ai for qemu-devel@nongnu.org; Thu, 09 Jun 2016 13:11:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3UA-0007Yg-MI; Thu, 09 Jun 2016 13:11:14 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D5B36E793; Thu, 9 Jun 2016 17:11:14 +0000 (UTC) Received: from Igors-MacBook-Pro.local.com (ovpn-204-90.brq.redhat.com [10.40.204.90]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u59HB4rX031581; Thu, 9 Jun 2016 13:11:12 -0400 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Thu, 9 Jun 2016 19:11:00 +0200 Message-Id: <1465492263-28472-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1465492263-28472-1-git-send-email-imammedo@redhat.com> References: <1465492263-28472-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 09 Jun 2016 17:11:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 3/6] target-sparc: cpu: use sparc_cpu_parse_features() directly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mark.cave-ayland@ilande.co.uk, blauwirbel@gmail.com, qemu-arm@nongnu.org, pbonzini@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Eduardo Habkost --- 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;