From patchwork Thu Oct 5 16:24:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 821922 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y7J6S0t2Rz9t16 for ; Fri, 6 Oct 2017 03:25:52 +1100 (AEDT) Received: from localhost ([::1]:40762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e08y6-0002pA-3E for incoming@patchwork.ozlabs.org; Thu, 05 Oct 2017 12:25:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e08xH-0002mx-4q for qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:25:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e08xE-00039n-14 for qemu-devel@nongnu.org; Thu, 05 Oct 2017 12:24:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20588) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e08xD-00038v-ON; Thu, 05 Oct 2017 12:24:55 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33F3B796ED; Thu, 5 Oct 2017 16:24:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 33F3B796ED Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=imammedo@redhat.com Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5984D5C54B; Thu, 5 Oct 2017 16:24:52 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Thu, 5 Oct 2017 18:24:27 +0200 Message-Id: <1507220690-265042-1-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 05 Oct 2017 16:24:54 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 00/23] generalize parsing of cpu_model (part 3/PPC) 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: "open list:ppce500" , "Edgar E. Iglesias" , =?utf-8?q?Herv=C3=A9_Poussineau?= , Alexander Graf , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" this series is continuation of effort to remove boards dependency on cpu_model parsing and generalizing default cpu type handling. For background story look at merged: [PATCH v2 0/5] generalize parsing of cpu_model (x86/arm) https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg03564.html Part 3 is independent subset that takes care of all PPC boards. Series borrows the 1st 3 patches from earlier posted part 2 qom: update doc comment for type_register[_static]() qom: introduce type_register_static_array() qom: add helper macro DEFINE_TYPES() to avoid interdependency, hopefully this 3 will be merged via machine-next, but it's fine for them to go via any tree (whichever first) Beside of switching to generic cpu_model parsing series contains a bunch of cleanups/simplifications which reduces code a bit and normalizes code that I've happend to touch to a typical QEMU patterns. git tree for testing: https://github.com/imammedo/qemu/branches cpu_init_removal_ppc_part3_v1 CC: Alexander Graf (supporter:ppce500) CC: David Gibson (maintainer:PowerPC) CC: "Hervé Poussineau" (maintainer:PReP) CC: "Edgar E. Iglesias" (odd fixer:virtex_ml507) CC: qemu-ppc@nongnu.org (open list:ppce500) Igor Mammedov (23): qom: update doc comment for type_register[_static]() qom: introduce type_register_static_array() qom: add helper macro DEFINE_TYPES() ppc: mpc8544ds/e500plat: use generic cpu_model parsing ppc: mac_newworld: use generic cpu_model parsing ppc: mac_oldworld: use generic cpu_model parsing ppc: bamboo: use generic cpu_model parsing ppc: replace cpu_model with cpu_type on ref405ep,taihu boards ppc: virtex-ml507: replace cpu_model with cpu_type ppc: 40p/prep: replace cpu_model with cpu_type ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model() ppc: move '-cpu foo,compat=xxx' parsing into ppc_cpu_parse_featurestr() ppc: spapr: define core types statically ppc: spapr: use cpu type name directly ppc: spapr: register 'host' core type along with the rest of core types ppc: spapr: use cpu model names as tcg defaults instead of aliases ppc: spapr: use generic cpu_model parsing ppc: pnv: use generic cpu_model parsing ppc: pnv: normalize core/chip type names ppc: pnv: drop PnvCoreClass::cpu_oc field ppc: pnv: define core types statically ppc: pnv: drop PnvChipClass::cpu_model field ppc: pnv: consolidate type definitions and batch register them include/hw/ppc/pnv.h | 12 +-- include/hw/ppc/pnv_core.h | 4 +- include/hw/ppc/ppc.h | 2 - include/hw/ppc/spapr.h | 2 - include/hw/ppc/spapr_cpu_core.h | 7 +- include/qom/object.h | 50 ++++++++++- target/ppc/cpu-qom.h | 1 + target/ppc/cpu.h | 1 - hw/ppc/e500.c | 8 +- hw/ppc/e500plat.c | 1 + hw/ppc/mac_newworld.c | 15 ++-- hw/ppc/mac_oldworld.c | 6 +- hw/ppc/mpc8544ds.c | 2 + hw/ppc/pnv.c | 131 ++++++++++++----------------- hw/ppc/pnv_core.c | 67 +++++++-------- hw/ppc/ppc.c | 25 ------ hw/ppc/ppc405_uc.c | 6 +- hw/ppc/ppc440_bamboo.c | 7 +- hw/ppc/ppc4xx_devs.c | 4 +- hw/ppc/prep.c | 12 +-- hw/ppc/spapr.c | 22 ++--- hw/ppc/spapr_cpu_core.c | 182 ++++++++++------------------------------ hw/ppc/virtex_ml507.c | 11 +-- qom/object.c | 9 ++ target/ppc/kvm.c | 20 ++--- target/ppc/translate_init.c | 72 ++++++++++++++-- 26 files changed, 304 insertions(+), 375 deletions(-)