From nobody Mon Jul 7 04:29:56 2025 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=quarantine dis=quarantine) header.from=opensource.wdc.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651103408037859.1163030213572; Wed, 27 Apr 2022 16:50:08 -0700 (PDT) Received: from localhost ([::1]:35868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njrQ7-0005Nl-1m for importer2@patchew.org; Wed, 27 Apr 2022 19:50:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njrIQ-0004nm-7V for qemu-devel@nongnu.org; Wed, 27 Apr 2022 19:42:10 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:48831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njrIO-0004US-CV for qemu-devel@nongnu.org; Wed, 27 Apr 2022 19:42:09 -0400 Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 28 Apr 2022 07:42:05 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Apr 2022 16:12:57 -0700 Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Apr 2022 16:42:05 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4KpZzJ2Fcbz1SVp1 for ; Wed, 27 Apr 2022 16:42:04 -0700 (PDT) Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id R8fXg4v3fsC8 for ; Wed, 27 Apr 2022 16:42:03 -0700 (PDT) Received: from toolbox.wdc.com (unknown [10.225.165.122]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4KpZzD0HrBz1Rvlc; Wed, 27 Apr 2022 16:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1651102928; x=1682638928; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VDMqwzAuMleBEfUbybBP0LToT0CiGMl/sjF8ifOru0A=; b=aYtwt6RYP0IRXbLf22z4HIjq1fE5RIFF7vHZT2rLOmlcBO9vuE9ajtBo SUOSIf4gytKN14zX8iLjAE8UljzEiu96/TenXehJXAPiHPp0lWd5ki+6i xrG4FlWKVfPu0K/2qMAVyO6AvvTHq3ZBdrH0lu9UQVqEBmmyNKfy4Pbpu ME03GKRNzajQBfk5EOWAJoX4YmpGCNMTtyudpvzajkhhFGyfDbmOTgOgu 5p/dk6xOItYdqIotwq+GvUFghlA4qnp/oCXf2Ks+JhXOjQ+7zxhcxAvA/ rlEQQaI24Y6F5nHCaQairXGy2EhmGyj2/GAN9/ejyRF1QrWGa7tlUnwmq g==; X-IronPort-AV: E=Sophos;i="5.90,294,1643644800"; d="scan'208";a="197844531" IronPort-SDR: GdZGePX6GoRn3LWRZEV2tFnGdMHLiT89L/Im8LYR5SM469k5OM/uVBbOrHTOIn1DJUzWguo+EH B1zLgPe/IWCR2iD03CbRrVvs0V5QbwayoJeFsWmDnouRClOHJX53Pd5XefQhImmFl4isHrqIuK F8+WBQauJUPCIp1KHCqGftyECCCxki7K+GWG/O41T5JVK31+KfdWqdTGeqscuxg3zMuYfKgf6B joYbzBNECs9ZcXe6UulpZO95tn6bFt5Ah9F+/gFlJR8H1DRNHD4AkzI+l8WP8Jd1oLckiYzMcC IFbDdGjkZd34ljejT6TuM1rH IronPort-SDR: nF87buHOMuQBCyYrOLR7sOulXU2iH29yPLYCZDk9mIfYxeelWIeFgSJCQMRveXQPEbvP6QYdB2 GMn6l+33G2+STTa16OnnLRvGa3gp6JSpxTS/NSfHFHDDbqv+L1C1oqBP8RgDeNRVWB8wPs+7+r I26K5XnUXUu0mMKpG6Kf7q4FmEB8NuT7uPfjNRopeMIBMTvcgjUjALYimyHieWt1Y9h/UVSbN6 R9VCKhivxOCjpnbV2wIwUMivSztJRDMa5khs4z+sRp3WkSpw2GBOCBki95r6dVjvxYa30c2SX0 E4s= WDCIronportException: Internal Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:subject:to :from; s=dkim; t=1651102923; x=1653694924; bh=VDMqwzAuMleBEfUbyb BP0LToT0CiGMl/sjF8ifOru0A=; b=r+BvutMlphBtwKfSNvbZFO3qMd77WR0IIA +M5MKvqgvWCyu1QCLilpU95tRO9kFx5e96XfD6ywn+DcerAoywlwztvVAKbDH8RP Wy1FcuDzAGbSIrwUm6UAO5CIb4G5yjsZYaBil/fSLyaKkrANppeCfFlATYClIMe+ 5059ztnMM8zNy3QYWSQOrvsUBRvcmX5erxOXGt+hXWrB9PfWxcOfkeb5QgNITOyK 6Rkd+FRZ9JowIAEQ1Gq0U1hZpkuDCbnHGcd/uKxtLBDCWXO39jmf0cEqLfKMuo7q rSkmpmHxyjTSXRlLSdHPLJUCaIygHGLHVVT6Ahsy5iCdk1piqzwQ== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com From: Alistair Francis To: qemu-riscv@nongnu.org, qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , alistair23@gmail.com, Palmer Dabbelt , qemu-arm@nongnu.org, Bin Meng , Alistair Francis , bmeng.cn@gmail.com Subject: [PATCH v5 2/6] hw/core: Move the ARM sysbus-fdt to core Date: Thu, 28 Apr 2022 09:41:42 +1000 Message-Id: <20220427234146.1130752-3-alistair.francis@opensource.wdc.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220427234146.1130752-1-alistair.francis@opensource.wdc.com> References: <20220427234146.1130752-1-alistair.francis@opensource.wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.71.154.42; envelope-from=prvs=109fe075d=alistair.francis@opensource.wdc.com; helo=esa4.hgst.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1651103408878100001 Content-Type: text/plain; charset="utf-8" From: Alistair Francis The ARM virt machine currently uses sysbus-fdt to create device tree entries for dynamically created MMIO devices. The RISC-V virt machine can also benefit from this, so move the code to the core directory. Signed-off-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Reviewed-by: Bin Meng --- include/hw/{arm =3D> core}/sysbus-fdt.h | 0 hw/arm/virt.c | 2 +- hw/arm/xlnx-versal-virt.c | 1 - hw/{arm =3D> core}/sysbus-fdt.c | 2 +- hw/arm/meson.build | 1 - hw/core/meson.build | 1 + 6 files changed, 3 insertions(+), 4 deletions(-) rename include/hw/{arm =3D> core}/sysbus-fdt.h (100%) rename hw/{arm =3D> core}/sysbus-fdt.c (99%) diff --git a/include/hw/arm/sysbus-fdt.h b/include/hw/core/sysbus-fdt.h similarity index 100% rename from include/hw/arm/sysbus-fdt.h rename to include/hw/core/sysbus-fdt.h diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 5bdd98e4a1..f94278935f 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -56,7 +56,7 @@ #include "qemu/module.h" #include "hw/pci-host/gpex.h" #include "hw/virtio/virtio-pci.h" -#include "hw/arm/sysbus-fdt.h" +#include "hw/core/sysbus-fdt.h" #include "hw/platform-bus.h" #include "hw/qdev-properties.h" #include "hw/arm/fdt.h" diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index 66a2de7e13..37fc9b919c 100644 --- a/hw/arm/xlnx-versal-virt.c +++ b/hw/arm/xlnx-versal-virt.c @@ -15,7 +15,6 @@ #include "sysemu/device_tree.h" #include "hw/boards.h" #include "hw/sysbus.h" -#include "hw/arm/sysbus-fdt.h" #include "hw/arm/fdt.h" #include "cpu.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/sysbus-fdt.c b/hw/core/sysbus-fdt.c similarity index 99% rename from hw/arm/sysbus-fdt.c rename to hw/core/sysbus-fdt.c index 48c5fe9bf1..19d22cbe73 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/core/sysbus-fdt.c @@ -27,7 +27,7 @@ #ifdef CONFIG_LINUX #include #endif -#include "hw/arm/sysbus-fdt.h" +#include "hw/core/sysbus-fdt.h" #include "qemu/error-report.h" #include "sysemu/device_tree.h" #include "sysemu/tpm.h" diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 721a8eb8be..122e5dd992 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -1,6 +1,5 @@ arm_ss =3D ss.source_set() arm_ss.add(files('boot.c'), fdt) -arm_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c')) arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c')) arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c')) arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c')) diff --git a/hw/core/meson.build b/hw/core/meson.build index 0f884d6fd4..7a4d02b6c0 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -33,6 +33,7 @@ softmmu_ss.add(when: 'CONFIG_PTIMER', if_true: files('pti= mer.c')) softmmu_ss.add(when: 'CONFIG_REGISTER', if_true: files('register.c')) softmmu_ss.add(when: 'CONFIG_SPLIT_IRQ', if_true: files('split-irq.c')) softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c')) +softmmu_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c')) =20 softmmu_ss.add(files( 'cpu-sysemu.c', --=20 2.35.1