From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 042/126] hw/isa/lpc_ich9: Eliminate ICH9LPCState::isa_bus
Date: Mon, 27 Feb 2023 15:00:49 +0100 [thread overview]
Message-ID: <20230227140213.35084-33-philmd@linaro.org> (raw)
In-Reply-To: <20230227140213.35084-1-philmd@linaro.org>
From: Bernhard Beschow <shentey@gmail.com>
By using qdev_get_child_bus() we can eliminate ICH9LPCState::isa_bus and
spare the ich9_lpc variable in pc_q35, too.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230213173033.98762-4-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_q35.c | 4 +---
hw/isa/lpc_ich9.c | 5 +----
include/hw/i386/ich9.h | 3 ---
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 5dfaeeed5f..5e3f7c7e86 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -132,7 +132,6 @@ static void pc_q35_init(MachineState *machine)
GSIState *gsi_state;
ISABus *isa_bus;
int i;
- ICH9LPCState *ich9_lpc;
PCIDevice *ahci;
ram_addr_t lowmem;
DriveInfo *hd[MAX_SATA_PORTS];
@@ -265,12 +264,11 @@ static void pc_q35_init(MachineState *machine)
/* irq lines */
gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled);
- ich9_lpc = ICH9_LPC_DEVICE(lpc);
lpc_dev = DEVICE(lpc);
for (i = 0; i < GSI_NUM_PINS; i++) {
qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]);
}
- isa_bus = ich9_lpc->isa_bus;
+ isa_bus = ISA_BUS(qdev_get_child_bus(lpc_dev, "isa.0"));
if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) {
pc_i8259_create(isa_bus, gsi_state->i8259_irq);
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 54a8839cd2..71f7c18a2e 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -710,8 +710,6 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp)
memory_region_init_io(&lpc->rcrb_mem, OBJECT(d), &rcrb_mmio_ops, lpc,
"lpc-rcrb-mmio", ICH9_CC_SIZE);
- lpc->isa_bus = isa_bus;
-
ich9_cc_init(lpc);
apm_init(d, &lpc->apm, ich9_apm_ctrl_changed, lpc);
@@ -818,8 +816,7 @@ static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
{
Aml *field;
- ICH9LPCState *s = ICH9_LPC_DEVICE(adev);
- BusState *bus = BUS(s->isa_bus);
+ BusState *bus = qdev_get_child_bus(DEVICE(adev), "isa.0");
Aml *sb_scope = aml_scope("\\_SB");
/* ICH9 PCI to ISA irq remapping */
diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
index 921e4c7ef6..05464f6965 100644
--- a/include/hw/i386/ich9.h
+++ b/include/hw/i386/ich9.h
@@ -1,7 +1,6 @@
#ifndef HW_ICH9_H
#define HW_ICH9_H
-#include "hw/isa/isa.h"
#include "hw/sysbus.h"
#include "hw/i386/pc.h"
#include "hw/isa/apm.h"
@@ -64,8 +63,6 @@ struct ICH9LPCState {
* triggers feature lockdown */
uint64_t smi_negotiated_features; /* guest-invisible, host endian */
- /* isa bus */
- ISABus *isa_bus;
MemoryRegion rcrb_mem; /* root complex register block */
Notifier machine_ready;
--
2.38.1
next prev parent reply other threads:[~2023-02-27 14:28 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 14:00 [RESEND PULL 000/126] Buildsys / QOM / QDev / UI patches for 2023-02-27 Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 011/126] target/hppa: Extract system helpers to sys_helper.c Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 012/126] target/alpha: Remove obsolete STATUS document Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 013/126] target/loongarch/cpu: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 014/126] target/loongarch/cpu: Restrict "memory.h" header to sysemu Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 015/126] target/ppc/internal: Restrict MMU declarations " Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 016/126] target/ppc/kvm: Remove unused "sysbus.h" header Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 017/126] target/ppc: Fix warning with clang-15 Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 018/126] target/riscv/cpu: Move Floating-Point fields closer Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 019/126] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 020/126] target/xtensa/cpu: Include missing "memory.h" header Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 021/126] target/tricore: Remove unused fields from CPUTriCoreState Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 022/126] qom/object_interfaces: Fix QAPI headers included Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 023/126] trace: Do not try to include QMP commands in user emulation binaries Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 024/126] exec: Remove unused 'qemu/timer.h' timer Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 025/126] tcg: Silent -Wmissing-field-initializers warning Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 026/126] tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 027/126] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 028/126] accel/xen: Remove dead code Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 029/126] accel/kvm: Silent -Wmissing-field-initializers warning Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 030/126] sysemu/kvm: Remove CONFIG_USER_ONLY guard Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 031/126] replay: Extract core API to 'exec/replay-core.h' Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 032/126] tests/unit: Restrict machine-smp.c test to system emulation Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 033/126] softmmu: Silent -Wmissing-field-initializers warning Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 034/126] softmmu: Extract watchpoint API from physmem.c Philippe Mathieu-Daudé
2023-03-23 8:54 ` Philippe Mathieu-Daudé
2023-03-23 9:00 ` David Hildenbrand
2023-02-27 14:00 ` [PULL 035/126] qemu/typedefs: Sort in case-insensitive alphabetical order (again) Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 036/126] hw/nubus/nubus-device: Fix memory leak in nubus_device_realize Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus() Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 038/126] hw/cpu: Extend CPUState::cluster_index documentation Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 039/126] hw/i386/x86: Reduce init_topo_info() scope Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 040/126] hw/i386/ich9: Rename Q35_MASK to ICH9_MASK Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 041/126] hw/isa/lpc_ich9: Unexport PIRQ functions Philippe Mathieu-Daudé
2023-02-27 14:00 ` Philippe Mathieu-Daudé [this message]
2023-02-27 14:00 ` [PULL 043/126] hw/i2c/smbus_ich9: Move ich9_smb_set_irq() in front of ich9_smbus_realize() Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 044/126] hw/i2c/smbus_ich9: Inline ich9_smb_init() and remove it Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 045/126] hw/i386/pc_q35: Allow for setting properties before realizing TYPE_ICH9_LPC_DEVICE Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 046/126] hw/isa/lpc_ich9: Connect PM stuff to LPC internally Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 047/126] hw/isa/lpc_ich9: Remove redundant ich9_lpc_reset() invocation Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 048/126] hw/i386/ich9: Remove redundant GSI_NUM_PINS Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 049/126] hw: Move ioapic*.h to intc/ Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 050/126] hw/i386/ich9: Clean up includes Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 051/126] hw: Move ich9.h to southbridge/ Philippe Mathieu-Daudé
2023-02-27 14:00 ` [PULL 052/126] hw/pci: Fix a typo Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 053/126] hw/intc/i8259: Document i8259_init() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 054/126] hw/isa/i82378: Rename output IRQ as 'cpu_intr' Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 055/126] hw/isa/i82378: Remove intermediate IRQ forwarder Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 056/126] hw/isa/vt82c686: " Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 057/126] hw/sparc64/sun4u: Keep reference to ISA input IRQs in EbusState Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 058/126] hw/isa: Remove empty ISADeviceClass structure Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 059/126] hw/isa: Reorder to separate ISABus* vs ISADevice* functions Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 060/126] hw/isa: Un-inline isa_bus_from_device() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 061/126] hw/isa: Rename isa_bus_irqs() -> isa_bus_register_input_irqs() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 062/126] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus' Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 063/126] hw/isa: Rename isa_get_dma() -> isa_bus_get_dma() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 064/126] hw/isa: Factor isa_bus_get_irq() out of isa_get_irq() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 065/126] hw: Replace isa_get_irq() by isa_bus_get_irq() when ISABus is available Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 066/126] hw/rtc/mc146818rtc: Rename RTCState -> MC146818RtcState Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 067/126] hw/rtc/mc146818rtc: Pass MC146818RtcState instead of ISADevice argument Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 068/126] hw/rtc: Rename rtc_[get|set]_memory -> mc146818rtc_[get|set]_cmos_data Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 069/126] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 070/126] hw/audio/hda-codec: Avoid forward-declaring HDAAudioState Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 071/126] hw/audio/es1370: Avoid forward-declaring ES1370State Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 072/126] hw/audio/es1370: Replace container_of() by ES1370() QOM cast macro Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 073/126] hw/audio/ac97: Replace container_of() by AC97() " Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 074/126] hw/audio/ac97: Split off some definitions to a header Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 075/126] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 076/126] hw/usb/u2f: Declare QOM macros using OBJECT_DECLARE_TYPE() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 077/126] hw/usb/ohci: Include missing 'sysbus.h' header Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 078/126] hw/usb/ohci: Use OHCIState type definition Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 079/126] hw/usb/ohci: Code style fix comments Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 080/126] hw/usb/ohci: Code style fix white space errors Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 081/126] hw/usb/ohci: Code style fix missing braces and extra parenthesis Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 082/126] hw/usb/ohci: Move a function next to where it is used Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 083/126] hw/usb/ohci: Add trace points for register access Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 084/126] hw/usb/ohci: Fix typo Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 085/126] hw/usb/uhci: Declare QOM macros using OBJECT_DECLARE_TYPE() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 086/126] hw/usb/uhci: Replace container_of() by UHCI_GET_CLASS() QOM macro Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 087/126] hw/usb/xhci-nec: Declare QOM macros for NEC_XHCI Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 088/126] hw/usb/xhci-nec: Replace container_of() by NEC_XHCI() QOM cast macro Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 089/126] hw/display/sm501: Embed OHCI QOM child in chipset Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 090/126] hw/display/sm501: Alias 'dma-offset' QOM property in chipset object Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 091/126] hw/display/sm501: Implement more 2D raster operations Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 092/126] hw/display/sm501: Add fallbacks to pixman routines Philippe Mathieu-Daudé
2023-04-04 17:44 ` Peter Maydell
2023-04-04 19:25 ` BALATON Zoltan
2023-04-04 20:12 ` Peter Maydell
2023-02-27 14:01 ` [PULL 093/126] hw/ppc/sam460ex: Correctly set MAL properties Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 094/126] block/vvfat: Remove pointless check of NDEBUG Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 095/126] scripts/checkpatch.pl: Do not allow assert(0) Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 096/126] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes" Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 097/126] hw/i386/xen: Remove unused 'hw/ide.h' include from header Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 098/126] hw/ide/ahci: Trace ncq write command as write instead of read Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 099/126] hw/ide/mmio: Use CamelCase for MMIO_IDE state name Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 100/126] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 101/126] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 102/126] hw/ide/isa: Remove intermediate ISAIDEState::irq variable Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 103/126] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 104/126] hw/ide: Remove unused 'qapi/qapi-types-run-state.h' Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 105/126] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h' Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 106/126] hw/ide: Un-inline ide_set_irq() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 107/126] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 108/126] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 109/126] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 110/126] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 111/126] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() Philippe Mathieu-Daudé
2023-02-27 14:01 ` [PULL 112/126] hw/ide: Rename idebus_active_if() -> ide_bus_active_if() Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 113/126] hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 114/126] hw/ide/ioport: Remove unnecessary includes Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 115/126] hw/ide/pci: Unexport bmdma_active_if() Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 116/126] hw/ide/piix: Remove unused includes Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 117/126] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 118/126] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 119/126] hw/ide/via: Replace magic 2 value by ARRAY_SIZE / MAX_IDE_DEVS Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 120/126] hw/ide/pci: Add PCIIDEState::isa_irq[] Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 121/126] dump: Replace tswapN() -> cpu_to_dumpN() Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 122/126] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size() Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 123/126] dump: Clean included headers Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 124/126] dump: Simplify compiling win_dump.o by introducing win_dump_available() Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 125/126] dump: Add create_win_dump() stub for non-x86 targets Philippe Mathieu-Daudé
2023-02-27 14:02 ` [PULL 126/126] ui/cocoa: user friendly characters for release mouse Philippe Mathieu-Daudé
2023-02-27 18:22 ` [RESEND PULL 000/126] Buildsys / QOM / QDev / UI patches for 2023-02-27 Peter Maydell
2023-02-27 21:26 ` Philippe Mathieu-Daudé
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=20230227140213.35084-33-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).