[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/25] hw/i386/pc_piix: Share pc_cmos_init() invocation between pc
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 08/25] hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc machines |
Date: |
Wed, 21 Feb 2024 22:16:08 +0100 |
From: Bernhard Beschow <shentey@gmail.com>
Both invocations are the same and either one is always executed. Avoid this
redundancy.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240208220349.4948-3-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_piix.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 999b7b806c..9064511507 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -341,11 +341,8 @@ static void pc_init1(MachineState *machine,
pc_nic_init(pcmc, isa_bus, pci_bus);
- if (pcmc->pci_enabled) {
- pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
- }
#ifdef CONFIG_IDE_ISA
- else {
+ if (!pcmc->pci_enabled) {
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
int i;
@@ -363,10 +360,11 @@ static void pc_init1(MachineState *machine,
busname[4] = '0' + i;
idebus[i] = qdev_get_child_bus(DEVICE(dev), busname);
}
- pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
}
#endif
+ pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
+
if (piix4_pm) {
smi_irq = qemu_allocate_irq(pc_acpi_smi_interrupt, first_cpu, 0);
--
2.41.0
- [PULL 00/25] Misc HW patches for 2024-02-21, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 01/25] hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 02/25] hw/sysbus: Inline and remove sysbus_add_io(), Philippe Mathieu-Daudé, 2024/02/21
- [PULL 03/25] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 05/25] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 04/25] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 06/25] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 08/25] hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc machines,
Philippe Mathieu-Daudé <=
- [PULL 09/25] hw/i386/pc: Store pointers to IDE buses in PCMachineState, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 07/25] hw/i2c/smbus_slave: Add object path on error prints, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 10/25] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done(), Philippe Mathieu-Daudé, 2024/02/21
- [PULL 11/25] hw/i386/x86: Turn apic_xrupt_override into class attribute, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 12/25] hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn(), Philippe Mathieu-Daudé, 2024/02/21
- [PULL 13/25] hw/i386/pc: Defer smbios_set_defaults() to machine_done, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 15/25] hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 16/25] hw/i386/pc_q35: Populate interrupt handlers before realizing LPC PCI function, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 17/25] hw/isa/meson.build: Sort alphabetically, Philippe Mathieu-Daudé, 2024/02/21