From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Zhao Liu <zhao1.liu@intel.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, "Igor Mammedov" <imammedo@redhat.com>,
"Xiaoyao Li" <xiaoyao.li@intel.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-riscv@nongnu.org, qemu-arm@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Artyom Tarasenko" <atar4qemu@gmail.com>
Subject: [PATCH-for-11.0 v6 08/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma()
Date: Wed, 3 Dec 2025 07:09:36 +0100 [thread overview]
Message-ID: <20251203060942.57851-9-philmd@linaro.org> (raw)
In-Reply-To: <20251203060942.57851-1-philmd@linaro.org>
Use fw_cfg_init_io_nodma() instead of open-coding it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/sparc64/sun4u.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 82c3e7c855b..6dc9f64b74d 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -683,14 +683,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
graphic_width, graphic_height, graphic_depth,
(uint8_t *)&macaddr);
- dev = qdev_new(TYPE_FW_CFG_IO);
- qdev_prop_set_bit(dev, "dma_enabled", false);
- object_property_add_child(OBJECT(ebus), TYPE_FW_CFG, OBJECT(dev));
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
- memory_region_add_subregion(pci_address_space_io(ebus), BIOS_CFG_IOPORT,
- &FW_CFG_IO(dev)->comb_iomem);
-
- fw_cfg = FW_CFG(dev);
+ fw_cfg = fw_cfg_init_io_nodma(pci_address_space_io(ebus), BIOS_CFG_IOPORT);
fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)machine->smp.cpus);
fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)machine->smp.max_cpus);
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)machine->ram_size);
--
2.51.0
next prev parent reply other threads:[~2025-12-03 6:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 6:09 [PATCH-for-11.0 v6 00/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma() Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 01/13] hw/ppc/mac: Use fw_cfg_init_mem_nodma() Philippe Mathieu-Daudé
2025-12-03 15:34 ` Zhao Liu
2025-12-03 6:09 ` [PATCH-for-11.0 v6 02/13] hw/sparc/sun4m: " Philippe Mathieu-Daudé
2025-12-03 15:35 ` Zhao Liu
2025-12-03 6:09 ` [PATCH-for-11.0 v6 03/13] hw/nvram/fw_cfg: Factor fw_cfg_init_mem_internal() out Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 04/13] hw/nvram/fw_cfg: Rename fw_cfg_init_mem_wide() -> fw_cfg_init_mem_dma() Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 05/13] hw/nvram/fw_cfg: Propagate I/O MemoryRegion to fw_cfg_init_io_dma() Philippe Mathieu-Daudé
2025-12-03 15:39 ` Zhao Liu
2025-12-03 17:13 ` Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 06/13] hw/nvram/fw_cfg: Factor fw_cfg_init_io_internal() out Philippe Mathieu-Daudé
2025-12-03 15:40 ` Zhao Liu
2025-12-03 6:09 ` [PATCH-for-11.0 v6 07/13] hw/nvram/fw_cfg: Add fw_cfg_init_io_nodma() helper Philippe Mathieu-Daudé
2025-12-03 15:41 ` Zhao Liu
2025-12-03 6:09 ` Philippe Mathieu-Daudé [this message]
2025-12-03 15:51 ` [PATCH-for-11.0 v6 08/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma() Zhao Liu
2025-12-03 17:14 ` Philippe Mathieu-Daudé
2025-12-04 2:01 ` Mark Cave-Ayland
2025-12-03 6:09 ` [PATCH-for-11.0 v6 09/13] hw/nvram/fw_cfg: Remove fw_cfg_io_properties::dma_enabled Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 10/13] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 11/13] hw/i386/pc: Remove multiboot.bin Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 12/13] hw/i386: Assume fw_cfg DMA is always enabled Philippe Mathieu-Daudé
2025-12-03 7:01 ` Philippe Mathieu-Daudé
2025-12-03 6:09 ` [PATCH-for-11.0 v6 13/13] hw/i386: Remove linuxboot.bin Philippe Mathieu-Daudé
2025-12-03 7:01 ` [PATCH-for-11.0 v6 00/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma() Philippe Mathieu-Daudé
2025-12-04 8:04 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251203060942.57851-9-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=atar4qemu@gmail.com \
--cc=imammedo@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=xiaoyao.li@intel.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).