From nobody Thu Jul 3 18:43:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486638972548426.2524671668166; Thu, 9 Feb 2017 03:16:12 -0800 (PST) Received: from localhost ([::1]:37028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbmhv-00073G-Db for importer@patchew.org; Thu, 09 Feb 2017 06:16:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbmat-0001iW-Bo for qemu-devel@nongnu.org; Thu, 09 Feb 2017 06:08:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbmar-0004I9-0B for qemu-devel@nongnu.org; Thu, 09 Feb 2017 06:08:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35184) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbmaq-0004Gy-RY; Thu, 09 Feb 2017 06:08:52 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 17FA7804FB; Thu, 9 Feb 2017 11:08:53 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v19B8e71022393; Thu, 9 Feb 2017 06:08:51 -0500 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Thu, 9 Feb 2017 12:08:36 +0100 Message-Id: <1486638518-171446-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1486638518-171446-1-git-send-email-imammedo@redhat.com> References: <1486638518-171446-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 09 Feb 2017 11:08:53 +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 5/7] change CPUArchId.cpu type to Object* 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: drjones@redhat.com, ehabkost@redhat.com, Alexander Graf , qemu-ppc@nongnu.org, Bharata B Rao , Marcel Apfelbaum , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" so it could be reused for SPAPR cores as well Signed-off-by: Igor Mammedov Reviewed-by: David Gibson --- include/hw/boards.h | 2 +- hw/acpi/cpu.c | 2 +- hw/i386/pc.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 4023b38..60209df 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -51,7 +51,7 @@ void machine_register_compat_props(MachineState *machine); typedef struct { uint64_t arch_id; CpuInstanceProperties props; - struct CPUState *cpu; + Object *cpu; } CPUArchId; =20 /** diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 6017ca0..8c719d3 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -198,7 +198,7 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owne= r, state->dev_count =3D id_list->len; state->devs =3D g_new0(typeof(*state->devs), state->dev_count); for (i =3D 0; i < id_list->len; i++) { - state->devs[i].cpu =3D id_list->cpus[i].cpu; + state->devs[i].cpu =3D CPU(id_list->cpus[i].cpu); state->devs[i].arch_id =3D id_list->cpus[i].arch_id; } memory_region_init_io(&state->ctrl_reg, owner, &cpu_hotplug_ops, state, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ec6dded..afaae15 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1824,7 +1824,7 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev, } =20 found_cpu =3D pc_find_cpu_slot(MACHINE(pcms), cpu->apic_id, NULL); - found_cpu->cpu =3D CPU(dev); + found_cpu->cpu =3D OBJECT(dev); out: error_propagate(errp, local_err); } @@ -2282,13 +2282,13 @@ static const CPUArchIdList *pc_possible_cpu_arch_id= s(MachineState *ms) static HotpluggableCPUList *pc_query_hotpluggable_cpus(MachineState *machi= ne) { int i; - CPUState *cpu; + Object *cpu; HotpluggableCPUList *head =3D NULL; const char *cpu_type; =20 cpu =3D machine->possible_cpus->cpus[0].cpu; assert(cpu); /* BSP is always present */ - cpu_type =3D object_class_get_name(OBJECT_CLASS(CPU_GET_CLASS(cpu))); + cpu_type =3D object_get_typename(cpu); =20 for (i =3D 0; i < machine->possible_cpus->len; i++) { HotpluggableCPUList *list_item =3D g_new0(typeof(*list_item), 1); @@ -2302,7 +2302,7 @@ static HotpluggableCPUList *pc_query_hotpluggable_cpu= s(MachineState *machine) cpu =3D machine->possible_cpus->cpus[i].cpu; if (cpu) { cpu_item->has_qom_path =3D true; - cpu_item->qom_path =3D object_get_canonical_path(OBJECT(cpu)); + cpu_item->qom_path =3D object_get_canonical_path(cpu); } =20 list_item->value =3D cpu_item; --=20 2.7.4