remove i386/pc dependency from non-PC world (part 1)
Subsystems (3)
cover remove i386/pc dependency from non-PC world (part 1)
Hi,
quite a bunch of patches and files modified, but the diffstat is not that big.
First part is from clean-includes script, Then comes code movement, about no logical changes.
Now some non-x86 builds and cocci spatch run a bit faster :)
I updated some MAINTAINERS entries while here.
Also I couldn't test the KVM/XEN/HAX part.
Regards,
Phil.
Philippe Mathieu-Daudé (34):
hw: use "qemu/osdep.h" as first #include in source files
hw: remove "qemu/osdep.h" from header files
block: remove "qemu/osdep.h" from header file
misc: remove headers implicitly included
misc: remove duplicated includes
ppc: remove duplicated includes
i386/hax: remove duplicated includes
nios2: remove duplicated includes
misc: avoid "include/" in include path
amd_iommu: avoid needless includes in header file i386/pc: use TYPE_PORT92
misc: remove old i386 dependency
hw/ide: remove old i386 dependency
hw/ipmi: remove old i386 dependency
hw/i2c: remove old i386 dependency
hw/tpm: remove old i386 dependency
hw/virtio-balloon: remove old i386 dependency hw/unicore32: restrict hw addr defines to source file hw/acpi: ACPI_PM_* defines are not restricted to i386 arch hw/timer/i8254: rename pit_init() -> i8254_pit_init() hw/display/vga: remove the old i386/pc dependency hw/input/i8042: extract API from hw/i386/pc.h hw/dma/i8257: rename DMA_init() to i8257_dma_init() hw/timer/mc146818: rename rtc_init() -> mc146818_init() hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h" hw/net/e1000: use TYPE_PCI_E1000
hw/net/e1000e: use TYPE_PCI_E1000E
hw/net/pcnet: use TYPE_PCI_PCNET
hw/net/rtl8139: use TYPE_PCI_RTL8139
hw/net/ne2000: use TYPE_PCI_NE2000
hw/alpha: remove old i386 dependency
misc: drop old i386 dependency
block/dmg.h | 1 -
hw/alpha/alpha_sys.h | 2 -
hw/audio/fmopl.h | 1 -
hw/display/vga_int.h | 3 +-
hw/display/{vga.h => vga_int_regs.h} | 0
hw/i386/amd_iommu.h | 5 --
hw/net/ne2000.h | 3 ++
hw/pci/pci_internal.h | 16 ++++++
include/hw/acpi/acpi.h | 12 +++++
include/hw/acpi/ipmi.h | 1 -
include/hw/cpu/core.h | 1 -
include/hw/display/vga.h | 25 ++++++++++
include/hw/{isa/i8257.h => dma/i8257_dma.h} | 6 +++
include/hw/i2c/ppc4xx_i2c.h | 1 -
include/hw/i386/pc.h | 56 ---------------------
include/hw/input/i8042.h | 30 +++++++++++
include/hw/isa/isa.h | 2 -
include/hw/net/ne2000-isa.h | 33 +++++++++++++
include/hw/net/pci.h | 26 ++++++++++
include/hw/pci/pci.h | 4 --
include/hw/timer/i8254.h | 5 +-
include/hw/timer/i8254_internal.h | 2 +-
include/hw/timer/m48t59.h | 2 +
include/hw/timer/mc146818rtc.h | 3 +-
include/hw/unicore32/puv3.h | 10 ----
include/sysemu/hax.h | 1 -
target/i386/hax-darwin.h | 3 --
target/i386/hax-windows.h | 2 -
target/nios2/cpu.h | 1 -
accel/tcg/translate-all.c | 1 -
bsd-user/main.c | 1 -
chardev/wctablet.c | 4 --
disas/nios2.c | 3 --
exec.c | 3 --
hw/acpi/ipmi-stub.c | 1 +
hw/alpha/dp264.c | 10 ++--
hw/alpha/pci.c | 2 +
hw/alpha/typhoon.c | 2 +-
hw/arm/realview.c | 3 +-
hw/arm/spitz.c | 1 -
hw/arm/versatilepb.c | 3 +-
hw/arm/virt.c | 1 +
hw/audio/fmopl.c | 1 -
hw/audio/pcspk.c | 1 -
hw/char/debugcon.c | 1 -
hw/char/xen_console.c | 1 -
hw/core/machine.c | 1 -
hw/cpu/core.c | 1 +
hw/display/vga-isa-mm.c | 4 +-
hw/display/vga-isa.c | 2 +-
hw/display/vga.c | 4 +-
hw/dma/i82374.c | 3 +-
hw/dma/i8257.c | 4 +-
hw/i2c/pm_smbus.c | 1 -
hw/i2c/smbus_ich9.c | 1 -
hw/i386/amd_iommu.c | 5 +-
hw/i386/kvm/pci-assign.c | 1 -
hw/i386/pc.c | 18 ++++---
hw/i386/pci-assign-load-rom.c | 1 -
hw/i386/xen/xen_platform.c | 1 -
hw/ide/ahci.c | 1 -
hw/ide/cmd646.c | 1 -
hw/ide/core.c | 3 +-
hw/ide/ich.c | 1 -
hw/ide/isa.c | 1 -
hw/ide/microdrive.c | 1 -
hw/ide/pci.c | 1 -
hw/ide/piix.c | 2 +-
hw/ide/via.c | 1 -
hw/input/adb.c | 2 +-
hw/input/pckbd.c | 2 +-
hw/input/vmmouse.c | 3 +-
hw/intc/lm32_pic.c | 1 -
hw/ipmi/isa_ipmi_bt.c | 1 -
hw/ipmi/isa_ipmi_kcs.c | 1 -
hw/isa/i82378.c | 5 +-
hw/isa/vt82c686.c | 1 -
hw/mips/mips_fulong2e.c | 13 +++--
hw/mips/mips_jazz.c | 9 ++--
hw/mips/mips_malta.c | 13 +++--
hw/mips/mips_r4k.c | 8 +--
hw/misc/ivshmem.c | 1 -
hw/misc/sga.c | 1 -
hw/misc/vmport.c | 1 +
hw/moxie/moxiesim.c | 1 -
hw/net/e1000e.c | 6 +--
hw/net/ne2000-isa.c | 6 +--
hw/net/ne2000.c | 5 +-
hw/net/pcnet-pci.c | 3 +-
hw/net/rtl8139.c | 7 ++-
hw/nios2/boot.c | 1 -
hw/pci-bridge/pci_expander_bridge.c | 1 -
hw/pci/pci.c | 67 +------------------------
hw/pci/pci_nic.c | 77 +++++++++++++++++++++++++++++
hw/ppc/e500.c | 1 +
hw/ppc/mac_newworld.c | 3 +-
hw/ppc/mac_oldworld.c | 3 +-
hw/ppc/pnv.c | 2 +-
hw/ppc/ppc440_bamboo.c | 3 +-
hw/ppc/prep.c | 13 +++--
hw/ppc/spapr.c | 1 +
hw/ppc/spapr_cpu_core.c | 1 +
hw/ppc/spapr_hcall.c | 1 -
hw/s390x/css.c | 1 -
hw/scsi/vhost-user-scsi.c | 1 -
hw/sh4/r2d.c | 5 +-
hw/smbios/smbios_type_38-stub.c | 1 +
hw/sparc/sun4m.c | 5 --
hw/sparc64/sun4u.c | 10 ++--
hw/ssi/aspeed_smc.c | 3 +-
hw/timer/i8254.c | 1 -
hw/timer/i8254_common.c | 1 -
hw/timer/m48t59-isa.c | 2 +-
hw/timer/mc146818rtc.c | 2 +-
hw/tpm/tpm_passthrough.c | 1 -
hw/tpm/tpm_tis.c | 1 -
hw/unicore32/puv3.c | 17 ++++---
hw/vfio/ccw.c | 2 +-
hw/virtio/vhost-vsock.c | 2 +-
hw/virtio/virtio-balloon.c | 2 +-
hw/watchdog/wdt_ib700.c | 1 -
linux-user/main.c | 1 -
monitor.c | 1 -
net/colo-compare.c | 1 -
numa.c | 1 -
target/i386/hax-darwin.c | 8 +--
target/nios2/helper.c | 7 +--
target/nios2/op_helper.c | 1 +
target/nios2/translate.c | 1 +
target/openrisc/exception_helper.c | 1 -
target/ppc/kvm.c | 3 --
tests/test-aio-multithread.c | 1 -
tests/test-clone-visitor.c | 1 -
tests/vhost-user-test.c | 1 -
tests/vmgenid-test.c | 3 --
util/qemu-sockets.c | 1 -
vl.c | 3 +-
hw/pci/Makefile.objs | 1 +
MAINTAINERS | 13 ++++-
139 files changed, 389 insertions(+), 337 deletions(-)
rename hw/display/{vga.h => vga_int_regs.h} (100%)
create mode 100644 hw/pci/pci_internal.h
create mode 100644 include/hw/display/vga.h
rename include/hw/{isa/i8257.h => dma/i8257_dma.h} (86%)
create mode 100644 include/hw/input/i8042.h
create mode 100644 include/hw/net/ne2000-isa.h
create mode 100644 include/hw/net/pci.h
create mode 100644 hw/pci/pci_nic.cSignature · 1 line
2.14.1
PATCH 1/34 hw: use "qemu/osdep.h" as first #include in source files
applied using ./scripts/clean-includes
--- hw/acpi/ipmi-stub.c | 1 + hw/audio/fmopl.c | 1 - hw/cpu/core.c | 1 + hw/ppc/spapr_cpu_core.c | 1 + hw/smbios/smbios_type_38-stub.c | 1 + hw/vfio/ccw.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- 7 files changed, 6 insertions(+), 3 deletions(-)
hw/acpi/ipmi-stub.c +1 -0
@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/acpi/ipmi.h" void build_acpi_ipmi_devices (Aml *table,BusState *bus)
hw/audio/fmopl.c +0 -1
@@ -34,7 +34,6 @@#include <math.h> //#include "driver.h" /* use M.A.M.E. */ #include "fmopl.h" -#include "qemu/osdep.h" #ifndef PI #define PI 3.14159265358979323846#endif
hw/cpu/core.c +1 -0
@@ -6,6 +6,7 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/cpu/core.h" #include "qapi/visitor.h" #include "qapi/error.h"
hw/ppc/spapr_cpu_core.c +1 -0
@@ -6,6 +6,7 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/cpu/core.h" #include "hw/ppc/spapr_cpu_core.h" #include "target/ppc/cpu.h"
hw/smbios/smbios_type_38-stub.c +1 -0
@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/smbios/ipmi.h" void smbios_build_type_38_table (void )
hw/vfio/ccw.c +1 -1
@@ -11,11 +11,11 @@* directory. */ +#include "qemu/osdep.h" #include <linux/vfio.h> #include <linux/vfio_ccw.h> #include <sys/ioctl.h> -#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/sysbus.h" #include "hw/vfio/vfio.h"
hw/virtio/vhost-vsock.c +1 -1
@@ -11,8 +11,8 @@* top-level directory. */ -#include <sys/ioctl.h> #include "qemu/osdep.h" +#include <sys/ioctl.h> #include "standard-headers/linux/virtio_vsock.h" #include "qapi/error.h" #include "hw/virtio/virtio-bus.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 01/34] hw: use "qemu/osdep.h" as first #include in source files
Quoted 13 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/acpi/ipmi-stub.c | 1 + hw/audio/fmopl.c | 1 - hw/cpu/core.c | 1 + hw/ppc/spapr_cpu_core.c | 1 + hw/smbios/smbios_type_38-stub.c | 1 + hw/vfio/ccw.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- 7 files changed, 6 insertions(+), 3 deletions(-)
thanks
-- PMM
Re: [Qemu-devel] [PATCH 01/34] hw: use "qemu/osdep.h" as first #include in source files
In reply to Philippe Mathieu-DaudéQuoted 3 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portion
Quoted 101 lines
--- hw/acpi/ipmi-stub.c | 1 + hw/audio/fmopl.c | 1 - hw/cpu/core.c | 1 + hw/ppc/spapr_cpu_core.c | 1 + hw/smbios/smbios_type_38-stub.c | 1 + hw/vfio/ccw.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- 7 files changed, 6 insertions(+), 3 deletions(-)hw/acpi/ipmi-stub.c +1
-0@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/acpi/ipmi.h" void build_acpi_ipmi_devices (Aml *table,BusState *bus)hw/audio/fmopl.c +0
-1@@ -34,7 +34,6 @@#include <math.h> //#include "driver.h" /* use M.A.M.E. */ #include "fmopl.h" -#include "qemu/osdep.h" #ifndef PI #define PI 3.14159265358979323846#endif hw/cpu/core.c +1
-0@@ -6,6 +6,7 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/cpu/core.h" #include "qapi/visitor.h" #include "qapi/error.h" hw/ppc/spapr_cpu_core.c +1
-0@@ -6,6 +6,7 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/cpu/core.h" #include "hw/ppc/spapr_cpu_core.h" #include "target/ppc/cpu.h" hw/smbios/smbios_type_38-stub.c +1
-0@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "hw/smbios/ipmi.h" void smbios_build_type_38_table (void )hw/vfio/ccw.c +1
-1@@ -11,11 +11,11 @@* directory. */ +#include "qemu/osdep.h" #include <linux/vfio.h> #include <linux/vfio_ccw.h> #include <sys/ioctl.h> -#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/sysbus.h" #include "hw/vfio/vfio.h" hw/virtio/vhost-vsock.c +1
-1@@ -11,8 +11,8 @@* top-level directory. */ -#include <sys/ioctl.h> #include "qemu/osdep.h" +#include <sys/ioctl.h> #include "standard-headers/linux/virtio_vsock.h" #include "qapi/error.h" #include "hw/virtio/virtio-bus.h"
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 01/34] hw: use "qemu/osdep.h" as first #include in source files
In reply to Philippe Mathieu-DaudéQuoted 21 lines · On Fri, 22 Sep 2017 12:39:41 -0300 Philippe Mathieu-Daudé <[email protected]>…
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/acpi/ipmi-stub.c | 1 + hw/audio/fmopl.c | 1 - hw/cpu/core.c | 1 + hw/ppc/spapr_cpu_core.c | 1 + hw/smbios/smbios_type_38-stub.c | 1 + hw/vfio/ccw.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- 7 files changed, 6 insertions(+), 3 deletions(-)hw/vfio/ccw.c +0
-0@@ -11,11 +11,11 @@* directory. */
hw/vfio/ccw.c line 21
Quoted 10 lines
hw/vfio/ccw.c +1
-1+#include "qemu/osdep.h" #include <linux/vfio.h> #include <linux/vfio_ccw.h> #include <sys/ioctl.h> -#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/sysbus.h" #include "hw/vfio/vfio.h"
PATCH 2/34 hw: remove "qemu/osdep.h" from header files
In reply to Philippe Mathieu-Daudéwhile here, add entries for ppc4xx_i2c in MAINTAINERS
applied using ./scripts/clean-includes
---
Zoltán you might want to add yourself a reviewer entry on ppc4xx :)
R: Balaton Zoltan <[email protected]>
include/hw/acpi/ipmi.h | 1 - include/hw/cpu/core.h | 1 - include/hw/i2c/ppc4xx_i2c.h | 1 - MAINTAINERS | 2 ++ 4 files changed, 2 insertions(+), 3 deletions(-)
include/hw/acpi/ipmi.h +0 -1
@@ -9,7 +9,6 @@#ifndef HW_ACPI_IPMI_H #define HW_ACPI_IPMI_H -#include "qemu/osdep.h" #include "hw/acpi/aml-build.h" /*
include/hw/cpu/core.h +0 -1
@@ -9,7 +9,6 @@#ifndef HW_CPU_CORE_H #define HW_CPU_CORE_H -#include "qemu/osdep.h" #include "hw/qdev.h" #define TYPE_CPU_CORE "cpu-core"
include/hw/i2c/ppc4xx_i2c.h +0 -1
@@ -25,7 +25,6 @@#ifndef PPC4XX_I2C_H #define PPC4XX_I2C_H -#include "qemu/osdep.h" #include "qemu-common.h" #include "hw/sysbus.h" #include "hw/i2c/i2c.h"
MAINTAINERS +2 -0
@@ -945,7 +945,9 @@ M: Alexander Graf <[email protected]> L: [email protected] S: Odd Fixes F: hw/ppc/ppc4*.c +F: hw/i2c/ppc4xx_i2c.c F: include/hw/ppc/ppc4xx.h +F: include/hw/i2c/ppc4xx_i2c.h ppce500 M: Alexander Graf <[email protected]>
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 02/34] hw: remove "qemu/osdep.h" from header files
Quoted 6 lines · Philippe Mathieu-Daudé
while here, add entries for
ppc4xx_i2cinMAINTAINERSapplied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
This is doing two things at once and would ideally be two patches. Still,
thanks
-- PMM
Re: [Qemu-devel] [PATCH 02/34] hw: remove "qemu/osdep.h" from header files
Quoted 9 lines · Peter Maydell
Quoted 6 lines · Philippe Mathieu-Daudé
while here, add entries for
ppc4xx_i2cinMAINTAINERSapplied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
This is doing two things at once and would ideally be two patches. Still,
I agree.
Quoted 1 line
Reviewed-by Peter Maydell <[email protected]>
I applied this series and did some basic testing, so
Quoted 3 lines
thanks
-- PMM
Re: [Qemu-trivial] [Qemu-devel] [PATCH 02/34] hw: remove "qemu/osdep.h" from header files
In reply to Peter MaydellQuoted 9 lines · Peter Maydell
Quoted 6 lines · Philippe Mathieu-Daudé
while here, add entries for
ppc4xx_i2cinMAINTAINERSapplied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
This is doing two things at once and would ideally be two patches. Still,
I agree.
Quoted 1 line
Reviewed-by Peter Maydell <[email protected]>
I applied this series and did some basic testing, so
Quoted 3 lines
thanks
-- PMM
Re: [Qemu-devel] [PATCH 02/34] hw: remove "qemu/osdep.h" from header files
In reply to Peter MaydellQuoted 10 lines · Peter Maydell
Quoted 6 lines · Philippe Mathieu-Daudé
while here, add entries for
ppc4xx_i2cinMAINTAINERSapplied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>---
This is doing two things at once and would ideally be two patches. Still,
OK I'll split "while here" patches.
Quoted 2 lines
Reviewed-by Peter Maydell <[email protected]>
Thanks!
PATCH 3/34 block: remove "qemu/osdep.h" from header file
In reply to Philippe Mathieu-Daudéapplied using ./scripts/clean-includes
--- block/dmg.h | 1 - 1 file changed, 1 deletion(-)
block/dmg.h +0 -1
@@ -26,7 +26,6 @@#ifndef BLOCK_DMG_H #define BLOCK_DMG_H -#include "qemu/osdep.h" #include "qemu-common.h" #include "block/block_int.h" #include <zlib.h>
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 03/34] block: remove "qemu/osdep.h" from header file
Quoted 12 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- block/dmg.h | 1 - 1 file changed, 1 deletion(-)block/dmg.h +0
-0
block/dmg.h
Quoted 8 lines
block/dmg.h +0
-2@@ -26,7 +26,6 @@#ifndef BLOCK_DMG_H #define BLOCK_DMG_H -#include "qemu/osdep.h" #include "qemu-common.h" #include "block/block_int.h" #include <zlib.h> --
thanks
-- PMM
PATCH 4/34 misc: remove headers implicitly included
In reply to Philippe Mathieu-Daudéapplied using ./scripts/clean-includes
--- hw/audio/fmopl.h | 1 - bsd-user/main.c | 1 - chardev/wctablet.c | 4 ---- hw/scsi/vhost-user-scsi.c | 1 - linux-user/main.c | 1 - net/colo-compare.c | 1 - tests/test-aio-multithread.c | 1 - tests/test-clone-visitor.c | 1 - tests/vmgenid-test.c | 3 --- 9 files changed, 14 deletions(-)
hw/audio/fmopl.h +0 -1
@@ -1,7 +1,6 @@#ifndef FMOPL_H #define FMOPL_H -#include <stdint.h> typedef void (*OPL_TIMERHANDLER )(void *param,int channel,double interval_Sec);
bsd-user/main.c +0 -1
@@ -32,7 +32,6 @@#include "qemu/envlist.h" #include "exec/log.h" #include "trace/control.h" -#include "glib-compat.h" int singlestep;unsigned long mmap_min_addr;
chardev/wctablet.c +0 -4
@@ -25,10 +25,6 @@* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <stdlib.h> -#include <string.h> -#include <sys/time.h> -#include <time.h> #include "qemu/osdep.h" #include "qemu-common.h"
hw/scsi/vhost-user-scsi.c +0 -1
@@ -18,7 +18,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "qemu/typedefs.h" #include "qom/object.h" #include "hw/fw-path-provider.h" #include "hw/qdev-core.h"
linux-user/main.c +0 -1
@@ -35,7 +35,6 @@#include "elf.h" #include "exec/log.h" #include "trace/control.h" -#include "glib-compat.h" char *exec_path;
net/colo-compare.c +0 -1
@@ -23,7 +23,6 @@#include "qom/object_interfaces.h" #include "qemu/iov.h" #include "qom/object.h" -#include "qemu/typedefs.h" #include "net/queue.h" #include "chardev/char-fe.h" #include "qemu/sockets.h"
tests/test-aio-multithread.c +0 -1
@@ -11,7 +11,6 @@*/ #include "qemu/osdep.h" -#include <glib.h> #include "block/aio.h" #include "qapi/error.h" #include "qemu/coroutine.h"
tests/test-clone-visitor.c +0 -1
@@ -8,7 +8,6 @@*/ #include "qemu/osdep.h" -#include <glib.h> #include "qemu-common.h" #include "qapi/clone-visitor.h"
tests/vmgenid-test.c +0 -3
@@ -8,9 +8,6 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> -#include <unistd.h> #include "qemu/osdep.h" #include "qemu/bitmap.h" #include "qemu/uuid.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 04/34] misc: remove headers implicitly included
Quoted 3 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>
thanks
-- PMM
Re: [Qemu-devel] [PATCH 04/34] misc: remove headers implicitly included
In reply to Philippe Mathieu-DaudéQuoted 14 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/audio/fmopl.h | 1 - bsd-user/main.c | 1 - chardev/wctablet.c | 4 ---- hw/scsi/vhost-user-scsi.c | 1 - linux-user/main.c | 1 - net/colo-compare.c | 1 - tests/test-aio-multithread.c | 1 - tests/test-clone-visitor.c | 1 - tests/vmgenid-test.c | 3 --- 9 files changed, 14 deletions(-)
PATCH 5/34 misc: remove duplicated includes
In reply to Philippe Mathieu-Daudéexec: housekeeping (funny since 02d0e095031)
applied using ./scripts/clean-includes
--- accel/tcg/translate-all.c | 1 - exec.c | 3 --- hw/arm/spitz.c | 1 - hw/char/xen_console.c | 1 - hw/core/machine.c | 1 - hw/s390x/css.c | 1 - target/openrisc/exception_helper.c | 1 - tests/vhost-user-test.c | 1 - util/qemu-sockets.c | 1 - vl.c | 1 - 10 files changed, 12 deletions(-)
accel/tcg/translate-all.c +0 -1
@@ -31,7 +31,6 @@#include "tcg.h" #if defined(CONFIG_USER_ONLY )#include "qemu.h" -#include "exec/exec-all.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)#include <sys/param.h> #if __FreeBSD_version >=700104
exec.c +0 -3
@@ -18,8 +18,6 @@*/ #include "qemu/osdep.h" #include "qapi/error.h" -#ifndef _WIN32 -#endif #include "qemu/cutils.h" #include "cpu.h"
@@ -51,7 +49,6 @@#include "trace-root.h" #ifdef CONFIG_FALLOCATE_PUNCH_HOLE -#include <fcntl.h> #include <linux/falloc.h> #endif
hw/arm/spitz.c +0 -1
@@ -29,7 +29,6 @@#include "sysemu/block-backend.h" #include "hw/sysbus.h" #include "exec/address-spaces.h" -#include "sysemu/sysemu.h" #include "cpu.h" #undef REG_FMT
hw/char/xen_console.c +0 -1
@@ -27,7 +27,6 @@#include "hw/hw.h" #include "chardev/char-fe.h" #include "hw/xen/xen_backend.h" -#include "qapi/error.h" #include <xen/io/console.h>
hw/core/machine.c +0 -1
@@ -20,7 +20,6 @@#include "sysemu/numa.h" #include "qemu/error-report.h" #include "qemu/cutils.h" -#include "sysemu/numa.h" #include "sysemu/qtest.h" static char *machine_get_accel (Object *obj,Error **errp)
hw/s390x/css.c +0 -1
@@ -13,7 +13,6 @@#include "qapi/error.h" #include "qapi/visitor.h" #include "hw/qdev.h" -#include "qemu/error-report.h" #include "qemu/bitops.h" #include "qemu/error-report.h" #include "exec/address-spaces.h"
target/openrisc/exception_helper.c +0 -1
@@ -21,7 +21,6 @@#include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" -#include "exec/exec-all.h" #include "exception.h" void HELPER (exception )(CPUOpenRISCState *env,uint32_t excp)
tests/vhost-user-test.c +0 -1
@@ -21,7 +21,6 @@#include "libqos/libqos.h" #include "libqos/pci-pc.h" #include "libqos/virtio-pci.h" -#include "qapi/error.h" #include "libqos/malloc-pc.h" #include "hw/virtio/virtio-net.h"
util/qemu-sockets.c +0 -1
@@ -26,7 +26,6 @@#include "qapi/error.h" #include "qemu/sockets.h" #include "qemu/main-loop.h" -#include "qapi/clone-visitor.h" #include "qapi/qobject-input-visitor.h" #include "qapi/qobject-output-visitor.h" #include "qapi-visit.h"
vl.c +0 -1
@@ -95,7 +95,6 @@ int main(int argc, char **argv)#include "sysemu/kvm.h" #include "sysemu/hax.h" #include "qapi/qobject-input-visitor.h" -#include "qapi/qobject-input-visitor.h" #include "qapi-visit.h" #include "qapi/qmp/qjson.h" #include "qemu/option.h"
Signature · 1 line
2.14.1
Re: [Qemu-arm] [PATCH 05/34] misc: remove duplicated includes
Quoted 5 lines · Philippe Mathieu-Daudé
exec: housekeeping (funny since
02d0e095031)applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 12 lines
--- accel/tcg/translate-all.c | 1 - exec.c | 3 --- hw/arm/spitz.c | 1 - hw/char/xen_console.c | 1 - hw/core/machine.c | 1 - hw/s390x/css.c | 1 - target/openrisc/exception_helper.c | 1 - tests/vhost-user-test.c | 1 - util/qemu-sockets.c | 1 - vl.c | 1 - 10 files changed, 12 deletions(-)
thanks
-- PMM
Re: [Qemu-arm] [PATCH 05/34] misc: remove duplicated includes
In reply to Philippe Mathieu-DaudéQuoted 23 lines · On Fri, 22 Sep 2017 12:39:45 -0300 Philippe Mathieu-Daudé <[email protected]>…
exec: housekeeping (funny since
02d0e095031)applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- accel/tcg/translate-all.c | 1 - exec.c | 3 --- hw/arm/spitz.c | 1 - hw/char/xen_console.c | 1 - hw/core/machine.c | 1 - hw/s390x/css.c | 1 - target/openrisc/exception_helper.c | 1 - tests/vhost-user-test.c | 1 - util/qemu-sockets.c | 1 - vl.c | 1 - 10 files changed, 12 deletions(-)hw/s390x/css.c +0
-0
hw/s390x/css.c line 18
Quoted 7 lines
hw/s390x/css.c +0
-1@@ -13,7 +13,6 @@#include "qapi/error.h" #include "qapi/visitor.h" #include "hw/qdev.h" -#include "qemu/error-report.h" #include "qemu/bitops.h" #include "qemu/error-report.h" #include "exec/address-spaces.h"
Re: [Qemu-devel] [PATCH 05/34] misc: remove duplicated includes
In reply to Philippe Mathieu-DaudéQuoted 5 lines · Philippe Mathieu-Daudé
exec: housekeeping (funny since
02d0e095031)applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 13 lines
--- accel/tcg/translate-all.c | 1 - exec.c | 3 --- hw/arm/spitz.c | 1 - hw/char/xen_console.c | 1 - hw/core/machine.c | 1 - hw/s390x/css.c | 1 - target/openrisc/exception_helper.c | 1 - tests/vhost-user-test.c | 1 - util/qemu-sockets.c | 1 - vl.c | 1 - 10 files changed, 12 deletions(-)
Signature · 1 line
Anthony PERARD
PATCH 6/34 ppc: remove duplicated includes
In reply to Philippe Mathieu-Daudéapplied using ./scripts/clean-includes
not needed since 7ebaf795560
--- hw/ppc/spapr_hcall.c | 1 - target/ppc/kvm.c | 3 --- 2 files changed, 4 deletions(-)
hw/ppc/spapr_hcall.c +0 -1
@@ -13,7 +13,6 @@#include "trace.h" #include "kvm_ppc.h" #include "hw/ppc/spapr_ovec.h" -#include "qemu/error-report.h" #include "mmu-book3s-v3.h" struct SPRSyncState {
target/ppc/kvm.c +0 -3
@@ -47,9 +47,6 @@#include "sysemu/hostmem.h" #include "qemu/cutils.h" #include "qemu/mmap-alloc.h" -#if defined(TARGET_PPC64 ) -#include "hw/ppc/spapr_cpu_core.h" -#endif #include "elf.h" #include "sysemu/kvm_int.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 06/34] ppc: remove duplicated includes
Quoted 27 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesnot needed since
7ebaf795560Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/ppc/spapr_hcall.c | 1 - target/ppc/kvm.c | 3 --- 2 files changed, 4 deletions(-)hw/ppc/spapr_hcall.c +0
-1@@ -13,7 +13,6 @@#include "trace.h" #include "kvm_ppc.h" #include "hw/ppc/spapr_ovec.h" -#include "qemu/error-report.h" #include "mmu-book3s-v3.h" struct SPRSyncState {target/ppc/kvm.c +0
-0
target/ppc/kvm.c
Quoted 10 lines
target/ppc/kvm.c +0
-4@@ -47,9 +47,6 @@#include "sysemu/hostmem.h" #include "qemu/cutils.h" #include "qemu/mmap-alloc.h" -#if defined(TARGET_PPC64 ) -#include "hw/ppc/spapr_cpu_core.h" -#endif #include "elf.h" #include "sysemu/kvm_int.h" --
thanks
-- PMM
Re: [Qemu-devel] [PATCH 06/34] ppc: remove duplicated includes
In reply to Philippe Mathieu-DaudéQuoted 5 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesnot needed since
7ebaf795560Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 31 lines
--- hw/ppc/spapr_hcall.c | 1 - target/ppc/kvm.c | 3 --- 2 files changed, 4 deletions(-)hw/ppc/spapr_hcall.c +0
-1@@ -13,7 +13,6 @@#include "trace.h" #include "kvm_ppc.h" #include "hw/ppc/spapr_ovec.h" -#include "qemu/error-report.h" #include "mmu-book3s-v3.h" struct SPRSyncState {target/ppc/kvm.c +0
-3@@ -47,9 +47,6 @@#include "sysemu/hostmem.h" #include "qemu/cutils.h" #include "qemu/mmap-alloc.h" -#if defined(TARGET_PPC64 ) -#include "hw/ppc/spapr_cpu_core.h" -#endif #include "elf.h" #include "sysemu/kvm_int.h"
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 7/34 i386/hax: remove duplicated includes
In reply to Philippe Mathieu-Daudéapplied using ./scripts/clean-includes
--- include/sysemu/hax.h | 1 - target/i386/hax-darwin.h | 3 --- target/i386/hax-windows.h | 2 -- target/i386/hax-darwin.c | 8 ++------ 4 files changed, 2 insertions(+), 12 deletions(-)
include/sysemu/hax.h +0 -1
@@ -22,7 +22,6 @@#ifndef QEMU_HAX_H #define QEMU_HAX_H -#include "config-host.h" #include "qemu-common.h" int hax_sync_vcpus (void );
target/i386/hax-darwin.h +0 -3
@@ -15,10 +15,7 @@#ifndef TARGET_I386_HAX_DARWIN_H #define TARGET_I386_HAX_DARWIN_H -#include <sys/types.h> #include <sys/ioctl.h> -#include <sys/mman.h> -#include <stdarg.h> #define HAX_INVALID_FD (-1)static inline int hax_invalid_fd (hax_fd fd)
target/i386/hax-windows.h +0 -2
@@ -24,8 +24,6 @@#include <memory.h> #include <malloc.h> #include <winioctl.h> -#include <string.h> -#include <stdio.h> #include <windef.h> #define HAX_INVALID_FD INVALID_HANDLE_VALUE
target/i386/hax-darwin.c +2 -6
@@ -11,13 +11,9 @@*/ /* HAX module interface - darwin version */ -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/ioctl.h> -#include "qemu/osdep.h" +#include <sys/ioctl.h> +#include "target/i386/hax-i386.h" hax_fd hax_mod_open (void )
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 07/34] i386/hax: remove duplicated includes
Quoted 9 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- include/sysemu/hax.h | 1 - target/i386/hax-darwin.h | 3 --- target/i386/hax-windows.h | 2 -- target/i386/hax-darwin.c | 8 ++------ 4 files changed, 2 insertions(+), 12 deletions(-)
I suspect the includes in hax-windows.h could be trimmed a bit more (since we're guaranteed that if CONFIG_WIN32 then we've included sysemu/os-win32.h), but this is fine as it stands.
thanks
-- PMM
PATCH 8/34 nios2: remove duplicated includes
In reply to Philippe Mathieu-Daudéapplied using ./scripts/clean-includes
--- target/nios2/cpu.h | 1 - disas/nios2.c | 3 --- hw/nios2/boot.c | 1 - target/nios2/helper.c | 7 ++----- target/nios2/op_helper.c | 1 + target/nios2/translate.c | 1 + 6 files changed, 4 insertions(+), 10 deletions(-)
target/nios2/cpu.h +0 -1
@@ -20,7 +20,6 @@#ifndef CPU_NIOS2_H #define CPU_NIOS2_H -#include "qemu/osdep.h" #include "qemu-common.h" #define TARGET_LONG_BITS 32
disas/nios2.c +0 -3
@@ -1756,7 +1756,6 @@ extern const int nios2_num_r2_reg_range_mappings;#endif /* _NIOS2_H */ /*#include "sysdep.h" -#include <stdio.h> #include "opcode/nios2.h" */ /* Register string table */
@@ -2521,8 +2520,6 @@ const int nios2_num_r2_reg_range_mappings = 8;#include "dis-asm.h" #include "opcode/nios2.h" #include "libiberty.h" -#include <string.h> -#include <assert.h> */ /* No symbol table is available when this code runs out in an embedded system as when it is used for disassembler support in a monitor. */
hw/nios2/boot.c +0 -1
@@ -34,7 +34,6 @@#include "qemu/option.h" #include "qemu/config-file.h" #include "qemu/error-report.h" -#include "qemu-common.h" #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" #include "hw/loader.h"
target/nios2/helper.c +2 -5
@@ -18,12 +18,9 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ -#include <stdio.h> -#include <string.h> -#include <assert.h> - -#include "cpu.h" #include "qemu/osdep.h" + +#include "cpu.h" #include "qemu/host-utils.h" #include "qapi/error.h" #include "exec/exec-all.h"
target/nios2/op_helper.c +1 -0
@@ -18,6 +18,7 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h"
target/nios2/translate.c +1 -0
@@ -21,6 +21,7 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ +#include "qemu/osdep.h" #include "cpu.h" #include "tcg-op.h" #include "exec/exec-all.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 08/34] nios2: remove duplicated includes
Quoted 37 lines · Philippe Mathieu-Daudé
applied using
./scripts/clean-includesSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- target/nios2/cpu.h | 1 - disas/nios2.c | 3 --- hw/nios2/boot.c | 1 - target/nios2/helper.c | 7 ++----- target/nios2/op_helper.c | 1 + target/nios2/translate.c | 1 + 6 files changed, 4 insertions(+), 10 deletions(-)target/nios2/cpu.h +0
-1@@ -20,7 +20,6 @@#ifndef CPU_NIOS2_H #define CPU_NIOS2_H -#include "qemu/osdep.h" #include "qemu-common.h" #define TARGET_LONG_BITS 32disas/nios2.c +0
-1@@ -1756,7 +1756,6 @@ extern const int nios2_num_r2_reg_range_mappings;#endif /* _NIOS2_H */ /*#include "sysdep.h" -#include <stdio.h> #include "opcode/nios2.h" */ /* Register string table */
disas/nios2.c const int nios2_num_r2_reg_range_mappings = 8; · line 2523
Quoted 6 lines
disas/nios2.c +0
-2@@ -2521,8 +2520,6 @@ const int nios2_num_r2_reg_range_mappings = 8;#include "dis-asm.h" #include "opcode/nios2.h" #include "libiberty.h" -#include <string.h> -#include <assert.h> */
These are in commented out bits of code anyway, but I guess it doesn't hurt and it'll prevent the script complaining later.
Quoted 50 lines
disas/nios2.c +0
-0/* No symbol table is available when this code runs out in an embedded system as when it is used for disassembler support in a monitor. */ hw/nios2/boot.c +0
-1@@ -34,7 +34,6 @@#include "qemu/option.h" #include "qemu/config-file.h" #include "qemu/error-report.h" -#include "qemu-common.h" #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" #include "hw/loader.h" target/nios2/helper.c +2
-5@@ -18,12 +18,9 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ -#include <stdio.h> -#include <string.h> -#include <assert.h> - -#include "cpu.h" #include "qemu/osdep.h" + +#include "cpu.h" #include "qemu/host-utils.h" #include "qapi/error.h" #include "exec/exec-all.h" target/nios2/op_helper.c +1
-0@@ -18,6 +18,7 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ +#include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" target/nios2/translate.c +0
-0
target/nios2/translate.c line 27
Quoted 7 lines
target/nios2/translate.c +1
-0@@ -21,6 +21,7 @@* <http://www.gnu.org/licenses/lgpl-2.1.html> */ +#include "qemu/osdep.h" #include "cpu.h" #include "tcg-op.h" #include "exec/exec-all.h"
thanks
-- PMM
PATCH 9/34 misc: avoid "include/" in include path
In reply to Philippe Mathieu-Daudéwhile here, remove unused #include from aspeed_smc.h
--- hw/input/adb.c | 2 +- hw/ssi/aspeed_smc.c | 3 +-- numa.c | 1 - 3 files changed, 2 insertions(+), 4 deletions(-)
hw/input/adb.c +1 -1
@@ -24,8 +24,8 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/input/adb.h" +#include "hw/input/adb-keys.h" #include "ui/console.h" -#include "include/hw/input/adb-keys.h" #include "ui/input.h" #include "sysemu/sysemu.h"
hw/ssi/aspeed_smc.c +1 -2
@@ -26,8 +26,7 @@#include "hw/sysbus.h" #include "sysemu/sysemu.h" #include "qemu/log.h" -#include "include/qemu/error-report.h" -#include "exec/address-spaces.h" +#include "qemu/error-report.h" #include "hw/ssi/aspeed_smc.h"
numa.c +0 -1
@@ -29,7 +29,6 @@#include "qemu/bitmap.h" #include "qom/cpu.h" #include "qemu/error-report.h" -#include "include/exec/cpu-common.h" /* for RAM_ADDR_FMT */ #include "qapi-visit.h" #include "qapi/opts-visitor.h" #include "hw/boards.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 09/34] misc: avoid "include/" in include path
Quoted 50 lines · Philippe Mathieu-Daudé
while here, remove unused #include from
aspeed_smc.hSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/input/adb.c | 2 +- hw/ssi/aspeed_smc.c | 3 +-- numa.c | 1 - 3 files changed, 2 insertions(+), 4 deletions(-)hw/input/adb.c +1
-1@@ -24,8 +24,8 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/input/adb.h" +#include "hw/input/adb-keys.h" #include "ui/console.h" -#include "include/hw/input/adb-keys.h" #include "ui/input.h" #include "sysemu/sysemu.h" hw/ssi/aspeed_smc.c +1
-2@@ -26,8 +26,7 @@#include "hw/sysbus.h" #include "sysemu/sysemu.h" #include "qemu/log.h" -#include "include/qemu/error-report.h" -#include "exec/address-spaces.h" +#include "qemu/error-report.h" #include "hw/ssi/aspeed_smc.h" numa.c +0
-2@@ -29,7 +29,6 @@#include "qemu/bitmap.h" #include "qom/cpu.h" #include "qemu/error-report.h" -#include "include/exec/cpu-common.h" /* for RAM_ADDR_FMT */ #include "qapi-visit.h" #include "qapi/opts-visitor.h" #include "hw/boards.h" --
Quoted 1 line
2.14.1
"while here" usually indicates a patch should be split.
Otherwise
thanks
-- PMM
PATCH 10/34 amd_iommu: avoid needless includes in header file
In reply to Philippe Mathieu-Daudéinstead move them to the source file
--- hw/i386/amd_iommu.h | 5 ----- hw/i386/amd_iommu.c | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-)
hw/i386/amd_iommu.h +0 -5
@@ -23,11 +23,6 @@#include "hw/hw.h" #include "hw/pci/pci.h" -#include "hw/pci/msi.h" -#include "hw/sysbus.h" -#include "sysemu/dma.h" -#include "hw/i386/pc.h" -#include "hw/pci/pci_bus.h" #include "hw/i386/x86-iommu.h" /* Capability registers */
hw/i386/amd_iommu.c +4 -1
@@ -20,7 +20,10 @@* Cache implementation inspired by hw/i386/intel_iommu.c */ #include "qemu/osdep.h" -#include "hw/i386/amd_iommu.h" +#include "hw/i386/pc.h" +#include "hw/pci/msi.h" +#include "hw/pci/pci_bus.h" +#include "amd_iommu.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "trace.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 10/34] amd_iommu: avoid needless includes in header file
Quoted 7 lines · Philippe Mathieu-Daudé
instead move them to the source file
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i386/amd_iommu.h | 5 ----- hw/i386/amd_iommu.c | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-)
PATCH 11/34 i386/pc: use TYPE_PORT92
In reply to Philippe Mathieu-Daudé--- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
@@ -1577,7 +1577,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,qdev_prop_set_ptr (dev,"ps2_mouse" , i8042);qdev_init_nofail (dev); } - port92 =isa_create_simple (isa_bus,"port92" ); + port92 =isa_create_simple (isa_bus,TYPE_PORT92 );port92_init (port92, a20_line[1 ]);g_free (a20_line);
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 11/34] i386/pc: use TYPE_PORT92
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/i386/pc.c +0
-0
hw/i386/pc.c void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, · line 1582
Quoted 7 lines
hw/i386/pc.c +1
-1@@ -1577,7 +1577,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,qdev_prop_set_ptr (dev,"ps2_mouse" , i8042);qdev_init_nofail (dev); } - port92 =isa_create_simple (isa_bus,"port92" ); + port92 =isa_create_simple (isa_bus,TYPE_PORT92 );port92_init (port92, a20_line[1 ]);g_free (a20_line);
PATCH 12/34 misc: remove old i386 dependency
In reply to Philippe Mathieu-Daudé--- hw/audio/pcspk.c | 1 - hw/i386/kvm/pci-assign.c | 1 - hw/i386/pci-assign-load-rom.c | 1 - hw/i386/xen/xen_platform.c | 1 - hw/isa/vt82c686.c | 1 - hw/misc/ivshmem.c | 1 - hw/misc/sga.c | 1 - hw/pci-bridge/pci_expander_bridge.c | 1 - monitor.c | 1 - 9 files changed, 9 deletions(-)
hw/audio/pcspk.c +0 -1
@@ -24,7 +24,6 @@#include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "hw/audio/soundhw.h" #include "audio/audio.h"
hw/i386/kvm/pci-assign.c +0 -1
@@ -25,7 +25,6 @@#include <linux/kvm.h> #include "qapi/error.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "qemu/error-report.h" #include "ui/console.h" #include "hw/loader.h"
hw/i386/pci-assign-load-rom.c +0 -1
@@ -4,7 +4,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "qemu/error-report.h" #include "ui/console.h" #include "hw/loader.h"
hw/i386/xen/xen_platform.c +0 -1
@@ -26,7 +26,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/ide.h" #include "hw/pci/pci.h" #include "hw/irq.h"
hw/isa/vt82c686.c +0 -1
@@ -12,7 +12,6 @@#include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/vt82c686.h" #include "hw/i2c/i2c.h" #include "hw/i2c/smbus.h"
hw/misc/ivshmem.c +0 -1
@@ -20,7 +20,6 @@#include "qapi/error.h" #include "qemu/cutils.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h"
hw/misc/sga.c +0 -1
@@ -26,7 +26,6 @@*/ #include "qemu/osdep.h" #include "hw/pci/pci.h" -#include "hw/i386/pc.h" #include "hw/loader.h" #include "sysemu/sysemu.h"
hw/pci-bridge/pci_expander_bridge.c +0 -1
@@ -16,7 +16,6 @@#include "hw/pci/pci_bus.h" #include "hw/pci/pci_host.h" #include "hw/pci/pci_bridge.h" -#include "hw/i386/pc.h" #include "qemu/range.h" #include "qemu/error-report.h" #include "sysemu/numa.h"
monitor.c +0 -1
@@ -28,7 +28,6 @@#include "hw/hw.h" #include "monitor/qdev.h" #include "hw/usb.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "sysemu/watchdog.h" #include "hw/loader.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 12/34] misc: remove old i386 dependency
Quoted 12 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/audio/pcspk.c | 1 - hw/i386/kvm/pci-assign.c | 1 - hw/i386/pci-assign-load-rom.c | 1 - hw/i386/xen/xen_platform.c | 1 - hw/isa/vt82c686.c | 1 - hw/misc/ivshmem.c | 1 - hw/misc/sga.c | 1 - hw/pci-bridge/pci_expander_bridge.c | 1 - monitor.c | 1 - 9 files changed, 9 deletions(-)
Re: [Qemu-devel] [PATCH 12/34] misc: remove old i386 dependency
In reply to Philippe Mathieu-DaudéQuoted 13 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/audio/pcspk.c | 1 - hw/i386/kvm/pci-assign.c | 1 - hw/i386/pci-assign-load-rom.c | 1 - hw/i386/xen/xen_platform.c | 1 - hw/isa/vt82c686.c | 1 - hw/misc/ivshmem.c | 1 - hw/misc/sga.c | 1 - hw/pci-bridge/pci_expander_bridge.c | 1 - monitor.c | 1 - 9 files changed, 9 deletions(-)
Signature · 1 line
Anthony PERARD
PATCH 13/34 hw/ide: remove old i386 dependency
In reply to Philippe Mathieu-Daudéand remove a duplicated include
--- hw/ide/ahci.c | 1 - hw/ide/cmd646.c | 1 - hw/ide/core.c | 3 +-- hw/ide/ich.c | 1 - hw/ide/isa.c | 1 - hw/ide/microdrive.c | 1 - hw/ide/pci.c | 1 - hw/ide/piix.c | 2 +- hw/ide/via.c | 1 - 9 files changed, 2 insertions(+), 10 deletions(-)
hw/ide/ahci.c +0 -1
@@ -24,7 +24,6 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/pci/msi.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "qemu/error-report.h"
hw/ide/cmd646.c +0 -1
@@ -24,7 +24,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" #include "sysemu/block-backend.h"
hw/ide/core.c +1 -2
@@ -24,17 +24,16 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" #include "qemu/error-report.h" #include "qemu/timer.h" #include "sysemu/sysemu.h" +#include "sysemu/blockdev.h" #include "sysemu/dma.h" #include "hw/block/block.h" #include "sysemu/block-backend.h" #include "qemu/cutils.h" -#include "qemu/error-report.h" #include "hw/ide/internal.h" #include "trace.h"
hw/ide/ich.c +0 -1
@@ -63,7 +63,6 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/pci/msi.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" #include "sysemu/block-backend.h"
hw/ide/isa.c +0 -1
@@ -24,7 +24,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "sysemu/block-backend.h" #include "sysemu/dma.h"
hw/ide/microdrive.c +0 -1
@@ -24,7 +24,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pcmcia.h" #include "sysemu/block-backend.h" #include "sysemu/dma.h"
hw/ide/pci.c +0 -1
@@ -24,7 +24,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" #include "sysemu/block-backend.h"
hw/ide/piix.c +1 -1
@@ -25,11 +25,11 @@#include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" #include "sysemu/block-backend.h" #include "sysemu/sysemu.h" +#include "sysemu/blockdev.h" #include "sysemu/dma.h" #include "hw/ide/pci.h"
hw/ide/via.c +0 -1
@@ -25,7 +25,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" #include "sysemu/block-backend.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 13/34] hw/ide: remove old i386 dependency
Quoted 3 lines · Philippe Mathieu-Daudé
and remove a duplicated include
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
PATCH 14/34 hw/ipmi: remove old i386 dependency
In reply to Philippe Mathieu-Daudé--- hw/ipmi/isa_ipmi_bt.c | 1 - hw/ipmi/isa_ipmi_kcs.c | 1 - 2 files changed, 2 deletions(-)
hw/ipmi/isa_ipmi_bt.c +0 -1
@@ -26,7 +26,6 @@#include "hw/hw.h" #include "hw/ipmi/ipmi.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" /* Control register */ #define IPMI_BT_CLR_WR_BIT 0
hw/ipmi/isa_ipmi_kcs.c +0 -1
@@ -26,7 +26,6 @@#include "hw/hw.h" #include "hw/ipmi/ipmi.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" #define IPMI_KCS_OBF_BIT 0#define IPMI_KCS_IBF_BIT 1
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 14/34] hw/ipmi: remove old i386 dependency
Quoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
As mentioned before, I applied this series and did some basic testing, so
Quoted 29 lines
--- hw/ipmi/isa_ipmi_bt.c | 1 - hw/ipmi/isa_ipmi_kcs.c | 1 - 2 files changed, 2 deletions(-)hw/ipmi/isa_ipmi_bt.c +0
-1@@ -26,7 +26,6 @@#include "hw/hw.h" #include "hw/ipmi/ipmi.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" /* Control register */ #define IPMI_BT_CLR_WR_BIT 0hw/ipmi/isa_ipmi_kcs.c +0
-1@@ -26,7 +26,6 @@#include "hw/hw.h" #include "hw/ipmi/ipmi.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" #define IPMI_KCS_OBF_BIT 0#define IPMI_KCS_IBF_BIT 1
PATCH 15/34 hw/i2c: remove old i386 dependency
In reply to Philippe Mathieu-Daudé--- hw/i2c/pm_smbus.c | 1 - hw/i2c/smbus_ich9.c | 1 - 2 files changed, 2 deletions(-)
hw/i2c/pm_smbus.c +0 -1
@@ -19,7 +19,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/i2c/pm_smbus.h" #include "hw/i2c/smbus.h"
hw/i2c/smbus_ich9.c +0 -1
@@ -26,7 +26,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/i2c/pm_smbus.h" #include "hw/pci/pci.h" #include "sysemu/sysemu.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 15/34] hw/i2c: remove old i386 dependency
Quoted 6 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i2c/pm_smbus.c | 1 - hw/i2c/smbus_ich9.c | 1 - 2 files changed, 2 deletions(-)
PATCH 16/34 hw/tpm: remove old i386 dependency
In reply to Philippe Mathieu-Daudé--- hw/tpm/tpm_passthrough.c | 1 - hw/tpm/tpm_tis.c | 1 - 2 files changed, 2 deletions(-)
hw/tpm/tpm_passthrough.c +0 -1
@@ -29,7 +29,6 @@#include "sysemu/tpm_backend.h" #include "tpm_int.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "sysemu/tpm_backend_int.h" #include "tpm_tis.h" #include "tpm_util.h"
hw/tpm/tpm_tis.c +0 -1
@@ -28,7 +28,6 @@#include "sysemu/block-backend.h" #include "exec/address-spaces.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci_ids.h" #include "tpm_tis.h" #include "qapi/error.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 16/34] hw/tpm: remove old i386 dependency
Quoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 29 lines
--- hw/tpm/tpm_passthrough.c | 1 - hw/tpm/tpm_tis.c | 1 - 2 files changed, 2 deletions(-)hw/tpm/tpm_passthrough.c +0
-1@@ -29,7 +29,6 @@#include "sysemu/tpm_backend.h" #include "tpm_int.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "sysemu/tpm_backend_int.h" #include "tpm_tis.h" #include "tpm_util.h" hw/tpm/tpm_tis.c +0
-1@@ -28,7 +28,6 @@#include "sysemu/block-backend.h" #include "exec/address-spaces.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/pci/pci_ids.h" #include "tpm_tis.h" #include "qapi/error.h"
PATCH 17/34 hw/virtio-balloon: remove old i386 dependency
In reply to Philippe Mathieu-Daudé--- hw/virtio/virtio-balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/virtio/virtio-balloon.c +1 -1
@@ -18,7 +18,7 @@#include "qemu/timer.h" #include "qemu-common.h" #include "hw/virtio/virtio.h" -#include "hw/i386/pc.h" +#include "hw/mem/pc-dimm.h" #include "sysemu/balloon.h" #include "hw/virtio/virtio-balloon.h" #include "sysemu/kvm.h"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 17/34] hw/virtio-balloon: remove old i386 dependency
Quoted 11 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/virtio/virtio-balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/virtio/virtio-balloon.c +0
-0
hw/virtio/virtio-balloon.c line 24
Quoted 8 lines
hw/virtio/virtio-balloon.c +1
-1@@ -18,7 +18,7 @@#include "qemu/timer.h" #include "qemu-common.h" #include "hw/virtio/virtio.h" -#include "hw/i386/pc.h" +#include "hw/mem/pc-dimm.h" #include "sysemu/balloon.h" #include "hw/virtio/virtio-balloon.h" #include "sysemu/kvm.h"
PATCH 18/34 hw/unicore32: restrict hw addr defines to source file
In reply to Philippe Mathieu-Daudéand drop unused #includes
--- include/hw/unicore32/puv3.h | 10 ---------- hw/unicore32/puv3.c | 16 ++++++++++------ 2 files changed, 10 insertions(+), 16 deletions(-)
include/hw/unicore32/puv3.h +0 -10
@@ -14,16 +14,6 @@#define PUV3_REGS_OFFSET (0x1000)/* 4K is reasonable */ -/* PKUnity System bus (AHB): 0xc0000000 - 0xedffffff (640MB) */ -#define PUV3_DMA_BASE (0xc0200000)/* AHB-4 */ - -/* PKUnity Peripheral bus (APB): 0xee000000 - 0xefffffff (128MB) */ -#define PUV3_GPIO_BASE (0xee500000)/* APB-5 */ -#define PUV3_INTC_BASE (0xee600000)/* APB-6 */ -#define PUV3_OST_BASE (0xee800000)/* APB-8 */ -#define PUV3_PM_BASE (0xeea00000)/* APB-10 */ -#define PUV3_PS2_BASE (0xeeb00000)/* APB-11 */ -/* Hardware interrupts */ #define PUV3_IRQS_NR (32)
hw/unicore32/puv3.c +10 -6
@@ -11,16 +11,10 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "qemu-common.h" #include "cpu.h" #include "ui/console.h" -#include "elf.h" -#include "exec/address-spaces.h" -#include "hw/sysbus.h" #include "hw/boards.h" #include "hw/loader.h" -#include "hw/i386/pc.h" -#include "qemu/error-report.h" #include "sysemu/qtest.h" #undef DEBUG_PUV3
@@ -29,6 +23,16 @@#define KERNEL_LOAD_ADDR 0x03000000#define KERNEL_MAX_SIZE 0x00800000/* Just a guess */ +/* PKUnity System bus (AHB): 0xc0000000 - 0xedffffff (640MB) */ +#define PUV3_DMA_BASE (0xc0200000)/* AHB-4 */ + +/* PKUnity Peripheral bus (APB): 0xee000000 - 0xefffffff (128MB) */ +#define PUV3_GPIO_BASE (0xee500000)/* APB-5 */ +#define PUV3_INTC_BASE (0xee600000)/* APB-6 */ +#define PUV3_OST_BASE (0xee800000)/* APB-8 */ +#define PUV3_PM_BASE (0xeea00000)/* APB-10 */ +#define PUV3_PS2_BASE (0xeeb00000)/* APB-11 */ +static void puv3_intc_cpu_handler (void *opaque,int irq,int level) {UniCore32CPU *cpu = opaque;
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 18/34] hw/unicore32: restrict hw addr defines to source file
Quoted 58 lines · Philippe Mathieu-Daudé
and drop unused #includes
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/unicore32/puv3.h | 10 ---------- hw/unicore32/puv3.c | 16 ++++++++++------ 2 files changed, 10 insertions(+), 16 deletions(-)include/hw/unicore32/puv3.h +0
-10@@ -14,16 +14,6 @@#define PUV3_REGS_OFFSET (0x1000)/* 4K is reasonable */ -/* PKUnity System bus (AHB): 0xc0000000 - 0xedffffff (640MB) */ -#define PUV3_DMA_BASE (0xc0200000)/* AHB-4 */ - -/* PKUnity Peripheral bus (APB): 0xee000000 - 0xefffffff (128MB) */ -#define PUV3_GPIO_BASE (0xee500000)/* APB-5 */ -#define PUV3_INTC_BASE (0xee600000)/* APB-6 */ -#define PUV3_OST_BASE (0xee800000)/* APB-8 */ -#define PUV3_PM_BASE (0xeea00000)/* APB-10 */ -#define PUV3_PS2_BASE (0xeeb00000)/* APB-11 */ -/* Hardware interrupts */ #define PUV3_IRQS_NR (32)hw/unicore32/puv3.c +3
-6@@ -11,16 +11,10 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "qemu-common.h" #include "cpu.h" #include "ui/console.h" -#include "elf.h" -#include "exec/address-spaces.h" -#include "hw/sysbus.h" #include "hw/boards.h" #include "hw/loader.h" -#include "hw/i386/pc.h" -#include "qemu/error-report.h" #include "sysemu/qtest.h" #undef DEBUG_PUV3@@ -29,6 +23,16 @@#define KERNEL_LOAD_ADDR 0x03000000#define KERNEL_MAX_SIZE 0x00800000/* Just a guess */ +/* PKUnity System bus (AHB): 0xc0000000 - 0xedffffff (640MB) */ +#define PUV3_DMA_BASE (0xc0200000)/* AHB-4 */ +
hw/unicore32/puv3.c line 38
Quoted 10 lines
hw/unicore32/puv3.c +7
-0+/* PKUnity Peripheral bus (APB): 0xee000000 - 0xefffffff (128MB) */ +#define PUV3_GPIO_BASE (0xee500000)/* APB-5 */ +#define PUV3_INTC_BASE (0xee600000)/* APB-6 */ +#define PUV3_OST_BASE (0xee800000)/* APB-8 */ +#define PUV3_PM_BASE (0xeea00000)/* APB-10 */ +#define PUV3_PS2_BASE (0xeeb00000)/* APB-11 */ +static void puv3_intc_cpu_handler (void *opaque,int irq,int level) {UniCore32CPU *cpu = opaque;
PATCH 19/34 hw/acpi: ACPI_PM_* defines are not restricted to i386 arch
In reply to Philippe Mathieu-Daudé--- include/hw/acpi/acpi.h | 12 ++++++++++++ include/hw/i386/pc.h | 13 ------------- 2 files changed, 12 insertions(+), 13 deletions(-)
include/hw/acpi/acpi.h +12 -0
@@ -39,6 +39,18 @@#define ACPI_PM2_REGISTER_WIDTH 8#define ACPI_PM_TIMER_WIDTH 32 +/* PC-style peripherals (also used by other machines). */ +#define ACPI_PM_PROP_S3_DISABLED "disable_s3" +#define ACPI_PM_PROP_S4_DISABLED "disable_s4" +#define ACPI_PM_PROP_S4_VAL "s4_val" +#define ACPI_PM_PROP_SCI_INT "sci_int" +#define ACPI_PM_PROP_ACPI_ENABLE_CMD "acpi_enable_cmd" +#define ACPI_PM_PROP_ACPI_DISABLE_CMD "acpi_disable_cmd" +#define ACPI_PM_PROP_PM_IO_BASE "pm_io_base" +#define ACPI_PM_PROP_GPE0_BLK "gpe0_blk" +#define ACPI_PM_PROP_GPE0_BLK_LEN "gpe0_blk_len" +#define ACPI_PM_PROP_TCO_ENABLED "enable_tco" +/* PM Timer ticks per second (HZ) */ #define PM_TIMER_FREQUENCY 3579545
include/hw/i386/pc.h +0 -13
@@ -151,19 +151,6 @@ struct PCMachineClass {#define PC_MACHINE_CLASS (klass) \ OBJECT_CLASS_CHECK(PCMachineClass, (klass), TYPE_PC_MACHINE) -/* PC-style peripherals (also used by other machines). */ - -#define ACPI_PM_PROP_S3_DISABLED "disable_s3" -#define ACPI_PM_PROP_S4_DISABLED "disable_s4" -#define ACPI_PM_PROP_S4_VAL "s4_val" -#define ACPI_PM_PROP_SCI_INT "sci_int" -#define ACPI_PM_PROP_ACPI_ENABLE_CMD "acpi_enable_cmd" -#define ACPI_PM_PROP_ACPI_DISABLE_CMD "acpi_disable_cmd" -#define ACPI_PM_PROP_PM_IO_BASE "pm_io_base" -#define ACPI_PM_PROP_GPE0_BLK "gpe0_blk" -#define ACPI_PM_PROP_GPE0_BLK_LEN "gpe0_blk_len" -#define ACPI_PM_PROP_TCO_ENABLED "enable_tco" -/* parallel.c */ void parallel_hds_isa_init (ISABus *bus,int n);
Signature · 1 line
2.14.1
PATCH 20/34 hw/timer/i8254: rename pit_init() -> i8254_pit_init()
In reply to Philippe Mathieu-Daudé- add entry for i82378 in MAINTAINERS
- remove the old i386/pc dependency
--- include/hw/timer/i8254.h | 5 +++-- include/hw/timer/i8254_internal.h | 2 +- hw/alpha/dp264.c | 2 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/timer/i8254.c | 1 - hw/timer/i8254_common.c | 1 - MAINTAINERS | 1 + 12 files changed, 12 insertions(+), 12 deletions(-)
include/hw/timer/i8254.h +3 -2
@@ -26,6 +26,7 @@#define HW_I8254_H #include "hw/hw.h" +#include "hw/qdev.h" #include "hw/isa/isa.h" #define PIT_FREQ 1193182
@@ -48,8 +49,8 @@ typedef struct PITChannelInfo {#define TYPE_I8254 "isa-pit"#define TYPE_KVM_I8254 "kvm-pit" -static inline ISADevice *pit_init (ISABus *bus,int base,int isa_irq, -qemu_irq alt_irq) +static inline ISADevice *i8254_pit_init (ISABus *bus,int base,int isa_irq, +qemu_irq alt_irq) {DeviceState *dev;ISADevice *d;
include/hw/timer/i8254_internal.h +1 -1
@@ -26,8 +26,8 @@#define QEMU_I8254_INTERNAL_H #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" +#include "qemu/timer.h" typedef struct PITChannelState { int count; /* can be 65536 */
hw/alpha/dp264.c +1 -1
@@ -81,7 +81,7 @@ static void clipper_init(MachineState *machine)/* Since we have an SRM-compatible PALcode, use the SRM epoch. */ rtc_init (isa_bus,1900 , rtc_irq); -pit_init (isa_bus,0x40 ,0 ,NULL ); +i8254_pit_init (isa_bus,0x40 ,0 ,NULL );isa_create_simple (isa_bus,"i8042" );/* VGA setup. Don't bother loading the bios. */
hw/i386/pc.c +1 -1
@@ -1551,7 +1551,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,if (kvm_pit_in_kernel ()) { pit =kvm_pit_init (isa_bus,0x40 ); }else { - pit =pit_init (isa_bus,0x40 , pit_isa_irq, pit_alt_irq); + pit =i8254_pit_init (isa_bus,0x40 , pit_isa_irq, pit_alt_irq); }if (hpet) {/* connect PIT to output control line of the HPET */
hw/isa/i82378.c +1 -1
@@ -97,7 +97,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)isa_bus_irqs (isabus, s->i8259);/* 1 82C54 (pit) */ - isa =pit_init (isabus,0x40 ,0 ,NULL ); + isa =i8254_pit_init (isabus,0x40 ,0 ,NULL );/* speaker */ pcspk_init (isabus, isa);
hw/mips/mips_fulong2e.c +1 -1
@@ -363,7 +363,7 @@ static void mips_fulong2e_init(MachineState *machine)smbus_eeprom_init (smbus,1 , eeprom_spd,sizeof (eeprom_spd));/* init other devices */ - pit =pit_init (isa_bus,0x40 ,0 ,NULL ); + pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );DMA_init (isa_bus,0 );/* Super I/O */
hw/mips/mips_jazz.c +1 -1
@@ -222,7 +222,7 @@ static void mips_jazz_init(MachineState *machine, i8259 =i8259_init (isa_bus, env->irq[4 ]);isa_bus_irqs (isa_bus, i8259);DMA_init (isa_bus,0 ); - pit =pit_init (isa_bus,0x40 ,0 ,NULL ); + pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );pcspk_init (isa_bus, pit);/* Video card */
hw/mips/mips_malta.c +1 -1
@@ -1217,7 +1217,7 @@ void mips_malta_init(MachineState *machine) isa_get_irq(NULL, 9), NULL, 0, NULL);smbus_eeprom_init (smbus,8 , smbus_eeprom_buf, smbus_eeprom_size);g_free (smbus_eeprom_buf); - pit =pit_init (isa_bus,0x40 ,0 ,NULL ); + pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );DMA_init (isa_bus,0 );/* Super I/O */
hw/mips/mips_r4k.c +1 -1
@@ -280,7 +280,7 @@ void mips_r4k_init(MachineState *machine)rtc_init (isa_bus,2000 ,NULL ); - pit =pit_init (isa_bus,0x40 ,0 ,NULL ); + pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );serial_hds_isa_init (isa_bus,0 ,MAX_SERIAL_PORTS );
hw/timer/i8254.c +0 -1
@@ -23,7 +23,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "qemu/timer.h" #include "hw/timer/i8254.h"
hw/timer/i8254_common.c +0 -1
@@ -24,7 +24,6 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "qemu/timer.h" #include "hw/timer/i8254.h"
MAINTAINERS +1 -0
@@ -705,6 +705,7 @@ F: hw/ppc/prep.c F: hw/ppc/prep_systemio.c F: hw/ppc/rs6000_mc.c F: hw/pci-host/prep.[hc] +F: hw/isa/i82378.c F: hw/isa/pc87312.[hc] F: pc-bios/ppc_rom.bin
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 20/34] hw/timer/i8254: rename pit_init() -> i8254_pit_init()
Quoted 4 lines · Philippe Mathieu-Daudé
- add entry for i82378 in
MAINTAINERS
- remove the old i386/pc dependencySigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 15 lines
--- include/hw/timer/i8254.h | 5 +++-- include/hw/timer/i8254_internal.h | 2 +- hw/alpha/dp264.c | 2 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/timer/i8254.c | 1 - hw/timer/i8254_common.c | 1 - MAINTAINERS | 1 + 12 files changed, 12 insertions(+), 12 deletions(-)
PATCH 22/34 hw/input/i8042: extract API from hw/i386/pc.h
In reply to Philippe Mathieu-Daudé- include vmmouse
- add entries in MAINTAINERS (pckbd.c, i8042.h)
--- include/hw/i386/pc.h | 11 ----------- include/hw/input/i8042.h | 30 ++++++++++++++++++++++++++++++ hw/alpha/dp264.c | 3 ++- hw/i386/pc.c | 5 +++-- hw/input/pckbd.c | 2 +- hw/input/vmmouse.c | 3 +-- hw/mips/mips_fulong2e.c | 3 ++- hw/mips/mips_jazz.c | 1 + hw/mips/mips_malta.c | 3 ++- hw/mips/mips_r4k.c | 3 ++- hw/misc/vmport.c | 1 + hw/ppc/prep.c | 5 +++-- hw/sparc64/sun4u.c | 3 ++- hw/unicore32/puv3.c | 1 + MAINTAINERS | 4 +++- 15 files changed, 54 insertions(+), 24 deletions(-) create mode 100644 include/hw/input/i8042.h
include/hw/i386/pc.h +0 -11
@@ -193,17 +193,6 @@ static inline void vmport_init(ISABus *bus) }void vmport_register (unsigned char command,VMPortReadFunc *func,void *opaque); -void vmmouse_get_data (uint32_t *data); -void vmmouse_set_data (const uint32_t *data); - -/* pckbd.c */ -#define I8042_A20_LINE "a20" - -void i8042_mm_init (qemu_irq kbd_irq,qemu_irq mouse_irq, -MemoryRegion *region,ram_addr_t size, -hwaddr mask); -void i8042_isa_mouse_fake_event (void *opaque); -void i8042_setup_a20_line (ISADevice *dev,qemu_irq a20_out);/* pc.c */ extern int fd_bootchk;
include/hw/input/i8042.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* QEMU PS/2 Controller +* +* Copyright (c) 2003 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_INPUT_I8042_H +#define HW_INPUT_I8042_H + +#include "hw/hw.h" +#include "hw/isa/isa.h" + +#define TYPE_I8042 "i8042" + +#define I8042_A20_LINE "a20" + +void i8042_mm_init (qemu_irq kbd_irq,qemu_irq mouse_irq, +MemoryRegion *region,ram_addr_t size, +hwaddr mask); +void i8042_isa_mouse_fake_event (void *opaque); +void i8042_setup_a20_line (ISADevice *dev,qemu_irq a20_out); + +#define TYPE_VMMOUSE "vmmouse" + +void vmmouse_get_data (uint32_t *data); +void vmmouse_set_data (const uint32_t *data); + +#endif /* HW_INPUT_I8042_H */
hw/alpha/dp264.c +2 -1
@@ -19,6 +19,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/ide.h" #include "hw/timer/i8254.h" +#include "hw/input/i8042.h" #include "hw/char/serial.h" #include "qemu/cutils.h"
@@ -82,7 +83,7 @@ static void clipper_init(MachineState *machine)rtc_init (isa_bus,1900 , rtc_irq);i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );/* VGA setup. Don't bother loading the bios. */ pci_vga_init (pci_bus);
hw/i386/pc.c +3 -2
@@ -40,6 +40,7 @@#include "multiboot.h" #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" +#include "hw/input/i8042.h" #include "hw/audio/pcspk.h" #include "hw/pci/msi.h" #include "hw/sysbus.h"
@@ -1564,11 +1565,11 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,parallel_hds_isa_init (isa_bus,MAX_PARALLEL_PORTS ); a20_line =qemu_allocate_irqs (handle_a20_line_change, first_cpu,2 ); - i8042 =isa_create_simple (isa_bus,"i8042" ); + i8042 =isa_create_simple (isa_bus,TYPE_I8042 );i8042_setup_a20_line (i8042, a20_line[0 ]);if (!no_vmport) {vmport_init (isa_bus); - vmmouse =isa_try_create (isa_bus,"vmmouse" ); + vmmouse =isa_try_create (isa_bus,TYPE_VMMOUSE ); }else { vmmouse =NULL ; }
hw/input/pckbd.c +1 -1
@@ -26,6 +26,7 @@#include "hw/isa/isa.h" #include "hw/i386/pc.h" #include "hw/input/ps2.h" +#include "hw/input/i8042.h" #include "sysemu/sysemu.h" /* debug PC keyboard */
@@ -480,7 +481,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,qemu_register_reset (kbd_reset, s); } -#define TYPE_I8042 "i8042"#define I8042 (obj) OBJECT_CHECK(ISAKBDState, (obj), TYPE_I8042) typedef struct ISAKBDState {
hw/input/vmmouse.c +1 -2
@@ -24,7 +24,7 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "ui/console.h" -#include "hw/input/ps2.h" +#include "hw/input/i8042.h" #include "hw/i386/pc.h" #include "hw/qdev.h"
@@ -52,7 +52,6 @@#define DPRINTF (fmt, ...) do { } while (0)#endif -#define TYPE_VMMOUSE "vmmouse"#define VMMOUSE (obj) OBJECT_CHECK(VMMouseState, (obj), TYPE_VMMOUSE) typedef struct VMMouseState
hw/mips/mips_fulong2e.c +2 -1
@@ -42,6 +42,7 @@#include "hw/isa/vt82c686.h" #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" +#include "hw/input/i8042.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h"
@@ -367,7 +368,7 @@ static void mips_fulong2e_init(MachineState *machine)DMA_init (isa_bus,0 );/* Super I/O */ -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );rtc_init (isa_bus,2000 ,NULL );
hw/mips/mips_jazz.c +1 -0
@@ -41,6 +41,7 @@#include "hw/timer/i8254.h" #include "hw/display/vga.h" #include "hw/audio/pcspk.h" +#include "hw/input/i8042.h" #include "sysemu/block-backend.h" #include "hw/sysbus.h" #include "exec/address-spaces.h"
hw/mips/mips_malta.c +2 -1
@@ -45,6 +45,7 @@#include "hw/loader.h" #include "elf.h" #include "hw/timer/mc146818rtc.h" +#include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h"
@@ -1221,7 +1222,7 @@ void mips_malta_init(MachineState *machine)DMA_init (isa_bus,0 );/* Super I/O */ -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );rtc_init (isa_bus,2000 ,NULL );serial_hds_isa_init (isa_bus,0 ,2 );
hw/mips/mips_r4k.c +2 -1
@@ -27,6 +27,7 @@#include "hw/loader.h" #include "elf.h" #include "hw/timer/mc146818rtc.h" +#include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h"
@@ -295,7 +296,7 @@ void mips_r4k_init(MachineState *machine) hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]); -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 ); }static void mips_machine_init (MachineClass *mc)
hw/misc/vmport.c +1 -0
@@ -25,6 +25,7 @@#include "hw/hw.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" +#include "hw/input/i8042.h" #include "sysemu/hw_accel.h" #include "hw/qdev.h"
hw/ppc/prep.c +3 -2
@@ -41,6 +41,7 @@#include "hw/ide.h" #include "hw/loader.h" #include "hw/timer/mc146818rtc.h" +#include "hw/input/i8042.h" #include "hw/isa/pc87312.h" #include "sysemu/block-backend.h" #include "sysemu/arch_init.h"
@@ -643,7 +644,7 @@ static void ppc_prep_init(MachineState *machine) hd[2 * i], hd[2 * i + 1]); } -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 ); cpu =POWERPC_CPU (first_cpu); sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];
@@ -775,7 +776,7 @@ static void ibm_40p_init(MachineState *machine)/* add some more devices */ if (defaults_enabled ()) { -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 ); m48t59 =NVRAM (isa_create_simple (isa_bus,"isa-m48t59" )); dev =DEVICE (isa_create (isa_bus,"cs4231a" ));
hw/sparc64/sun4u.c +2 -1
@@ -31,6 +31,7 @@#include "hw/i386/pc.h" #include "hw/char/serial.h" #include "hw/timer/m48t59.h" +#include "hw/input/i8042.h" #include "hw/block/fdc.h" #include "net/net.h" #include "qemu/timer.h"
@@ -488,7 +489,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,pci_cmd646_ide_init (pci_bus, hd,1 ); -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );/* Floppy */ for (i =0 ; i <MAX_FD ; i++) {
hw/unicore32/puv3.c +1 -0
@@ -19,6 +19,7 @@#undef DEBUG_PUV3#include "hw/unicore32/puv3.h" +#include "hw/input/i8042.h" #define KERNEL_LOAD_ADDR 0x03000000#define KERNEL_MAX_SIZE 0x00800000/* Just a guess */
MAINTAINERS +3 -1
@@ -834,12 +834,13 @@ F: hw/misc/sga.c PC Chipset M: Michael S. Tsirkin <[email protected]> M: Paolo Bonzini <[email protected]> -S: Support +S: Supported F: hw/char/debugcon.c F: hw/char/parallel.c F: hw/char/serial* F: hw/dma/i8257* F: hw/i2c/pm_smbus.c +F: hw/input/pckbd.c F: hw/intc/apic* F: hw/intc/ioapic* F: hw/intc/i8259*
@@ -849,6 +850,7 @@ F: hw/timer/hpet* F: hw/timer/i8254* F: hw/timer/mc146818rtc* F: include/hw/i2c/pm_smbus.h +F: include/hw/input/i8042.h F: include/hw/timer/hpet.h F: include/hw/timer/i8254* F: include/hw/timer/mc146818rtc*
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 22/34] hw/input/i8042: extract API from hw/i386/pc.h
Quoted 21 lines · Philippe Mathieu-Daudé
- include vmmouse
- add entries inMAINTAINERS(pckbd.c,i8042.h)Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/i386/pc.h | 11 ----------- include/hw/input/i8042.h | 30 ++++++++++++++++++++++++++++++ hw/alpha/dp264.c | 3 ++- hw/i386/pc.c | 5 +++-- hw/input/pckbd.c | 2 +- hw/input/vmmouse.c | 3 +-- hw/mips/mips_fulong2e.c | 3 ++- hw/mips/mips_jazz.c | 1 + hw/mips/mips_malta.c | 3 ++- hw/mips/mips_r4k.c | 3 ++- hw/misc/vmport.c | 1 + hw/ppc/prep.c | 5 +++-- hw/sparc64/sun4u.c | 3 ++- hw/unicore32/puv3.c | 1 + MAINTAINERS | 4 +++- 15 files changed, 54 insertions(+), 24 deletions(-)
Quoted 1 line
create mode 100644
include/hw/input/i8042.h
Re: [Qemu-devel] [PATCH 22/34] hw/input/i8042: extract API from hw/i386/pc.h
In reply to Philippe Mathieu-DaudéQuoted 4 lines · Philippe Mathieu-Daudé
- include vmmouse
- add entries inMAINTAINERS(pckbd.c,i8042.h)Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portions
Quoted 342 lines
--- include/hw/i386/pc.h | 11 ----------- include/hw/input/i8042.h | 30 ++++++++++++++++++++++++++++++ hw/alpha/dp264.c | 3 ++- hw/i386/pc.c | 5 +++-- hw/input/pckbd.c | 2 +- hw/input/vmmouse.c | 3 +-- hw/mips/mips_fulong2e.c | 3 ++- hw/mips/mips_jazz.c | 1 + hw/mips/mips_malta.c | 3 ++- hw/mips/mips_r4k.c | 3 ++- hw/misc/vmport.c | 1 + hw/ppc/prep.c | 5 +++-- hw/sparc64/sun4u.c | 3 ++- hw/unicore32/puv3.c | 1 + MAINTAINERS | 4 +++- 15 files changed, 54 insertions(+), 24 deletions(-) create mode 100644 include/hw/input/i8042.hinclude/hw/i386/pc.h +0
-11@@ -193,17 +193,6 @@ static inline void vmport_init(ISABus *bus) }void vmport_register (unsigned char command,VMPortReadFunc *func,void *opaque); -void vmmouse_get_data (uint32_t *data); -void vmmouse_set_data (const uint32_t *data); - -/* pckbd.c */ -#define I8042_A20_LINE "a20" - -void i8042_mm_init (qemu_irq kbd_irq,qemu_irq mouse_irq, -MemoryRegion *region,ram_addr_t size, -hwaddr mask); -void i8042_isa_mouse_fake_event (void *opaque); -void i8042_setup_a20_line (ISADevice *dev,qemu_irq a20_out);/* pc.c */ extern int fd_bootchk;include/hw/input/i8042.h new file +30
-0@@ -0,0 +1,30 @@ +/* +* QEMU PS/2 Controller +* +* Copyright (c) 2003 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_INPUT_I8042_H +#define HW_INPUT_I8042_H + +#include "hw/hw.h" +#include "hw/isa/isa.h" + +#define TYPE_I8042 "i8042" + +#define I8042_A20_LINE "a20" + +void i8042_mm_init (qemu_irq kbd_irq,qemu_irq mouse_irq, +MemoryRegion *region,ram_addr_t size, +hwaddr mask); +void i8042_isa_mouse_fake_event (void *opaque); +void i8042_setup_a20_line (ISADevice *dev,qemu_irq a20_out); + +#define TYPE_VMMOUSE "vmmouse" + +void vmmouse_get_data (uint32_t *data); +void vmmouse_set_data (const uint32_t *data); + +#endif /* HW_INPUT_I8042_H */ hw/alpha/dp264.c +2
-1@@ -19,6 +19,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/ide.h" #include "hw/timer/i8254.h" +#include "hw/input/i8042.h" #include "hw/char/serial.h" #include "qemu/cutils.h" @@ -82,7 +83,7 @@ static void clipper_init(MachineState *machine)rtc_init (isa_bus,1900 , rtc_irq);i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );/* VGA setup. Don't bother loading the bios. */ pci_vga_init (pci_bus);hw/i386/pc.c +3
-2@@ -40,6 +40,7 @@#include "multiboot.h" #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" +#include "hw/input/i8042.h" #include "hw/audio/pcspk.h" #include "hw/pci/msi.h" #include "hw/sysbus.h" @@ -1564,11 +1565,11 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,parallel_hds_isa_init (isa_bus,MAX_PARALLEL_PORTS ); a20_line =qemu_allocate_irqs (handle_a20_line_change, first_cpu,2 ); - i8042 =isa_create_simple (isa_bus,"i8042" ); + i8042 =isa_create_simple (isa_bus,TYPE_I8042 );i8042_setup_a20_line (i8042, a20_line[0 ]);if (!no_vmport) {vmport_init (isa_bus); - vmmouse =isa_try_create (isa_bus,"vmmouse" ); + vmmouse =isa_try_create (isa_bus,TYPE_VMMOUSE ); }else { vmmouse =NULL ; }hw/input/pckbd.c +1
-1@@ -26,6 +26,7 @@#include "hw/isa/isa.h" #include "hw/i386/pc.h" #include "hw/input/ps2.h" +#include "hw/input/i8042.h" #include "sysemu/sysemu.h" /* debug PC keyboard */ @@ -480,7 +481,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,qemu_register_reset (kbd_reset, s); } -#define TYPE_I8042 "i8042"#define I8042 (obj) OBJECT_CHECK(ISAKBDState, (obj), TYPE_I8042) typedef struct ISAKBDState {hw/input/vmmouse.c +1
-2@@ -24,7 +24,7 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "ui/console.h" -#include "hw/input/ps2.h" +#include "hw/input/i8042.h" #include "hw/i386/pc.h" #include "hw/qdev.h" @@ -52,7 +52,6 @@#define DPRINTF (fmt, ...) do { } while (0)#endif -#define TYPE_VMMOUSE "vmmouse"#define VMMOUSE (obj) OBJECT_CHECK(VMMouseState, (obj), TYPE_VMMOUSE) typedef struct VMMouseStatehw/mips/mips_fulong2e.c +2
-1@@ -42,6 +42,7 @@#include "hw/isa/vt82c686.h" #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" +#include "hw/input/i8042.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" @@ -367,7 +368,7 @@ static void mips_fulong2e_init(MachineState *machine)DMA_init (isa_bus,0 );/* Super I/O */ -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );rtc_init (isa_bus,2000 ,NULL );hw/mips/mips_jazz.c +1
-0@@ -41,6 +41,7 @@#include "hw/timer/i8254.h" #include "hw/display/vga.h" #include "hw/audio/pcspk.h" +#include "hw/input/i8042.h" #include "sysemu/block-backend.h" #include "hw/sysbus.h" #include "exec/address-spaces.h" hw/mips/mips_malta.c +2
-1@@ -45,6 +45,7 @@#include "hw/loader.h" #include "elf.h" #include "hw/timer/mc146818rtc.h" +#include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" @@ -1221,7 +1222,7 @@ void mips_malta_init(MachineState *machine)DMA_init (isa_bus,0 );/* Super I/O */ -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );rtc_init (isa_bus,2000 ,NULL );serial_hds_isa_init (isa_bus,0 ,2 );hw/mips/mips_r4k.c +2
-1@@ -27,6 +27,7 @@#include "hw/loader.h" #include "elf.h" #include "hw/timer/mc146818rtc.h" +#include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" @@ -295,7 +296,7 @@ void mips_r4k_init(MachineState *machine) hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]); -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 ); }static void mips_machine_init (MachineClass *mc)hw/misc/vmport.c +1
-0@@ -25,6 +25,7 @@#include "hw/hw.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" +#include "hw/input/i8042.h" #include "sysemu/hw_accel.h" #include "hw/qdev.h" hw/ppc/prep.c +3
-2@@ -41,6 +41,7 @@#include "hw/ide.h" #include "hw/loader.h" #include "hw/timer/mc146818rtc.h" +#include "hw/input/i8042.h" #include "hw/isa/pc87312.h" #include "sysemu/block-backend.h" #include "sysemu/arch_init.h" @@ -643,7 +644,7 @@ static void ppc_prep_init(MachineState *machine) hd[2 * i], hd[2 * i + 1]); } -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 ); cpu =POWERPC_CPU (first_cpu); sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];@@ -775,7 +776,7 @@ static void ibm_40p_init(MachineState *machine)/* add some more devices */ if (defaults_enabled ()) { -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 ); m48t59 =NVRAM (isa_create_simple (isa_bus,"isa-m48t59" )); dev =DEVICE (isa_create (isa_bus,"cs4231a" ));hw/sparc64/sun4u.c +2
-1@@ -31,6 +31,7 @@#include "hw/i386/pc.h" #include "hw/char/serial.h" #include "hw/timer/m48t59.h" +#include "hw/input/i8042.h" #include "hw/block/fdc.h" #include "net/net.h" #include "qemu/timer.h" @@ -488,7 +489,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,pci_cmd646_ide_init (pci_bus, hd,1 ); -isa_create_simple (isa_bus,"i8042" ); +isa_create_simple (isa_bus,TYPE_I8042 );/* Floppy */ for (i =0 ; i <MAX_FD ; i++) {hw/unicore32/puv3.c +1
-0@@ -19,6 +19,7 @@#undef DEBUG_PUV3#include "hw/unicore32/puv3.h" +#include "hw/input/i8042.h" #define KERNEL_LOAD_ADDR 0x03000000#define KERNEL_MAX_SIZE 0x00800000/* Just a guess */ MAINTAINERS +3
-1@@ -834,12 +834,13 @@ F: hw/misc/sga.c PC Chipset M: Michael S. Tsirkin <[email protected]> M: Paolo Bonzini <[email protected]> -S: Support +S: Supported F: hw/char/debugcon.c F: hw/char/parallel.c F: hw/char/serial* F: hw/dma/i8257* F: hw/i2c/pm_smbus.c +F: hw/input/pckbd.c F: hw/intc/apic* F: hw/intc/ioapic* F: hw/intc/i8259*@@ -849,6 +850,7 @@ F: hw/timer/hpet* F: hw/timer/i8254* F: hw/timer/mc146818rtc* F: include/hw/i2c/pm_smbus.h +F: include/hw/input/i8042.h F: include/hw/timer/hpet.h F: include/hw/timer/i8254* F: include/hw/timer/mc146818rtc*
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 23/34 hw/dma/i8257: rename DMA_init() to i8257_dma_init()
In reply to Philippe Mathieu-Daudé- move the header from hw/isa/ to hw/dma/
- add entry for i82374 in MAINTAINERS
- remove the old i386/pc dependency
---
include/hw/{isa/i8257.h => dma/i8257_dma.h} | 6 ++++++
include/hw/isa/isa.h | 2 --
hw/dma/i82374.c | 3 ++-
hw/dma/i8257.c | 4 ++--
hw/i386/pc.c | 3 ++-
hw/mips/mips_fulong2e.c | 3 ++-
hw/mips/mips_jazz.c | 3 ++-
hw/mips/mips_malta.c | 3 ++-
hw/sparc/sun4m.c | 4 ----
hw/sparc64/sun4u.c | 4 ----
MAINTAINERS | 2 ++
11 files changed, 20 insertions(+), 17 deletions(-)
rename include/hw/{isa/i8257.h => dma/i8257_dma.h} (86%)include/hw/dma/i8257_dma.h renamed from include/hw/isa/i8257.h +6 -0
@@ -1,6 +1,10 @@ #ifndef HW_I8257_H #define HW_I8257_H +#include "hw/hw.h" +#include "hw/isa/isa.h" +#include "exec/ioport.h" + #define TYPE_I8257 "i8257" typedef struct I8257Regs {
@@ -40,4 +44,6 @@ typedef struct I8257State { PortioList portio_pageh; } I8257State; +void i8257_dma_init (ISABus *bus,int high_page_enable); +#endif
include/hw/isa/isa.h +0 -2
@@ -151,6 +151,4 @@ static inline ISABus *isa_bus_from_device(ISADevice *d) return ISA_BUS(qdev_get_parent_bus(DEVICE(d))); } -/* i8257.c */ -void DMA_init (ISABus *bus,int high_page_enable);#endif
hw/dma/i82374.c +2 -1
@@ -24,6 +24,7 @@#include "qemu/osdep.h" #include "hw/isa/isa.h" +#include "hw/dma/i8257_dma.h" #define TYPE_I82374 "i82374"#define I82374 (obj) OBJECT_CHECK(I82374State, (obj), TYPE_I82374)
@@ -123,7 +124,7 @@ static void i82374_realize(DeviceState *dev, Error **errp)portio_list_add (&s->port_list,isa_address_space_io (&s->parent_obj), s->iobase); -DMA_init (isa_bus_from_device (ISA_DEVICE (dev)),1 ); +i8257_dma_init (isa_bus_from_device (ISA_DEVICE (dev)),1 );memset (s->commands,0 ,sizeof (s->commands)); }
hw/dma/i8257.c +2 -2
@@ -24,7 +24,7 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/isa/isa.h" -#include "hw/isa/i8257.h" +#include "hw/dma/i8257_dma.h" #include "qemu/main-loop.h" #include "trace.h"
@@ -622,7 +622,7 @@ static void i8257_register_types(void)type_init (i8257_register_types) -void DMA_init(ISABus *bus, int high_page_enable) +void i8257_dma_init(ISABus *bus, int high_page_enable) {ISADevice *isa1, *isa2;DeviceState *d;
hw/i386/pc.c +2 -1
@@ -39,6 +39,7 @@#include "elf.h" #include "multiboot.h" #include "hw/timer/mc146818rtc.h" +#include "hw/dma/i8257_dma.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h" #include "hw/audio/pcspk.h"
@@ -1582,7 +1583,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,port92_init (port92, a20_line[1 ]);g_free (a20_line); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 );for (i =0 ; i <MAX_FD ; i++) { fd[i] =drive_get (IF_FLOPPY ,0 , i);
hw/mips/mips_fulong2e.c +2 -1
@@ -22,6 +22,7 @@#include "qapi/error.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257_dma.h" #include "hw/char/serial.h" #include "hw/block/fdc.h" #include "net/net.h"
@@ -365,7 +366,7 @@ static void mips_fulong2e_init(MachineState *machine)/* init other devices */ pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 );/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 );
hw/mips/mips_jazz.c +2 -1
@@ -27,6 +27,7 @@#include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257_dma.h" #include "hw/char/serial.h" #include "hw/isa/isa.h" #include "hw/block/fdc.h"
@@ -223,7 +224,7 @@ static void mips_jazz_init(MachineState *machine,/* ISA devices */ i8259 =i8259_init (isa_bus, env->irq[4 ]);isa_bus_irqs (isa_bus, i8259); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 ); pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );pcspk_init (isa_bus, pit);
hw/mips/mips_malta.c +2 -1
@@ -27,6 +27,7 @@#include "cpu.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257_dma.h" #include "hw/char/serial.h" #include "hw/block/fdc.h" #include "net/net.h"
@@ -1219,7 +1220,7 @@ void mips_malta_init(MachineState *machine)smbus_eeprom_init (smbus,8 , smbus_eeprom_buf, smbus_eeprom_size);g_free (smbus_eeprom_buf); pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 );/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 );
hw/sparc/sun4m.c +0 -4
@@ -101,10 +101,6 @@ struct sun4m_hwdef {uint8_t nvram_machine_id; }; -void DMA_init (ISABus *bus,int high_page_enable) -{ -} -static void fw_cfg_boot_set (void *opaque,const char *boot_device,Error **errp) {
hw/sparc64/sun4u.c +0 -4
@@ -86,10 +86,6 @@ typedef struct EbusState {MemoryRegion bar1; } EbusState; -void DMA_init (ISABus *bus,int high_page_enable) -{ -} -static void fw_cfg_boot_set (void *opaque,const char *boot_device,Error **errp) {
MAINTAINERS +2 -0
@@ -707,6 +707,7 @@ F: hw/ppc/rs6000_mc.c F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.[hc] +F: hw/dma/i82374.c F: pc-bios/ppc_rom.bin sPAPR
@@ -849,6 +850,7 @@ F: hw/misc/pc-testdev.c F: hw/timer/hpet* F: hw/timer/i8254* F: hw/timer/mc146818rtc* +F: include/hw/dma/i8257_dma.h F: include/hw/i2c/pm_smbus.h F: include/hw/input/i8042.h F: include/hw/timer/hpet.h
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 23/34] hw/dma/i8257: rename DMA_init() to i8257_dma_init()
Hi,
Quoted 39 lines · Philippe Mathieu-Daudé
- move the header from hw/isa/ to hw/dma/
- add entry for i82374 inMAINTAINERS
- remove the old i386/pc dependencySigned-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/{isa/i8257.h => dma/i8257_dma.h} | 6 ++++++ include/hw/isa/isa.h | 2 -- hw/dma/i82374.c | 3 ++- hw/dma/i8257.c | 4 ++-- hw/i386/pc.c | 3 ++- hw/mips/mips_fulong2e.c | 3 ++- hw/mips/mips_jazz.c | 3 ++- hw/mips/mips_malta.c | 3 ++- hw/sparc/sun4m.c | 4 ---- hw/sparc64/sun4u.c | 4 ---- MAINTAINERS | 2 ++ 11 files changed, 20 insertions(+), 17 deletions(-)rename
include/hw/{isa/i8257.h=>dma/i8257_dma.h} (86%)include/hw/dma/i8257_dma.h renamed from include/hw/isa/i8257.h +4
-0@@ -1,6 +1,10 @@ #ifndef HW_I8257_H #define HW_I8257_H +#include "hw/hw.h" +#include "hw/isa/isa.h" +#include "exec/ioport.h" + #define TYPE_I8257 "i8257" typedef struct I8257Regs {
include/hw/dma/i8257_dma.h typedef struct I8257State { · line 48
Quoted 5 lines
include/hw/dma/i8257_dma.h renamed from include/hw/isa/i8257.h +2
-0@@ -40,4 +44,6 @@ typedef struct I8257State {PortioList portio_pageh; } I8257State; +void i8257_dma_init (ISABus *bus,int high_page_enable); +
As you're changing the DMA_init prototype, can you add an Error **errp parameter, and pass &error_abort in each caller?
See http://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00262.html for more details
Hervé
Quoted 190 lines
include/hw/dma/i8257_dma.h renamed from include/hw/isa/i8257.h +0
-0#endif include/hw/isa/isa.h +0
-2@@ -151,6 +151,4 @@ static inline ISABus *isa_bus_from_device(ISADevice *d) return ISA_BUS(qdev_get_parent_bus(DEVICE(d))); } -/* i8257.c */ -void DMA_init (ISABus *bus,int high_page_enable);#endif hw/dma/i82374.c +2
-1@@ -24,6 +24,7 @@#include "qemu/osdep.h" #include "hw/isa/isa.h" +#include "hw/dma/i8257_dma.h" #define TYPE_I82374 "i82374"#define I82374 (obj) OBJECT_CHECK(I82374State, (obj), TYPE_I82374)@@ -123,7 +124,7 @@ static void i82374_realize(DeviceState *dev, Error **errp)portio_list_add (&s->port_list,isa_address_space_io (&s->parent_obj), s->iobase); -DMA_init (isa_bus_from_device (ISA_DEVICE (dev)),1 ); +i8257_dma_init (isa_bus_from_device (ISA_DEVICE (dev)),1 );memset (s->commands,0 ,sizeof (s->commands)); }hw/dma/i8257.c +2
-2@@ -24,7 +24,7 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/isa/isa.h" -#include "hw/isa/i8257.h" +#include "hw/dma/i8257_dma.h" #include "qemu/main-loop.h" #include "trace.h" @@ -622,7 +622,7 @@ static void i8257_register_types(void)type_init (i8257_register_types) -void DMA_init(ISABus *bus, int high_page_enable) +void i8257_dma_init(ISABus *bus, int high_page_enable) {ISADevice *isa1, *isa2;DeviceState *d;hw/i386/pc.c +2
-1@@ -39,6 +39,7 @@#include "elf.h" #include "multiboot.h" #include "hw/timer/mc146818rtc.h" +#include "hw/dma/i8257_dma.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h" #include "hw/audio/pcspk.h" @@ -1582,7 +1583,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,port92_init (port92, a20_line[1 ]);g_free (a20_line); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 );for (i =0 ; i <MAX_FD ; i++) { fd[i] =drive_get (IF_FLOPPY ,0 , i);hw/mips/mips_fulong2e.c +2
-1@@ -22,6 +22,7 @@#include "qapi/error.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257_dma.h" #include "hw/char/serial.h" #include "hw/block/fdc.h" #include "net/net.h" @@ -365,7 +366,7 @@ static void mips_fulong2e_init(MachineState *machine)/* init other devices */ pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 );/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 );hw/mips/mips_jazz.c +2
-1@@ -27,6 +27,7 @@#include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257_dma.h" #include "hw/char/serial.h" #include "hw/isa/isa.h" #include "hw/block/fdc.h" @@ -223,7 +224,7 @@ static void mips_jazz_init(MachineState *machine,/* ISA devices */ i8259 =i8259_init (isa_bus, env->irq[4 ]);isa_bus_irqs (isa_bus, i8259); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 ); pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );pcspk_init (isa_bus, pit);hw/mips/mips_malta.c +2
-1@@ -27,6 +27,7 @@#include "cpu.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/dma/i8257_dma.h" #include "hw/char/serial.h" #include "hw/block/fdc.h" #include "net/net.h" @@ -1219,7 +1220,7 @@ void mips_malta_init(MachineState *machine)smbus_eeprom_init (smbus,8 , smbus_eeprom_buf, smbus_eeprom_size);g_free (smbus_eeprom_buf); pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); -DMA_init (isa_bus,0 ); +i8257_dma_init (isa_bus,0 );/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 );hw/sparc/sun4m.c +0
-4@@ -101,10 +101,6 @@ struct sun4m_hwdef {uint8_t nvram_machine_id; }; -void DMA_init (ISABus *bus,int high_page_enable) -{ -} -static void fw_cfg_boot_set (void *opaque,const char *boot_device,Error **errp) {hw/sparc64/sun4u.c +0
-4@@ -86,10 +86,6 @@ typedef struct EbusState {MemoryRegion bar1; } EbusState; -void DMA_init (ISABus *bus,int high_page_enable) -{ -} -static void fw_cfg_boot_set (void *opaque,const char *boot_device,Error **errp) {MAINTAINERS +2
-0@@ -707,6 +707,7 @@ F: hw/ppc/rs6000_mc.c F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.[hc] +F: hw/dma/i82374.c F: pc-bios/ppc_rom.bin sPAPR@@ -849,6 +850,7 @@ F: hw/misc/pc-testdev.c F: hw/timer/hpet* F: hw/timer/i8254* F: hw/timer/mc146818rtc* +F: include/hw/dma/i8257_dma.h F: include/hw/i2c/pm_smbus.h F: include/hw/input/i8042.h F: include/hw/timer/hpet.h
Re: [Qemu-devel] [Qemu-trivial] [PATCH 23/34] hw/dma/i8257: rename DMA_init() to i8257_dma_init()
Quoted 1 line · Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit :
[...]
Quoted 6 lines
include/hw/dma/i8257_dma.h typedef struct I8257State { · line 48
Quoted 2 lines
include/hw/dma/i8257_dma.h renamed from include/hw/isa/i8257.h +2
-0+void i8257_dma_init (ISABus *bus,int high_page_enable); +As you're changing the
DMA_initprototype, can you add an Error **errp parameter, and pass&error_abortin each caller?See http://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00262.html for more details
If Eduardo doesn't have a patch ready I can do it.
Re: [Qemu-devel] [Qemu-trivial] [PATCH 23/34] hw/dma/i8257: rename DMA_init() to i8257_dma_init()
Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 1 line · Hervé Poussineau
Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit :
[...]
Quoted 6 lines
include/hw/dma/i8257_dma.h typedef struct I8257State { · line 48
Quoted 2 lines
include/hw/dma/i8257_dma.h renamed from include/hw/isa/i8257.h +2
-0+void i8257_dma_init (ISABus *bus,int high_page_enable); +As you're changing the
DMA_initprototype, can you add an Error **errp parameter, and pass&error_abortin each caller?
Quoted 4 lines
Quoted 2 lines
See http://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00262.html
for more detailsIf Eduardo doesn't have a patch ready I can do it.
Please go ahead.
You can also use my patch set (v2) for that as a base if you want.
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg08007.html
Signature · 2 lines
Eduardo Otubo Senior Software Engineer @ RedHat
PATCH 24/34 hw/timer/mc146818: rename rtc_init() -> mc146818_init()
In reply to Philippe Mathieu-Daudéand remove the old i386/pc dependency
--- include/hw/timer/mc146818rtc.h | 3 ++- hw/alpha/dp264.c | 2 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c | 3 ++- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/ppc/pnv.c | 2 +- hw/timer/mc146818rtc.c | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-)
include/hw/timer/mc146818rtc.h +2 -1
@@ -6,7 +6,8 @@#define TYPE_MC146818_RTC "mc146818rtc" -ISADevice *rtc_init (ISABus *bus,int base_year,qemu_irq intercept_irq); +ISADevice *mc146818_rtc_init (ISABus *bus,int base_year, +qemu_irq intercept_irq);void rtc_set_memory (ISADevice *dev,int addr,int val);int rtc_get_memory (ISADevice *dev,int addr);
hw/alpha/dp264.c +1 -1
@@ -80,7 +80,7 @@ static void clipper_init(MachineState *machine) clipper_pci_map_irq);/* Since we have an SRM-compatible PALcode, use the SRM epoch. */ -rtc_init (isa_bus,1900 , rtc_irq); +mc146818_rtc_init (isa_bus,1900 , rtc_irq);i8254_pit_init (isa_bus,0x40 ,0 ,NULL );isa_create_simple (isa_bus,TYPE_I8042 );
hw/i386/pc.c +1 -1
@@ -1545,7 +1545,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, rtc_irq =qdev_get_gpio_in (hpet,HPET_LEGACY_RTC_INT ); } } - *rtc_state =rtc_init (isa_bus,2000 , rtc_irq); + *rtc_state =mc146818_rtc_init (isa_bus,2000 , rtc_irq);qemu_register_boot_set (pc_boot_set, *rtc_state);
hw/isa/i82378.c +2 -1
@@ -21,6 +21,7 @@#include "hw/pci/pci.h" #include "hw/i386/pc.h" #include "hw/timer/i8254.h" +#include "hw/timer/mc146818rtc.h" #include "hw/audio/pcspk.h" #define TYPE_I82378 "i82378"
@@ -106,7 +107,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp) isa =isa_create_simple (isabus,"i82374" );/* timer */ -isa_create_simple (isabus,"mc146818rtc" ); +isa_create_simple (isabus,TYPE_MC146818_RTC ); }static void i82378_init (Object *obj)
hw/mips/mips_fulong2e.c +1 -1
@@ -371,7 +371,7 @@ static void mips_fulong2e_init(MachineState *machine)/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 ); -rtc_init (isa_bus,2000 ,NULL ); +mc146818_rtc_init (isa_bus,2000 ,NULL );serial_hds_isa_init (isa_bus,0 ,MAX_SERIAL_PORTS );parallel_hds_isa_init (isa_bus,1 );
hw/mips/mips_jazz.c +1 -1
@@ -295,7 +295,7 @@ static void mips_jazz_init(MachineState *machine,fdctrl_init_sysbus (qdev_get_gpio_in (rc4030,1 ),-1 ,0x80003000 , fds);/* Real time clock */ -rtc_init (isa_bus,1980 ,NULL ); +mc146818_rtc_init (isa_bus,1980 ,NULL );memory_region_init_io (rtc,NULL , &rtc_ops,NULL ,"rtc" ,0x1000 );memory_region_add_subregion (address_space,0x80004000 , rtc);
hw/mips/mips_malta.c +1 -1
@@ -1225,7 +1225,7 @@ void mips_malta_init(MachineState *machine)/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 ); -rtc_init (isa_bus,2000 ,NULL ); +mc146818_rtc_init (isa_bus,2000 ,NULL );serial_hds_isa_init (isa_bus,0 ,2 );parallel_hds_isa_init (isa_bus,1 );
hw/mips/mips_r4k.c +1 -1
@@ -279,7 +279,7 @@ void mips_r4k_init(MachineState *machine) i8259 =i8259_init (isa_bus, env->irq[2 ]);isa_bus_irqs (isa_bus, i8259); -rtc_init (isa_bus,2000 ,NULL ); +mc146818_rtc_init (isa_bus,2000 ,NULL ); pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );
hw/ppc/pnv.c +1 -1
@@ -647,7 +647,7 @@ static void ppc_powernv_init(MachineState *machine)serial_hds_isa_init (pnv->isa_bus,0 ,MAX_SERIAL_PORTS );/* Create an RTC ISA device too */ -rtc_init (pnv->isa_bus,2000 ,NULL ); +mc146818_rtc_init (pnv->isa_bus,2000 ,NULL );/* OpenPOWER systems use a IPMI SEL Event message to notify the * host to powerdown */
hw/timer/mc146818rtc.c +1 -1
@@ -997,7 +997,7 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)qdev_init_gpio_out (dev, &s->irq,1 ); } -ISADevice *rtc_init (ISABus *bus,int base_year,qemu_irq intercept_irq) +ISADevice *mc146818_rtc_init (ISABus *bus,int base_year,qemu_irq intercept_irq) {DeviceState *dev;ISADevice *isadev;
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 24/34] hw/timer/mc146818: rename rtc_init() -> mc146818_init()
Quoted 15 lines · Philippe Mathieu-Daudé
and remove the old i386/pc dependency
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/timer/mc146818rtc.h | 3 ++- hw/alpha/dp264.c | 2 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c | 3 ++- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/ppc/pnv.c | 2 +- hw/timer/mc146818rtc.c | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-)
Re: [Qemu-devel] [PATCH 24/34] hw/timer/mc146818: rename rtc_init() -> mc146818_init()
In reply to Philippe Mathieu-DaudéQuoted 3 lines · Philippe Mathieu-Daudé
and remove the old i386/pc dependency
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 152 lines
--- include/hw/timer/mc146818rtc.h | 3 ++- hw/alpha/dp264.c | 2 +- hw/i386/pc.c | 2 +- hw/isa/i82378.c | 3 ++- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/ppc/pnv.c | 2 +- hw/timer/mc146818rtc.c | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-)include/hw/timer/mc146818rtc.h +2
-1@@ -6,7 +6,8 @@#define TYPE_MC146818_RTC "mc146818rtc" -ISADevice *rtc_init (ISABus *bus,int base_year,qemu_irq intercept_irq); +ISADevice *mc146818_rtc_init (ISABus *bus,int base_year, +qemu_irq intercept_irq);void rtc_set_memory (ISADevice *dev,int addr,int val);int rtc_get_memory (ISADevice *dev,int addr);hw/alpha/dp264.c +1
-1@@ -80,7 +80,7 @@ static void clipper_init(MachineState *machine) clipper_pci_map_irq);/* Since we have an SRM-compatible PALcode, use the SRM epoch. */ -rtc_init (isa_bus,1900 , rtc_irq); +mc146818_rtc_init (isa_bus,1900 , rtc_irq);i8254_pit_init (isa_bus,0x40 ,0 ,NULL );isa_create_simple (isa_bus,TYPE_I8042 );hw/i386/pc.c +1
-1@@ -1545,7 +1545,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, rtc_irq =qdev_get_gpio_in (hpet,HPET_LEGACY_RTC_INT ); } } - *rtc_state =rtc_init (isa_bus,2000 , rtc_irq); + *rtc_state =mc146818_rtc_init (isa_bus,2000 , rtc_irq);qemu_register_boot_set (pc_boot_set, *rtc_state);hw/isa/i82378.c +2
-1@@ -21,6 +21,7 @@#include "hw/pci/pci.h" #include "hw/i386/pc.h" #include "hw/timer/i8254.h" +#include "hw/timer/mc146818rtc.h" #include "hw/audio/pcspk.h" #define TYPE_I82378 "i82378"@@ -106,7 +107,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp) isa =isa_create_simple (isabus,"i82374" );/* timer */ -isa_create_simple (isabus,"mc146818rtc" ); +isa_create_simple (isabus,TYPE_MC146818_RTC ); }static void i82378_init (Object *obj)hw/mips/mips_fulong2e.c +1
-1@@ -371,7 +371,7 @@ static void mips_fulong2e_init(MachineState *machine)/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 ); -rtc_init (isa_bus,2000 ,NULL ); +mc146818_rtc_init (isa_bus,2000 ,NULL );serial_hds_isa_init (isa_bus,0 ,MAX_SERIAL_PORTS );parallel_hds_isa_init (isa_bus,1 );hw/mips/mips_jazz.c +1
-1@@ -295,7 +295,7 @@ static void mips_jazz_init(MachineState *machine,fdctrl_init_sysbus (qdev_get_gpio_in (rc4030,1 ),-1 ,0x80003000 , fds);/* Real time clock */ -rtc_init (isa_bus,1980 ,NULL ); +mc146818_rtc_init (isa_bus,1980 ,NULL );memory_region_init_io (rtc,NULL , &rtc_ops,NULL ,"rtc" ,0x1000 );memory_region_add_subregion (address_space,0x80004000 , rtc);hw/mips/mips_malta.c +1
-1@@ -1225,7 +1225,7 @@ void mips_malta_init(MachineState *machine)/* Super I/O */ isa_create_simple (isa_bus,TYPE_I8042 ); -rtc_init (isa_bus,2000 ,NULL ); +mc146818_rtc_init (isa_bus,2000 ,NULL );serial_hds_isa_init (isa_bus,0 ,2 );parallel_hds_isa_init (isa_bus,1 );hw/mips/mips_r4k.c +1
-1@@ -279,7 +279,7 @@ void mips_r4k_init(MachineState *machine) i8259 =i8259_init (isa_bus, env->irq[2 ]);isa_bus_irqs (isa_bus, i8259); -rtc_init (isa_bus,2000 ,NULL ); +mc146818_rtc_init (isa_bus,2000 ,NULL ); pit =i8254_pit_init (isa_bus,0x40 ,0 ,NULL );hw/ppc/pnv.c +1
-1@@ -647,7 +647,7 @@ static void ppc_powernv_init(MachineState *machine)serial_hds_isa_init (pnv->isa_bus,0 ,MAX_SERIAL_PORTS );/* Create an RTC ISA device too */ -rtc_init (pnv->isa_bus,2000 ,NULL ); +mc146818_rtc_init (pnv->isa_bus,2000 ,NULL );/* OpenPOWER systems use a IPMI SEL Event message to notify the * host to powerdown */ hw/timer/mc146818rtc.c +1
-1@@ -997,7 +997,7 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)qdev_init_gpio_out (dev, &s->irq,1 ); } -ISADevice *rtc_init (ISABus *bus,int base_year,qemu_irq intercept_irq) +ISADevice *mc146818_rtc_init (ISABus *bus,int base_year,qemu_irq intercept_irq) {DeviceState *dev;ISADevice *isadev;
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 25/34 hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS
In reply to Philippe Mathieu-Daudé--- include/hw/timer/m48t59.h | 2 ++ hw/ppc/prep.c | 2 +- hw/timer/m48t59-isa.c | 2 +- MAINTAINERS | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-)
include/hw/timer/m48t59.h +2 -0
@@ -25,6 +25,8 @@ typedef struct NvramClass {void (*toggle_lock)(Nvram *obj,int lock); } NvramClass; +#define TYPE_M48T59_ISA "isa-m48t59" +Nvram *m48t59_init_isa (ISABus *bus,uint32_t io_base,uint16_t size,int base_year,int type); Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
hw/ppc/prep.c +1 -1
@@ -777,7 +777,7 @@ static void ibm_40p_init(MachineState *machine)/* add some more devices */ if (defaults_enabled ()) {isa_create_simple (isa_bus,TYPE_I8042 ); - m48t59 =NVRAM (isa_create_simple (isa_bus,"isa-m48t59" )); + m48t59 =NVRAM (isa_create_simple (isa_bus,TYPE_M48T59_ISA )); dev =DEVICE (isa_create (isa_bus,"cs4231a" ));qdev_prop_set_uint32 (dev,"iobase" ,0x830 );
hw/timer/m48t59-isa.c +1 -1
@@ -49,7 +49,7 @@ typedef struct M48txxISADeviceClass {static M48txxInfo m48txx_isa_info[] = { { - .bus_name ="isa-m48t59" , + .bus_name =TYPE_M48T59_ISA , .model =59 , .size =0x2000 , }
MAINTAINERS +2 -0
@@ -708,6 +708,8 @@ F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.[hc] F: hw/dma/i82374.c +F: hw/timer/m48t59-isa.c +F: include/hw/timer/m48t59.h F: pc-bios/ppc_rom.bin sPAPR
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 25/34] hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS
Quoted 7 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/timer/m48t59.h | 2 ++ hw/ppc/prep.c | 2 +- hw/timer/m48t59-isa.c | 2 +- MAINTAINERS | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-)
Re: [Qemu-devel] [PATCH 25/34] hw/timer/m48t59: use TYPE_M48T59_ISA, add entries to MAINTAINERS
In reply to Philippe Mathieu-DaudéQuoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portion
Quoted 59 lines
--- include/hw/timer/m48t59.h | 2 ++ hw/ppc/prep.c | 2 +- hw/timer/m48t59-isa.c | 2 +- MAINTAINERS | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-)include/hw/timer/m48t59.h +2
-0@@ -25,6 +25,8 @@ typedef struct NvramClass {void (*toggle_lock)(Nvram *obj,int lock); } NvramClass; +#define TYPE_M48T59_ISA "isa-m48t59" +Nvram *m48t59_init_isa (ISABus *bus,uint32_t io_base,uint16_t size,int base_year,int type); Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,hw/ppc/prep.c +1
-1@@ -777,7 +777,7 @@ static void ibm_40p_init(MachineState *machine)/* add some more devices */ if (defaults_enabled ()) {isa_create_simple (isa_bus,TYPE_I8042 ); - m48t59 =NVRAM (isa_create_simple (isa_bus,"isa-m48t59" )); + m48t59 =NVRAM (isa_create_simple (isa_bus,TYPE_M48T59_ISA )); dev =DEVICE (isa_create (isa_bus,"cs4231a" ));qdev_prop_set_uint32 (dev,"iobase" ,0x830 );hw/timer/m48t59-isa.c +1
-1@@ -49,7 +49,7 @@ typedef struct M48txxISADeviceClass {static M48txxInfo m48txx_isa_info[] = { { - .bus_name ="isa-m48t59" , + .bus_name =TYPE_M48T59_ISA , .model =59 , .size =0x2000 , }MAINTAINERS +2
-0@@ -708,6 +708,8 @@ F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.[hc] F: hw/dma/i82374.c +F: hw/timer/m48t59-isa.c +F: include/hw/timer/m48t59.h F: pc-bios/ppc_rom.bin sPAPR
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 26/34 hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c
In reply to Philippe Mathieu-Daudé- add "hw/net/ne2000-isa.h" (and new entry in MAINTAINERS)
- remove the old i386 dependency
--- hw/net/ne2000.h | 3 +++ include/hw/i386/pc.h | 20 -------------------- include/hw/net/ne2000-isa.h | 33 +++++++++++++++++++++++++++++++++ hw/i386/pc.c | 1 + hw/mips/mips_r4k.c | 1 + hw/net/ne2000-isa.c | 6 ++---- hw/net/ne2000.c | 2 -- hw/ppc/prep.c | 1 + MAINTAINERS | 1 + 9 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 include/hw/net/ne2000-isa.h
hw/net/ne2000.h +3 -0
@@ -1,6 +1,9 @@#ifndef HW_NE2000_H #define HW_NE2000_H +#include "hw/hw.h" +#include "net/net.h" +#define NE2000_PMEM_SIZE (32*1024)#define NE2000_PMEM_START (16*1024)#define NE2000_PMEM_END (NE2000_PMEM_SIZE+NE2000_PMEM_START)
include/hw/i386/pc.h +0 -20
@@ -291,26 +291,6 @@ PCIBus *find_i440fx(void);extern PCIDevice *piix4_dev;int piix4_init (PCIBus *bus,ISABus **isa_bus,int devfn); -/* ne2000.c */ -static inline bool isa_ne2000_init (ISABus *bus,int base,int irq,NICInfo *nd) -{ -DeviceState *dev; -ISADevice *isadev; - -qemu_check_nic_model (nd,"ne2k_isa" ); - - isadev =isa_try_create (bus,"ne2k_isa" ); -if (!isadev) { -return false; - } - dev =DEVICE (isadev); -qdev_prop_set_uint32 (dev,"iobase" , base); -qdev_prop_set_uint32 (dev,"irq" , irq); -qdev_set_nic_properties (dev, nd); -qdev_init_nofail (dev); -return true; -} -/* pc_sysfw.c */ void pc_system_firmware_init (MemoryRegion *rom_memory,bool isapc_ram_fw);
include/hw/net/ne2000-isa.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* QEMU NE2000 emulation -- isa bus windup +* +* Copyright (c) 2003-2004 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" +#include "hw/qdev.h" +#include "hw/isa/isa.h" +#include "net/net.h" + +#define TYPE_ISA_NE2000 "ne2k_isa" + +static inline ISADevice *isa_ne2000_init (ISABus *bus,int base,int irq, +NICInfo *nd) +{ +ISADevice *d; + +qemu_check_nic_model (nd,"ne2k_isa" ); + + d =isa_try_create (bus,TYPE_ISA_NE2000 ); +if (d) { +DeviceState *dev =DEVICE (d); + +qdev_prop_set_uint32 (dev,"iobase" , base); +qdev_prop_set_uint32 (dev,"irq" , irq); +qdev_set_nic_properties (dev, nd); +qdev_init_nofail (dev); + } +return d; +}
hw/i386/pc.c +1 -0
@@ -71,6 +71,7 @@#include "qom/cpu.h" #include "hw/nmi.h" #include "hw/i386/intel_iommu.h" +#include "hw/net/ne2000-isa.h" /* debug PC/ISA interrupts */ //#define DEBUG_IRQ
hw/mips/mips_r4k.c +1 -0
@@ -18,6 +18,7 @@#include "hw/char/serial.h" #include "hw/isa/isa.h" #include "net/net.h" +#include "hw/net/ne2000-isa.h" #include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/block/flash.h"
hw/net/ne2000-isa.c +2 -4
@@ -22,17 +22,15 @@* THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" +#include "hw/net/ne2000-isa.h" #include "hw/qdev.h" -#include "net/net.h" #include "ne2000.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "qapi/error.h" #include "qapi/visitor.h" -#define TYPE_ISA_NE2000 "ne2k_isa"#define ISA_NE2000 (obj) OBJECT_CHECK(ISANE2000State, (obj), TYPE_ISA_NE2000) typedef struct ISANE2000State {
hw/net/ne2000.c +0 -2
@@ -22,9 +22,7 @@* THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/pci/pci.h" -#include "net/net.h" #include "ne2000.h" #include "hw/loader.h" #include "sysemu/sysemu.h"
hw/ppc/prep.c +1 -0
@@ -43,6 +43,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/isa/pc87312.h" +#include "hw/net/ne2000-isa.h" #include "sysemu/block-backend.h" #include "sysemu/arch_init.h" #include "sysemu/kvm.h"
MAINTAINERS +1 -0
@@ -973,6 +973,7 @@ Network devices M: Jason Wang <[email protected]> S: Odd Fixes F: hw/net/ +F: include/hw/net/ F: tests/virtio-net-test.c T: git git://github.com/jasowang/qemu.git net
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 26/34] hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c
Quoted 15 lines · Philippe Mathieu-Daudé
- add "
hw/net/ne2000-isa.h" (and new entry inMAINTAINERS)
- remove the old i386 dependencySigned-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/net/ne2000.h | 3 +++ include/hw/i386/pc.h | 20 -------------------- include/hw/net/ne2000-isa.h | 33 +++++++++++++++++++++++++++++++++ hw/i386/pc.c | 1 + hw/mips/mips_r4k.c | 1 + hw/net/ne2000-isa.c | 6 ++---- hw/net/ne2000.c | 2 -- hw/ppc/prep.c | 1 + MAINTAINERS | 1 + 9 files changed, 42 insertions(+), 26 deletions(-)
Quoted 1 line
create mode 100644
include/hw/net/ne2000-isa.h
Re: [Qemu-devel] [PATCH 26/34] hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c
In reply to Philippe Mathieu-DaudéQuoted 4 lines · Philippe Mathieu-Daudé
- add "
hw/net/ne2000-isa.h" (and new entry inMAINTAINERS)
- remove the old i386 dependencySigned-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portion
Quoted 183 lines
--- hw/net/ne2000.h | 3 +++ include/hw/i386/pc.h | 20 -------------------- include/hw/net/ne2000-isa.h | 33 +++++++++++++++++++++++++++++++++ hw/i386/pc.c | 1 + hw/mips/mips_r4k.c | 1 + hw/net/ne2000-isa.c | 6 ++---- hw/net/ne2000.c | 2 -- hw/ppc/prep.c | 1 + MAINTAINERS | 1 + 9 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 include/hw/net/ne2000-isa.hhw/net/ne2000.h +3
-0@@ -1,6 +1,9 @@#ifndef HW_NE2000_H #define HW_NE2000_H +#include "hw/hw.h" +#include "net/net.h" +#define NE2000_PMEM_SIZE (32*1024)#define NE2000_PMEM_START (16*1024)#define NE2000_PMEM_END (NE2000_PMEM_SIZE+NE2000_PMEM_START)include/hw/i386/pc.h +0
-20@@ -291,26 +291,6 @@ PCIBus *find_i440fx(void);extern PCIDevice *piix4_dev;int piix4_init (PCIBus *bus,ISABus **isa_bus,int devfn); -/* ne2000.c */ -static inline bool isa_ne2000_init (ISABus *bus,int base,int irq,NICInfo *nd) -{ -DeviceState *dev; -ISADevice *isadev; - -qemu_check_nic_model (nd,"ne2k_isa" ); - - isadev =isa_try_create (bus,"ne2k_isa" ); -if (!isadev) { -return false; - } - dev =DEVICE (isadev); -qdev_prop_set_uint32 (dev,"iobase" , base); -qdev_prop_set_uint32 (dev,"irq" , irq); -qdev_set_nic_properties (dev, nd); -qdev_init_nofail (dev); -return true; -} -/* pc_sysfw.c */ void pc_system_firmware_init (MemoryRegion *rom_memory,bool isapc_ram_fw);include/hw/net/ne2000-isa.h new file +33
-0@@ -0,0 +1,33 @@ +/* +* QEMU NE2000 emulation -- isa bus windup +* +* Copyright (c) 2003-2004 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" +#include "hw/qdev.h" +#include "hw/isa/isa.h" +#include "net/net.h" + +#define TYPE_ISA_NE2000 "ne2k_isa" + +static inline ISADevice *isa_ne2000_init (ISABus *bus,int base,int irq, +NICInfo *nd) +{ +ISADevice *d; + +qemu_check_nic_model (nd,"ne2k_isa" ); + + d =isa_try_create (bus,TYPE_ISA_NE2000 ); +if (d) { +DeviceState *dev =DEVICE (d); + +qdev_prop_set_uint32 (dev,"iobase" , base); +qdev_prop_set_uint32 (dev,"irq" , irq); +qdev_set_nic_properties (dev, nd); +qdev_init_nofail (dev); + } +return d; +}hw/i386/pc.c +1
-0@@ -71,6 +71,7 @@#include "qom/cpu.h" #include "hw/nmi.h" #include "hw/i386/intel_iommu.h" +#include "hw/net/ne2000-isa.h" /* debug PC/ISA interrupts */ //#define DEBUG_IRQ hw/mips/mips_r4k.c +1
-0@@ -18,6 +18,7 @@#include "hw/char/serial.h" #include "hw/isa/isa.h" #include "net/net.h" +#include "hw/net/ne2000-isa.h" #include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/block/flash.h" hw/net/ne2000-isa.c +2
-4@@ -22,17 +22,15 @@* THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" +#include "hw/net/ne2000-isa.h" #include "hw/qdev.h" -#include "net/net.h" #include "ne2000.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "qapi/error.h" #include "qapi/visitor.h" -#define TYPE_ISA_NE2000 "ne2k_isa"#define ISA_NE2000 (obj) OBJECT_CHECK(ISANE2000State, (obj), TYPE_ISA_NE2000) typedef struct ISANE2000State {hw/net/ne2000.c +0
-2@@ -22,9 +22,7 @@* THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/pci/pci.h" -#include "net/net.h" #include "ne2000.h" #include "hw/loader.h" #include "sysemu/sysemu.h" hw/ppc/prep.c +1
-0@@ -43,6 +43,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/isa/pc87312.h" +#include "hw/net/ne2000-isa.h" #include "sysemu/block-backend.h" #include "sysemu/arch_init.h" #include "sysemu/kvm.h" MAINTAINERS +1
-0@@ -973,6 +973,7 @@ Network devices M: Jason Wang <[email protected]> S: Odd Fixes F: hw/net/ +F: include/hw/net/ F: tests/virtio-net-test.c T: git git://github.com/jasowang/qemu.git net
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 27/34 hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h"
In reply to Philippe Mathieu-Daudé--- hw/pci/pci_internal.h | 16 +++++++++++ include/hw/net/pci.h | 20 +++++++++++++ include/hw/pci/pci.h | 4 --- hw/arm/virt.c | 1 + hw/mips/mips_malta.c | 1 + hw/pci/pci.c | 67 ++------------------------------------------ hw/pci/pci_nic.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/e500.c | 1 + hw/ppc/spapr.c | 1 + hw/pci/Makefile.objs | 1 + 10 files changed, 120 insertions(+), 69 deletions(-) create mode 100644 hw/pci/pci_internal.h create mode 100644 include/hw/net/pci.h create mode 100644 hw/pci/pci_nic.c
hw/pci/pci_internal.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* QEMU PCI internal +* +* Copyright (c) 2005 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_PCI_INTERNAL_H +#define QEMU_HW_PCI_INTERNAL_H + +#include "hw/pci/pci_bus.h" + +PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root,const char *devaddr); + +#endif
include/hw/net/pci.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* QEMU network devices +* +* Copyright (c) 2005 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_NET_PCI_H +#define QEMU_HW_NET_PCI_H + +#include "net/net.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" + +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, +const char *default_model, +const char *default_devaddr); + +#endif
include/hw/pci/pci.h +0 -4
@@ -422,10 +422,6 @@ void pci_device_set_intx_routing_notifier(PCIDevice *dev, PCIINTxRoutingNotifier notifier);void pci_device_reset (PCIDevice *dev); -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, -const char *default_model, -const char *default_devaddr); -PCIDevice *pci_vga_init (PCIBus *bus);int pci_bus_num (PCIBus *s);
hw/arm/virt.c +1 -0
@@ -35,6 +35,7 @@#include "hw/arm/primecell.h" #include "hw/arm/virt.h" #include "hw/devices.h" +#include "hw/net/pci.h" #include "net/net.h" #include "sysemu/block-backend.h" #include "sysemu/device_tree.h"
hw/mips/mips_malta.c +1 -0
@@ -48,6 +48,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/timer/i8254.h" +#include "hw/net/pci.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" /* SysBusDevice */
hw/pci/pci.c +2 -65
91 lines not on this page · raw message
hw/pci/pci_nic.c new file +77 -0
77 lines not on this page · raw message
hw/ppc/e500.c +1 -0
@@ -24,6 +24,7 @@#include "hw/hw.h" #include "hw/char/serial.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h"
hw/ppc/spapr.c +1 -0
@@ -56,6 +56,7 @@#include "hw/pci-host/spapr.h" #include "hw/ppc/xics.h" #include "hw/pci/msi.h" +#include "hw/net/pci.h" #include "hw/pci/pci.h" #include "hw/scsi/scsi.h"
hw/pci/Makefile.objs +1 -0
@@ -1,4 +1,5 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o +common-obj-$(CONFIG_PCI) += pci_nic.o common-obj-$(CONFIG_PCI) += msix.o msi.o common-obj-$(CONFIG_PCI) += shpc.o common-obj-$(CONFIG_PCI) += slotid_cap.o
Signature · 1 line
2.14.1
Re: [Qemu-arm] [PATCH 27/34] hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h"
Quoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portions
Quoted 319 lines
--- hw/pci/pci_internal.h | 16 +++++++++++ include/hw/net/pci.h | 20 +++++++++++++ include/hw/pci/pci.h | 4 --- hw/arm/virt.c | 1 + hw/mips/mips_malta.c | 1 + hw/pci/pci.c | 67 ++------------------------------------------ hw/pci/pci_nic.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/e500.c | 1 + hw/ppc/spapr.c | 1 + hw/pci/Makefile.objs | 1 + 10 files changed, 120 insertions(+), 69 deletions(-) create mode 100644 hw/pci/pci_internal.h create mode 100644 include/hw/net/pci.h create mode 100644 hw/pci/pci_nic.chw/pci/pci_internal.h new file +16
-0@@ -0,0 +1,16 @@ +/* +* QEMU PCI internal +* +* Copyright (c) 2005 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_PCI_INTERNAL_H +#define QEMU_HW_PCI_INTERNAL_H + +#include "hw/pci/pci_bus.h" + +PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root,const char *devaddr); + +#endif include/hw/net/pci.h new file +20
-0@@ -0,0 +1,20 @@ +/* +* QEMU network devices +* +* Copyright (c) 2005 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_NET_PCI_H +#define QEMU_HW_NET_PCI_H + +#include "net/net.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" + +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, +const char *default_model, +const char *default_devaddr); + +#endif include/hw/pci/pci.h +0
-4@@ -422,10 +422,6 @@ void pci_device_set_intx_routing_notifier(PCIDevice *dev, PCIINTxRoutingNotifier notifier);void pci_device_reset (PCIDevice *dev); -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, -const char *default_model, -const char *default_devaddr); -PCIDevice *pci_vga_init (PCIBus *bus);int pci_bus_num (PCIBus *s);hw/arm/virt.c +1
-0@@ -35,6 +35,7 @@#include "hw/arm/primecell.h" #include "hw/arm/virt.h" #include "hw/devices.h" +#include "hw/net/pci.h" #include "net/net.h" #include "sysemu/block-backend.h" #include "sysemu/device_tree.h" hw/mips/mips_malta.c +1
-0@@ -48,6 +48,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/timer/i8254.h" +#include "hw/net/pci.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" /* SysBusDevice */ hw/pci/pci.c +2
-65@@ -28,7 +28,6 @@#include "hw/pci/pci_bus.h" #include "hw/pci/pci_host.h" #include "monitor/monitor.h" -#include "net/net.h" #include "sysemu/sysemu.h" #include "hw/loader.h" #include "qemu/error-report.h" @@ -41,6 +40,7 @@#include "hw/hotplug.h" #include "hw/boards.h" #include "qemu/cutils.h" +#include "pci_internal.h" //#define DEBUG_PCI #ifdef DEBUG_PCI @@ -671,8 +671,7 @@ static int pci_parse_devaddr(const char *addr, int *domp, int *busp,return 0 ; } -static PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root, -const char *devaddr) +PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root,const char *devaddr) {int dom, bus;unsigned slot;@@ -1812,68 +1811,6 @@ PciInfoList *qmp_query_pci(Error **errp)return head; } -static const char *const pci_nic_models[] = { -"ne2k_pci" , -"i82551" , -"i82557b" , -"i82559er" , -"rtl8139" , -"e1000" , -"pcnet" , -"virtio" , -"sungem" , -NULL -}; - -static const char *const pci_nic_names[] = { -"ne2k_pci" , -"i82551" , -"i82557b" , -"i82559er" , -"rtl8139" , -"e1000" , -"pcnet" , -"virtio-net-pci" , -"sungem" , -NULL -}; - -/* Initialize a PCI NIC. */ -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, -const char *default_model, -const char *default_devaddr) -{ -const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr; -PCIBus *bus; -PCIDevice *pci_dev; -DeviceState *dev; -int devfn; -int i; - -if (qemu_show_nic_models (nd->model, pci_nic_models)) { -exit (0 ); - } - - i =qemu_find_nic_model (nd, pci_nic_models, default_model); -if (i <0 ) { -exit (1 ); - } - - bus =pci_get_bus_devfn (&devfn, rootbus, devaddr); -if (!bus) { -error_report ("Invalid PCI device address %s for device %s" , - devaddr, pci_nic_names[i]); -exit (1 ); - } - - pci_dev =pci_create (bus, devfn, pci_nic_names[i]); - dev = &pci_dev->qdev; -qdev_set_nic_properties (dev, nd); -qdev_init_nofail (dev); - -return pci_dev; -} -PCIDevice *pci_vga_init (PCIBus *bus) {switch (vga_interface_type) {hw/pci/pci_nic.c new file +77
-0@@ -0,0 +1,77 @@ +/* +* QEMU PCI network interface +* +* Copyright (c) 2004 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#include "qemu/osdep.h" +#include "qemu/error-report.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" +#include "hw/net/pci.h" +#include "net/net.h" +#include "pci_internal.h" + +static const char *const pci_nic_models[] = { +"ne2k_pci" , +"i82551" , +"i82557b" , +"i82559er" , +"rtl8139" , +"e1000" , +"pcnet" , +"virtio" , +"sungem" , +NULL +}; + +static const char *const pci_nic_names[] = { +"ne2k_pci" , +"i82551" , +"i82557b" , +"i82559er" , +"rtl8139" , +"e1000" , +"pcnet" , +"virtio-net-pci" , +"sungem" , +NULL +}; + +/* Initialize a PCI NIC. */ +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, +const char *default_model, +const char *default_devaddr) +{ +const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr; +PCIBus *bus; +PCIDevice *pci_dev; +DeviceState *dev; +int devfn; +int i; + +if (qemu_show_nic_models (nd->model, pci_nic_models)) { +exit (0 ); + } + + i =qemu_find_nic_model (nd, pci_nic_models, default_model); +if (i <0 ) { +exit (1 ); + } + + bus =pci_get_bus_devfn (&devfn, rootbus, devaddr); +if (!bus) { +error_report ("Invalid PCI device address %s for device %s" , + devaddr, pci_nic_names[i]); +exit (1 ); + } + + pci_dev =pci_create (bus, devfn, pci_nic_names[i]); + dev = &pci_dev->qdev; +qdev_set_nic_properties (dev, nd); +qdev_init_nofail (dev); + +return pci_dev; +}hw/ppc/e500.c +1
-0@@ -24,6 +24,7 @@#include "hw/hw.h" #include "hw/char/serial.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h" hw/ppc/spapr.c +1
-0@@ -56,6 +56,7 @@#include "hw/pci-host/spapr.h" #include "hw/ppc/xics.h" #include "hw/pci/msi.h" +#include "hw/net/pci.h" #include "hw/pci/pci.h" #include "hw/scsi/scsi.h" hw/pci/Makefile.objs +1
-0@@ -1,4 +1,5 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o +common-obj-$(CONFIG_PCI) += pci_nic.o common-obj-$(CONFIG_PCI) += msix.o msi.o common-obj-$(CONFIG_PCI) += shpc.o common-obj-$(CONFIG_PCI) += slotid_cap.o
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-arm] [PATCH 27/34] hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h"
In reply to Philippe Mathieu-DaudéHi Philippe,
It seems the patch is doing much more than
what is mentioned in the subject.
Quoted 23 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/pci/pci_internal.h | 16 +++++++++++ include/hw/net/pci.h | 20 +++++++++++++ include/hw/pci/pci.h | 4 --- hw/arm/virt.c | 1 + hw/mips/mips_malta.c | 1 + hw/pci/pci.c | 67 ++------------------------------------------ hw/pci/pci_nic.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/ppc/e500.c | 1 + hw/ppc/spapr.c | 1 + hw/pci/Makefile.objs | 1 + 10 files changed, 120 insertions(+), 69 deletions(-)create mode 100644
hw/pci/pci_internal.h
create mode 100644include/hw/net/pci.h
create mode 100644hw/pci/pci_nic.chw/pci/pci_internal.h new file +0
-0
hw/pci/pci_internal.h line 5
Quoted 5 lines
hw/pci/pci_internal.h new file +5
-0@@ -0,0 +1,16 @@ +/* +* QEMU PCI internal +* +* Copyright (c) 2005 Fabrice Bellard +* > + * This work is licensed under the terms of the GNU GPL, version 2
or later.
hw/pci/pci_internal.h line 16
Quoted 10 lines
hw/pci/pci_internal.h new file +10
-0+* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_PCI_INTERNAL_H +#define QEMU_HW_PCI_INTERNAL_H + +#include "hw/pci/pci_bus.h" + +PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root,const char *devaddr); + +#endif
Why don't add the function directly to hw/pci/pci_nic.c ? We have only one calling site anyway.
I have nothing against adding an internal H file, but then we would need to add there *all* the functions used only by the pci sub-system. And that may be out of the scope of your series.
Quoted 15 lines
include/hw/net/pci.h new file +9
-0@@ -0,0 +1,20 @@ +/* +* QEMU network devices +* +* Copyright (c) 2005 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_NET_PCI_H
include/hw/net/pci.h line 19
Quoted 10 lines
include/hw/net/pci.h new file +10
-0+#define QEMU_HW_NET_PCI_H + +#include "net/net.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" + +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, +const char *default_model, +const char *default_devaddr); +
Can you add a short explanation on how the split helps removing i386/pc dependency from non-PC world?
- it is not straight forward, at least for me.
Thanks,
Marcel
Quoted 257 lines
include/hw/net/pci.h new file +1
-0+#endif include/hw/pci/pci.h +0
-4@@ -422,10 +422,6 @@ void pci_device_set_intx_routing_notifier(PCIDevice *dev, PCIINTxRoutingNotifier notifier);void pci_device_reset (PCIDevice *dev); -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, -const char *default_model, -const char *default_devaddr); -PCIDevice *pci_vga_init (PCIBus *bus);int pci_bus_num (PCIBus *s);hw/arm/virt.c +1
-0@@ -35,6 +35,7 @@#include "hw/arm/primecell.h" #include "hw/arm/virt.h" #include "hw/devices.h" +#include "hw/net/pci.h" #include "net/net.h" #include "sysemu/block-backend.h" #include "sysemu/device_tree.h" hw/mips/mips_malta.c +1
-0@@ -48,6 +48,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/timer/i8254.h" +#include "hw/net/pci.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" /* SysBusDevice */ hw/pci/pci.c +2
-65@@ -28,7 +28,6 @@#include "hw/pci/pci_bus.h" #include "hw/pci/pci_host.h" #include "monitor/monitor.h" -#include "net/net.h" #include "sysemu/sysemu.h" #include "hw/loader.h" #include "qemu/error-report.h" @@ -41,6 +40,7 @@#include "hw/hotplug.h" #include "hw/boards.h" #include "qemu/cutils.h" +#include "pci_internal.h" //#define DEBUG_PCI #ifdef DEBUG_PCI @@ -671,8 +671,7 @@ static int pci_parse_devaddr(const char *addr, int *domp, int *busp,return 0 ; } -static PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root, -const char *devaddr) +PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root,const char *devaddr) {int dom, bus;unsigned slot;@@ -1812,68 +1811,6 @@ PciInfoList *qmp_query_pci(Error **errp)return head; } -static const char *const pci_nic_models[] = { -"ne2k_pci" , -"i82551" , -"i82557b" , -"i82559er" , -"rtl8139" , -"e1000" , -"pcnet" , -"virtio" , -"sungem" , -NULL -}; - -static const char *const pci_nic_names[] = { -"ne2k_pci" , -"i82551" , -"i82557b" , -"i82559er" , -"rtl8139" , -"e1000" , -"pcnet" , -"virtio-net-pci" , -"sungem" , -NULL -}; - -/* Initialize a PCI NIC. */ -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, -const char *default_model, -const char *default_devaddr) -{ -const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr; -PCIBus *bus; -PCIDevice *pci_dev; -DeviceState *dev; -int devfn; -int i; - -if (qemu_show_nic_models (nd->model, pci_nic_models)) { -exit (0 ); - } - - i =qemu_find_nic_model (nd, pci_nic_models, default_model); -if (i <0 ) { -exit (1 ); - } - - bus =pci_get_bus_devfn (&devfn, rootbus, devaddr); -if (!bus) { -error_report ("Invalid PCI device address %s for device %s" , - devaddr, pci_nic_names[i]); -exit (1 ); - } - - pci_dev =pci_create (bus, devfn, pci_nic_names[i]); - dev = &pci_dev->qdev; -qdev_set_nic_properties (dev, nd); -qdev_init_nofail (dev); - -return pci_dev; -} -PCIDevice *pci_vga_init (PCIBus *bus) {switch (vga_interface_type) {hw/pci/pci_nic.c new file +77
-0@@ -0,0 +1,77 @@ +/* +* QEMU PCI network interface +* +* Copyright (c) 2004 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#include "qemu/osdep.h" +#include "qemu/error-report.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" +#include "hw/net/pci.h" +#include "net/net.h" +#include "pci_internal.h" + +static const char *const pci_nic_models[] = { +"ne2k_pci" , +"i82551" , +"i82557b" , +"i82559er" , +"rtl8139" , +"e1000" , +"pcnet" , +"virtio" , +"sungem" , +NULL +}; + +static const char *const pci_nic_names[] = { +"ne2k_pci" , +"i82551" , +"i82557b" , +"i82559er" , +"rtl8139" , +"e1000" , +"pcnet" , +"virtio-net-pci" , +"sungem" , +NULL +}; + +/* Initialize a PCI NIC. */ +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, +const char *default_model, +const char *default_devaddr) +{ +const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr; +PCIBus *bus; +PCIDevice *pci_dev; +DeviceState *dev; +int devfn; +int i; + +if (qemu_show_nic_models (nd->model, pci_nic_models)) { +exit (0 ); + } + + i =qemu_find_nic_model (nd, pci_nic_models, default_model); +if (i <0 ) { +exit (1 ); + } + + bus =pci_get_bus_devfn (&devfn, rootbus, devaddr); +if (!bus) { +error_report ("Invalid PCI device address %s for device %s" , + devaddr, pci_nic_names[i]); +exit (1 ); + } + + pci_dev =pci_create (bus, devfn, pci_nic_names[i]); + dev = &pci_dev->qdev; +qdev_set_nic_properties (dev, nd); +qdev_init_nofail (dev); + +return pci_dev; +}hw/ppc/e500.c +1
-0@@ -24,6 +24,7 @@#include "hw/hw.h" #include "hw/char/serial.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h" hw/ppc/spapr.c +1
-0@@ -56,6 +56,7 @@#include "hw/pci-host/spapr.h" #include "hw/ppc/xics.h" #include "hw/pci/msi.h" +#include "hw/net/pci.h" #include "hw/pci/pci.h" #include "hw/scsi/scsi.h" hw/pci/Makefile.objs +1
-0@@ -1,4 +1,5 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o +common-obj-$(CONFIG_PCI) += pci_nic.o common-obj-$(CONFIG_PCI) += msix.o msi.o common-obj-$(CONFIG_PCI) += shpc.o common-obj-$(CONFIG_PCI) += slotid_cap.o
Re: [Qemu-arm] [PATCH 27/34] hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h"
Hi Marcel,
Quoted 36 lines · Marcel Apfelbaum
Hi Philippe,
It seems the patch is doing much more than
what is mentioned in the subject.Quoted 24 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/pci/pci_internal.h| 16 +++++++++++
include/hw/net/pci.h | 20 +++++++++++++ include/hw/pci/pci.h | 4 ---
hw/arm/virt.c | 1 +
hw/mips/mips_malta.c | 1 +
hw/pci/pci.c | 67 ++------------------------------------------ hw/pci/pci_nic.c | 77
+++++++++++++++++++++++++++++++++++++++++++++++++++
hw/ppc/e500.c | 1 +
hw/ppc/spapr.c | 1 +
hw/pci/Makefile.objs | 1 +10 files changed, 120 insertions(+), 69 deletions(-)create mode 100644
hw/pci/pci_internal.h
create mode 100644include/hw/net/pci.h
create mode 100644hw/pci/pci_nic.chw/pci/pci_internal.h new file +0
-0hw/pci/pci_internal.h line 5
Quoted 5 lines
hw/pci/pci_internal.h new file +5
-0@@ -0,0 +1,16 @@ +/* +* QEMU PCI internal +* +* Copyright (c) 2005 Fabrice Bellard +* > + * This work is licensed under the terms of the GNU GPL, version 2 or later.
Quoted 14 lines
hw/pci/pci_internal.h
Quoted 11 lines
hw/pci/pci_internal.h new file +8
-0+* See the COPYING file in the top-level directory. +*/ +#ifndef QEMU_HW_PCI_INTERNAL_H +#define QEMU_HW_PCI_INTERNAL_H + +#include "hw/pci/pci_bus.h" + +PCIBus *pci_get_bus_devfn(int *devfnp, PCIBus *root, const char*devaddr);
hw/pci/pci_internal.h new file +2
-0+ +#endif Why don't add the function directly to
hw/pci/pci_nic.c? We have only one calling site anyway.
You right!
Quoted 31 lines
I have nothing against adding an internal H file, but then we would need to add there *all* the functions used only by the pci sub-system. And that may be out of the scope of your series.
Quoted 22 lines
include/hw/net/pci.h new file +6
-0@@ -0,0 +1,20 @@ +/* +* QEMU network devices +* +* Copyright (c) 2005 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */include/hw/net/pci.h new file +7
-0+#ifndef QEMU_HW_NET_PCI_H +#define QEMU_HW_NET_PCI_H + +#include "net/net.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" +
Quoted 8 lines
include/hw/net/pci.h line 19
Quoted 4 lines
include/hw/net/pci.h new file +4
-0+PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, + const char *default_model, + const char *default_devaddr); +Can you add a short explanation on how the split helps removing i386/pc dependency from non-PC world?
- it is not straight forward, at least for me.
I thought there was an old dependency on "hw/pci/pci.h" to something from i386/pc, so every machine using a PCI NIC would have this dependency. Extracting the NIC part as "hw/net/pci.h" would solve this issue. I didn't check attentively but it seems I was wrong, so I'll either drop this patch or reword it.
Regards,
Phil.
Quoted 261 lines
Thanks,
MarcelQuoted 255 lines
include/hw/net/pci.h new file +1
-0+#endif include/hw/pci/pci.h +0
-4@@ -422,10 +422,6 @@ voidpci_device_set_intx_routing_notifier (PCIDevice *dev, PCIINTxRoutingNotifier notifier); void pci_device_reset(PCIDevice *dev); -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, - const char *default_model, - const char *default_devaddr); - PCIDevice *pci_vga_init(PCIBus *bus); int pci_bus_num(PCIBus *s);hw/arm/virt.c +1
-0@@ -35,6 +35,7 @@ #include "hw/arm/primecell.h" #include "hw/arm/virt.h" #include "hw/devices.h" +#include "hw/net/pci.h" #include "net/net.h" #include "sysemu/block-backend.h" #include "sysemu/device_tree.h"hw/mips/mips_malta.c +1
-0@@ -48,6 +48,7 @@ #include "hw/timer/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/timer/i8254.h" +#include "hw/net/pci.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" /* SysBusDevice */hw/pci/pci.c +2
-3@@ -28,7 +28,6 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci_host.h" #include "monitor/monitor.h" -#include "net/net.h" #include "sysemu/sysemu.h" #include "hw/loader.h" #include "qemu/error-report.h"@@ -41,6 +40,7 @@ #include "hw/hotplug.h" #include "hw/boards.h" #include "qemu/cutils.h" +#include "pci_internal.h" //#define DEBUG_PCI #ifdef DEBUG_PCI@@ -671,8 +671,7 @@ static int pci_parse_devaddr(const char *addr, int *domp, int *busp, return 0; } -static PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root, - const char *devaddr) +PCIBus *pci_get_bus_devfn (int *devfnp,PCIBus *root,const char *devaddr) { int dom, bus;unsigned slot;
hw/pci/pci.c +0
-62@@ -1812,68 +1811,6 @@ PciInfoList *qmp_query_pci(Error **errp) return head; } -static const char *const pci_nic_models[] = { - "ne2k_pci", - "i82551", - "i82557b", - "i82559er", - "rtl8139", - "e1000", - "pcnet", - "virtio", - "sungem", - NULL -}; - -static const char *const pci_nic_names[] = { - "ne2k_pci", - "i82551", - "i82557b", - "i82559er", - "rtl8139", - "e1000", - "pcnet", - "virtio-net-pci", - "sungem", - NULL -}; - -/* Initialize a PCI NIC. */ -PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, - const char *default_model, - const char *default_devaddr) -{ - const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr; - PCIBus *bus; - PCIDevice *pci_dev; - DeviceState *dev; - int devfn; - int i; - - if (qemu_show_nic_models(nd->model, pci_nic_models)) { - exit(0); - } - - i = qemu_find_nic_model(nd, pci_nic_models, default_model); - if (i < 0) { - exit(1); - } - - bus = pci_get_bus_devfn(&devfn, rootbus, devaddr); - if (!bus) { - error_report("Invalid PCI device address %s for device %s", - devaddr, pci_nic_names[i]); - exit(1); - } - - pci_dev = pci_create(bus, devfn, pci_nic_names[i]); - dev = &pci_dev->qdev; - qdev_set_nic_properties(dev, nd); - qdev_init_nofail(dev); - - return pci_dev; -} - PCIDevice *pci_vga_init(PCIBus *bus) { switch (vga_interface_type) {hw/pci/pci_nic.c new file +6
-0@@ -0,0 +1,77 @@ +/* +* QEMU PCI network interface +* +* Copyright (c) 2004 Fabrice Bellard +* +* This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */hw/pci/pci_nic.c new file +69
-0+#include "qemu/osdep.h" +#include "qemu/error-report.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" +#include "hw/net/pci.h" +#include "net/net.h" +#include "pci_internal.h" + +static const char *const pci_nic_models[] = { + "ne2k_pci", + "i82551", + "i82557b", + "i82559er", + "rtl8139", + "e1000", + "pcnet", + "virtio", + "sungem", + NULL +}; + +static const char *const pci_nic_names[] = { + "ne2k_pci", + "i82551", + "i82557b", + "i82559er", + "rtl8139", + "e1000", + "pcnet", + "virtio-net-pci", + "sungem", + NULL +}; + +/* Initialize a PCI NIC. */ +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus, + const char *default_model, + const char *default_devaddr) +{ + const char *devaddr = nd->devaddr ? nd->devaddr : default_devaddr; + PCIBus *bus; + PCIDevice *pci_dev; + DeviceState *dev; + int devfn; + int i; + + if (qemu_show_nic_models(nd->model, pci_nic_models)) { + exit(0); + } + + i = qemu_find_nic_model(nd, pci_nic_models, default_model); + if (i < 0) { + exit(1); + } + + bus = pci_get_bus_devfn(&devfn, rootbus, devaddr); + if (!bus) { + error_report("Invalid PCI device address %s for device %s", + devaddr, pci_nic_names[i]); + exit(1); + } + + pci_dev = pci_create(bus, devfn, pci_nic_names[i]); + dev = &pci_dev->qdev; + qdev_set_nic_properties(dev, nd); + qdev_init_nofail(dev); + + return pci_dev; +}hw/ppc/e500.c +1
-0@@ -24,6 +24,7 @@ #include "hw/hw.h" #include "hw/char/serial.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h"hw/ppc/spapr.c +1
-0@@ -56,6 +56,7 @@ #include "hw/pci-host/spapr.h" #include "hw/ppc/xics.h" #include "hw/pci/msi.h" +#include "hw/net/pci.h" #include "hw/pci/pci.h" #include "hw/scsi/scsi.h"hw/pci/Makefile.objs +0
-0@@ -1,4 +1,5 @@common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o +common-obj-$(CONFIG_PCI) += pci_nic.o common-obj-$(CONFIG_PCI) += msix.o msi.o common-obj-$(CONFIG_PCI) += shpc.o common-obj-$(CONFIG_PCI) += slotid_cap.o
Re: [Qemu-devel] [PATCH 27/34] hw/pci: declare pci_nic_init_nofail() in "hw/net/pci.h"
Hi Marcel,
Quoted 3 lines
Quoted 3 lines
It seems the patch is doing much more than
what is mentioned in the subject.
[...]
Quoted 9 lines
Quoted 3 lines
Can you add a short explanation on how the split helps removing i386/pc dependency from non-PC world?
- it is not straight forward, at least for me.I thought there was an old dependency on "
hw/pci/pci.h" to something from i386/pc, so every machine using a PCI NIC would have this dependency. Extracting the NIC part as "hw/net/pci.h" would solve this issue. I didn't check attentively but it seems I was wrong, so I'll either drop this patch or reword it.
I finally opted to drop it for this series and include it reworded in part 2 which include more PCI-related patches.
Regards,
Phil.
PATCH 28/34 hw/net/e1000: use TYPE_PCI_E1000
In reply to Philippe Mathieu-Daudé--- include/hw/net/pci.h | 2 ++ hw/alpha/dp264.c | 3 ++- hw/i386/pc.c | 3 ++- hw/ppc/ppc440_bamboo.c | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-)
include/hw/net/pci.h +2 -0
@@ -13,6 +13,8 @@#include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" +#define TYPE_PCI_E1000 "e1000" +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus,const char *default_model,const char *default_devaddr);
hw/alpha/dp264.c +2 -1
@@ -21,6 +21,7 @@#include "hw/timer/i8254.h" #include "hw/input/i8042.h" #include "hw/char/serial.h" +#include "hw/net/pci.h" #include "qemu/cutils.h" #define MAX_IDE_BUS 2
@@ -93,7 +94,7 @@ static void clipper_init(MachineState *machine)/* Network setup. e1000 is good enough, failing Tulip support. */ for (i =0 ; i < nb_nics; i++) { -pci_nic_init_nofail (&nd_table[i], pci_bus,"e1000" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_E1000 ,NULL ); }/* IDE disk setup. */
hw/i386/pc.c +2 -1
@@ -72,6 +72,7 @@#include "hw/nmi.h" #include "hw/i386/intel_iommu.h" #include "hw/net/ne2000-isa.h" +#include "hw/net/pci.h" /* debug PC/ISA interrupts */ //#define DEBUG_IRQ
@@ -1606,7 +1607,7 @@ void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus)if (!pci_bus || (nd->model &&strcmp (nd->model,"ne2k_isa" ) ==0 )) {pc_init_ne2k_isa (isa_bus, nd); }else { -pci_nic_init_nofail (nd, pci_bus,"e1000" ,NULL ); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_E1000 ,NULL ); } }rom_reset_order_override ();
hw/ppc/ppc440_bamboo.c +2 -1
@@ -24,6 +24,7 @@#include "elf.h" #include "exec/address-spaces.h" #include "hw/char/serial.h" +#include "hw/net/pci.h" #include "hw/ppc/ppc.h" #include "ppc405.h" #include "sysemu/sysemu.h"
@@ -248,7 +249,7 @@ static void bamboo_init(MachineState *machine)for (i =0 ; i < nb_nics; i++) {/* There are no PCI NICs on the Bamboo board, but there are * PCI slots, so we can pick whatever default model we want. */ -pci_nic_init_nofail (&nd_table[i], pcibus,"e1000" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pcibus,TYPE_PCI_E1000 ,NULL ); } }
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 28/34] hw/net/e1000: use TYPE_PCI_E1000
Quoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portion
Quoted 83 lines
--- include/hw/net/pci.h | 2 ++ hw/alpha/dp264.c | 3 ++- hw/i386/pc.c | 3 ++- hw/ppc/ppc440_bamboo.c | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-)include/hw/net/pci.h +2
-0@@ -13,6 +13,8 @@#include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" +#define TYPE_PCI_E1000 "e1000" +PCIDevice *pci_nic_init_nofail (NICInfo *nd,PCIBus *rootbus,const char *default_model,const char *default_devaddr);hw/alpha/dp264.c +2
-1@@ -21,6 +21,7 @@#include "hw/timer/i8254.h" #include "hw/input/i8042.h" #include "hw/char/serial.h" +#include "hw/net/pci.h" #include "qemu/cutils.h" #define MAX_IDE_BUS 2@@ -93,7 +94,7 @@ static void clipper_init(MachineState *machine)/* Network setup. e1000 is good enough, failing Tulip support. */ for (i =0 ; i < nb_nics; i++) { -pci_nic_init_nofail (&nd_table[i], pci_bus,"e1000" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_E1000 ,NULL ); }/* IDE disk setup. */ hw/i386/pc.c +2
-1@@ -72,6 +72,7 @@#include "hw/nmi.h" #include "hw/i386/intel_iommu.h" #include "hw/net/ne2000-isa.h" +#include "hw/net/pci.h" /* debug PC/ISA interrupts */ //#define DEBUG_IRQ @@ -1606,7 +1607,7 @@ void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus)if (!pci_bus || (nd->model &&strcmp (nd->model,"ne2k_isa" ) ==0 )) {pc_init_ne2k_isa (isa_bus, nd); }else { -pci_nic_init_nofail (nd, pci_bus,"e1000" ,NULL ); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_E1000 ,NULL ); } }rom_reset_order_override ();hw/ppc/ppc440_bamboo.c +2
-1@@ -24,6 +24,7 @@#include "elf.h" #include "exec/address-spaces.h" #include "hw/char/serial.h" +#include "hw/net/pci.h" #include "hw/ppc/ppc.h" #include "ppc405.h" #include "sysemu/sysemu.h" @@ -248,7 +249,7 @@ static void bamboo_init(MachineState *machine)for (i =0 ; i < nb_nics; i++) {/* There are no PCI NICs on the Bamboo board, but there are * PCI slots, so we can pick whatever default model we want. */ -pci_nic_init_nofail (&nd_table[i], pcibus,"e1000" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pcibus,TYPE_PCI_E1000 ,NULL ); } }
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 29/34 hw/net/e1000e: use TYPE_PCI_E1000E
In reply to Philippe Mathieu-Daudé--- include/hw/net/pci.h | 1 + hw/net/e1000e.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
include/hw/net/pci.h +1 -0
@@ -14,6 +14,7 @@#include "hw/pci/pci_bus.h" #define TYPE_PCI_E1000 "e1000" +#define TYPE_PCI_E1000E "e1000e" PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus, const char *default_model,
hw/net/e1000e.c +3 -3
@@ -40,6 +40,7 @@#include "sysemu/sysemu.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" +#include "hw/net/pci.h" #include "hw/net/e1000_regs.h"
@@ -49,8 +50,7 @@#include "trace.h" #include "qapi/error.h" -#define TYPE_E1000E "e1000e" -#define E1000E (obj) OBJECT_CHECK(E1000EState, (obj), TYPE_E1000E) +#define E1000E (obj) OBJECT_CHECK(E1000EState, (obj), TYPE_PCI_E1000E) typedef struct E1000EState { PCIDevice parent_obj;
@@ -703,7 +703,7 @@ static void e1000e_instance_init(Object *obj) }static const TypeInfo e1000e_info = { - .name =TYPE_E1000E , + .name =TYPE_PCI_E1000E , .parent =TYPE_PCI_DEVICE , .instance_size =sizeof (E1000EState), .class_init = e1000e_class_init,
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 29/34] hw/net/e1000e: use TYPE_PCI_E1000E
Quoted 42 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/net/pci.h | 1 + hw/net/e1000e.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)include/hw/net/pci.h +1
-0@@ -14,6 +14,7 @@#include "hw/pci/pci_bus.h" #define TYPE_PCI_E1000 "e1000" +#define TYPE_PCI_E1000E "e1000e" PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus, const char *default_model,hw/net/e1000e.c +2
-2@@ -40,6 +40,7 @@#include "sysemu/sysemu.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" +#include "hw/net/pci.h" #include "hw/net/e1000_regs.h" @@ -49,8 +50,7 @@#include "trace.h" #include "qapi/error.h" -#define TYPE_E1000E "e1000e" -#define E1000E (obj) OBJECT_CHECK(E1000EState, (obj), TYPE_E1000E) +#define E1000E (obj) OBJECT_CHECK(E1000EState, (obj), TYPE_PCI_E1000E) typedef struct E1000EState { PCIDevice parent_obj;
hw/net/e1000e.c static void e1000e_instance_init(Object *obj) · line 709
Quoted 8 lines
hw/net/e1000e.c +1
-1@@ -703,7 +703,7 @@ static void e1000e_instance_init(Object *obj) }static const TypeInfo e1000e_info = { - .name =TYPE_E1000E , + .name =TYPE_PCI_E1000E , .parent =TYPE_PCI_DEVICE , .instance_size =sizeof (E1000EState), .class_init = e1000e_class_init,
That seems unnecessary to me, since it's not used anywhere outside of e1000e.c. I'd suggest to drop this patch.
Thomas
PATCH 30/34 hw/net/pcnet: use TYPE_PCI_PCNET
In reply to Philippe Mathieu-Daudé--- include/hw/net/pci.h | 1 + hw/mips/mips_malta.c | 2 +- hw/net/pcnet-pci.c | 3 +-- hw/ppc/prep.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-)
include/hw/net/pci.h +1 -0
@@ -15,6 +15,7 @@#define TYPE_PCI_E1000 "e1000"#define TYPE_PCI_E1000E "e1000e" +#define TYPE_PCI_PCNET "pcnet" PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus, const char *default_model,
hw/mips/mips_malta.c +1 -1
@@ -597,7 +597,7 @@ static void network_init(PCIBus *pci_bus)/* The malta board has a PCNet card using PCI SLOT 11 */ default_devaddr ="0b" ; -pci_nic_init_nofail (nd, pci_bus,"pcnet" , default_devaddr); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_PCNET , default_devaddr); } }
hw/net/pcnet-pci.c +1 -2
@@ -29,6 +29,7 @@#include "qemu/osdep.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "net/net.h" #include "hw/loader.h" #include "qemu/timer.h"
@@ -46,8 +47,6 @@//#define PCNET_DEBUG_TMD //#define PCNET_DEBUG_MATCH -#define TYPE_PCI_PCNET "pcnet" -#define PCI_PCNET (obj) \ OBJECT_CHECK(PCIPCNetState, (obj), TYPE_PCI_PCNET)
hw/ppc/prep.c +2 -1
@@ -44,6 +44,7 @@#include "hw/input/i8042.h" #include "hw/isa/pc87312.h" #include "hw/net/ne2000-isa.h" +#include "hw/net/pci.h" #include "sysemu/block-backend.h" #include "sysemu/arch_init.h" #include "sysemu/kvm.h"
@@ -800,7 +801,7 @@ static void ibm_40p_init(MachineState *machine)pci_vga_init (pci_bus);for (i =0 ; i < nb_nics; i++) { -pci_nic_init_nofail (&nd_table[i], pci_bus,"pcnet" , +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_PCNET , i ==0 ?"3" :NULL ); } }
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 30/34] hw/net/pcnet: use TYPE_PCI_PCNET
Quoted 7 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/net/pci.h | 1 + hw/mips/mips_malta.c | 2 +- hw/net/pcnet-pci.c | 3 +-- hw/ppc/prep.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-)
Re: [Qemu-devel] [PATCH 30/34] hw/net/pcnet: use TYPE_PCI_PCNET
In reply to Philippe Mathieu-DaudéQuoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portion
Quoted 74 lines
--- include/hw/net/pci.h | 1 + hw/mips/mips_malta.c | 2 +- hw/net/pcnet-pci.c | 3 +-- hw/ppc/prep.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-)include/hw/net/pci.h +1
-0@@ -15,6 +15,7 @@#define TYPE_PCI_E1000 "e1000"#define TYPE_PCI_E1000E "e1000e" +#define TYPE_PCI_PCNET "pcnet" PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus, const char *default_model,hw/mips/mips_malta.c +1
-1@@ -597,7 +597,7 @@ static void network_init(PCIBus *pci_bus)/* The malta board has a PCNet card using PCI SLOT 11 */ default_devaddr ="0b" ; -pci_nic_init_nofail (nd, pci_bus,"pcnet" , default_devaddr); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_PCNET , default_devaddr); } }hw/net/pcnet-pci.c +1
-2@@ -29,6 +29,7 @@#include "qemu/osdep.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "net/net.h" #include "hw/loader.h" #include "qemu/timer.h" @@ -46,8 +47,6 @@//#define PCNET_DEBUG_TMD //#define PCNET_DEBUG_MATCH -#define TYPE_PCI_PCNET "pcnet" -#define PCI_PCNET (obj) \ OBJECT_CHECK(PCIPCNetState, (obj), TYPE_PCI_PCNET)hw/ppc/prep.c +2
-1@@ -44,6 +44,7 @@#include "hw/input/i8042.h" #include "hw/isa/pc87312.h" #include "hw/net/ne2000-isa.h" +#include "hw/net/pci.h" #include "sysemu/block-backend.h" #include "sysemu/arch_init.h" #include "sysemu/kvm.h" @@ -800,7 +801,7 @@ static void ibm_40p_init(MachineState *machine)pci_vga_init (pci_bus);for (i =0 ; i < nb_nics; i++) { -pci_nic_init_nofail (&nd_table[i], pci_bus,"pcnet" , +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_PCNET , i ==0 ?"3" :NULL ); } }
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 31/34 hw/net/rtl8139: use TYPE_PCI_RTL8139
In reply to Philippe Mathieu-Daudé--- include/hw/net/pci.h | 1 + hw/arm/realview.c | 3 ++- hw/arm/versatilepb.c | 3 ++- hw/mips/mips_fulong2e.c | 3 ++- hw/net/rtl8139.c | 7 +++---- hw/sh4/r2d.c | 5 +++-- 6 files changed, 13 insertions(+), 9 deletions(-)
include/hw/net/pci.h +1 -0
@@ -16,6 +16,7 @@#define TYPE_PCI_E1000 "e1000"#define TYPE_PCI_E1000E "e1000e"#define TYPE_PCI_PCNET "pcnet" +#define TYPE_PCI_RTL8139 "rtl8139" PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus, const char *default_model,
hw/arm/realview.c +2 -1
@@ -20,6 +20,7 @@#include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/i2c/i2c.h" +#include "hw/net/pci.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" #include "qemu/error-report.h"
@@ -269,7 +270,7 @@ static void realview_init(MachineState *machine, done_nic =1 ; }else {if (pci_bus) { -pci_nic_init_nofail (nd, pci_bus,"rtl8139" ,NULL ); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_RTL8139 ,NULL ); } } }
hw/arm/versatilepb.c +2 -1
@@ -18,6 +18,7 @@#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #include "hw/i2c/i2c.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h"
@@ -271,7 +272,7 @@ static void versatile_init(MachineState *machine, int board_id)smc91c111_init (nd,0x10010000 , sic[25 ]); done_smc =1 ; }else { -pci_nic_init_nofail (nd, pci_bus,"rtl8139" ,NULL ); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_RTL8139 ,NULL ); } }if (machine_usb (machine)) {
hw/mips/mips_fulong2e.c +2 -1
@@ -44,6 +44,7 @@#include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h" +#include "hw/net/pci.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h"
@@ -253,7 +254,7 @@ static void network_init (PCIBus *pci_bus) default_devaddr ="07" ; } -pci_nic_init_nofail (nd, pci_bus,"rtl8139" , default_devaddr); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_RTL8139 , default_devaddr); } }
hw/net/rtl8139.c +3 -4
@@ -59,6 +59,7 @@#include "net/net.h" #include "net/eth.h" #include "hw/loader.h" +#include "hw/net/pci.h" #include "sysemu/sysemu.h" #include "qemu/iov.h"
@@ -90,10 +91,8 @@ static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...) }#endif -#define TYPE_RTL8139 "rtl8139" -#define RTL8139 (obj) \ - OBJECT_CHECK(RTL8139State, (obj), TYPE_RTL8139) + OBJECT_CHECK(RTL8139State, (obj), TYPE_PCI_RTL8139)/* Symbolic offsets to registers. */ enum RTL8139_registers {
@@ -3437,7 +3436,7 @@ static void rtl8139_class_init(ObjectClass *klass, void *data) }static const TypeInfo rtl8139_info = { - .name =TYPE_RTL8139 , + .name =TYPE_PCI_RTL8139 , .parent =TYPE_PCI_DEVICE , .instance_size =sizeof (RTL8139State), .class_init = rtl8139_class_init,
hw/sh4/r2d.c +3 -2
@@ -39,6 +39,7 @@#include "hw/ide.h" #include "hw/loader.h" #include "hw/usb.h" +#include "hw/net/pci.h" #include "hw/block/flash.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h"
@@ -303,8 +304,8 @@ static void r2d_init(MachineState *machine)/* NIC: rtl8139 on-board, and 2 slots. */ for (i =0 ; i < nb_nics; i++) -pci_nic_init_nofail (&nd_table[i], pci_bus, -"rtl8139" , i==0 ?"2" :NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_RTL8139 , + i ==0 ?"2" :NULL );/* USB keyboard */ usb_create_simple (usb_bus_find (-1 ),"usb-kbd" );
Signature · 1 line
2.14.1
Re: [Qemu-arm] [PATCH 31/34] hw/net/rtl8139: use TYPE_PCI_RTL8139
Quoted 9 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/net/pci.h | 1 + hw/arm/realview.c | 3 ++- hw/arm/versatilepb.c | 3 ++- hw/mips/mips_fulong2e.c | 3 ++- hw/net/rtl8139.c | 7 +++---- hw/sh4/r2d.c | 5 +++-- 6 files changed, 13 insertions(+), 9 deletions(-)
PATCH 32/34 hw/net/ne2000: use TYPE_PCI_NE2000
In reply to Philippe Mathieu-Daudé--- include/hw/net/pci.h | 1 + hw/net/ne2000.c | 3 ++- hw/ppc/mac_newworld.c | 3 ++- hw/ppc/mac_oldworld.c | 3 ++- hw/ppc/prep.c | 2 +- hw/sparc64/sun4u.c | 3 ++- 6 files changed, 10 insertions(+), 5 deletions(-)
include/hw/net/pci.h +1 -0
@@ -15,6 +15,7 @@#define TYPE_PCI_E1000 "e1000"#define TYPE_PCI_E1000E "e1000e" +#define TYPE_PCI_NE2000 "ne2k_pci"#define TYPE_PCI_PCNET "pcnet"#define TYPE_PCI_RTL8139 "rtl8139"
hw/net/ne2000.c +2 -1
@@ -23,6 +23,7 @@*/ #include "qemu/osdep.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "ne2000.h" #include "hw/loader.h" #include "sysemu/sysemu.h"
@@ -779,7 +780,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data) }static const TypeInfo ne2000_info = { - .name ="ne2k_pci" , + .name =TYPE_PCI_NE2000 , .parent =TYPE_PCI_DEVICE , .instance_size =sizeof (PCINE2000State), .class_init = ne2000_class_init,
hw/ppc/mac_newworld.c +2 -1
@@ -55,6 +55,7 @@#include "hw/ppc/mac_dbdma.h" #include "hw/timer/m48t59.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h"
@@ -435,7 +436,7 @@ static void ppc_core99_init(MachineState *machine) }for (i =0 ; i < nb_nics; i++) { -pci_nic_init_nofail (&nd_table[i], pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_NE2000 ,NULL ); }/* The NewWorld NVRAM is not located in the MacIO device */
hw/ppc/mac_oldworld.c +2 -1
@@ -34,6 +34,7 @@#include "net/net.h" #include "hw/isa/isa.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h"
@@ -278,7 +279,7 @@ static void ppc_heathrow_init(MachineState *machine) escc_mem, 0, memory_region_size(escc_mem));for (i =0 ; i < nb_nics; i++) -pci_nic_init_nofail (&nd_table[i], pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_NE2000 ,NULL );ide_drive_get (hd,ARRAY_SIZE (hd));
hw/ppc/prep.c +1 -1
@@ -636,7 +636,7 @@ static void ppc_prep_init(MachineState *machine)isa_ne2000_init (isa_bus, ne2000_io[i], ne2000_irq[i], &nd_table[i]); }else { -pci_nic_init_nofail (&nd_table[i], pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_NE2000 ,NULL ); } }
hw/sparc64/sun4u.c +2 -1
@@ -32,6 +32,7 @@#include "hw/char/serial.h" #include "hw/timer/m48t59.h" #include "hw/input/i8042.h" +#include "hw/net/pci.h" #include "hw/block/fdc.h" #include "net/net.h" #include "qemu/timer.h"
@@ -476,7 +477,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, onboard_nic_idx = i; }else { -pci_nic_init_nofail (nd, pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_NE2000 ,NULL ); } } onboard_nic_idx =MAX (onboard_nic_idx,0 );
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000
Quoted 9 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/net/pci.h | 1 + hw/net/ne2000.c | 3 ++- hw/ppc/mac_newworld.c | 3 ++- hw/ppc/mac_oldworld.c | 3 ++- hw/ppc/prep.c | 2 +- hw/sparc64/sun4u.c | 3 ++- 6 files changed, 10 insertions(+), 5 deletions(-)
Re: [Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000
In reply to Philippe Mathieu-DaudéQuoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ppc portions
Quoted 118 lines
--- include/hw/net/pci.h | 1 + hw/net/ne2000.c | 3 ++- hw/ppc/mac_newworld.c | 3 ++- hw/ppc/mac_oldworld.c | 3 ++- hw/ppc/prep.c | 2 +- hw/sparc64/sun4u.c | 3 ++- 6 files changed, 10 insertions(+), 5 deletions(-)include/hw/net/pci.h +1
-0@@ -15,6 +15,7 @@#define TYPE_PCI_E1000 "e1000"#define TYPE_PCI_E1000E "e1000e" +#define TYPE_PCI_NE2000 "ne2k_pci"#define TYPE_PCI_PCNET "pcnet"#define TYPE_PCI_RTL8139 "rtl8139"hw/net/ne2000.c +2
-1@@ -23,6 +23,7 @@*/ #include "qemu/osdep.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "ne2000.h" #include "hw/loader.h" #include "sysemu/sysemu.h" @@ -779,7 +780,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data) }static const TypeInfo ne2000_info = { - .name ="ne2k_pci" , + .name =TYPE_PCI_NE2000 , .parent =TYPE_PCI_DEVICE , .instance_size =sizeof (PCINE2000State), .class_init = ne2000_class_init,hw/ppc/mac_newworld.c +2
-1@@ -55,6 +55,7 @@#include "hw/ppc/mac_dbdma.h" #include "hw/timer/m48t59.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -435,7 +436,7 @@ static void ppc_core99_init(MachineState *machine) }for (i =0 ; i < nb_nics; i++) { -pci_nic_init_nofail (&nd_table[i], pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_NE2000 ,NULL ); }/* The NewWorld NVRAM is not located in the MacIO device */ hw/ppc/mac_oldworld.c +2
-1@@ -34,6 +34,7 @@#include "net/net.h" #include "hw/isa/isa.h" #include "hw/pci/pci.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" @@ -278,7 +279,7 @@ static void ppc_heathrow_init(MachineState *machine) escc_mem, 0, memory_region_size(escc_mem));for (i =0 ; i < nb_nics; i++) -pci_nic_init_nofail (&nd_table[i], pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_NE2000 ,NULL );ide_drive_get (hd,ARRAY_SIZE (hd));hw/ppc/prep.c +1
-1@@ -636,7 +636,7 @@ static void ppc_prep_init(MachineState *machine)isa_ne2000_init (isa_bus, ne2000_io[i], ne2000_irq[i], &nd_table[i]); }else { -pci_nic_init_nofail (&nd_table[i], pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (&nd_table[i], pci_bus,TYPE_PCI_NE2000 ,NULL ); } }hw/sparc64/sun4u.c +2
-1@@ -32,6 +32,7 @@#include "hw/char/serial.h" #include "hw/timer/m48t59.h" #include "hw/input/i8042.h" +#include "hw/net/pci.h" #include "hw/block/fdc.h" #include "net/net.h" #include "qemu/timer.h" @@ -476,7 +477,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, onboard_nic_idx = i; }else { -pci_nic_init_nofail (nd, pci_bus,"ne2k_pci" ,NULL ); +pci_nic_init_nofail (nd, pci_bus,TYPE_PCI_NE2000 ,NULL ); } } onboard_nic_idx =MAX (onboard_nic_idx,0 );
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 33/34 hw/alpha: remove old i386 dependency
In reply to Philippe Mathieu-Daudé--- hw/alpha/alpha_sys.h | 2 -- hw/alpha/pci.c | 2 ++ hw/alpha/typhoon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
hw/alpha/alpha_sys.h +0 -2
@@ -5,8 +5,6 @@#include "target/alpha/cpu-qom.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_host.h" -#include "hw/ide.h" #include "hw/i386/pc.h" #include "hw/irq.h"
hw/alpha/pci.c +2 -0
@@ -8,6 +8,8 @@#include "qemu/osdep.h" #include "qemu-common.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_host.h" #include "alpha_sys.h" #include "qemu/log.h" #include "sysemu/sysemu.h"
hw/alpha/typhoon.c +1 -1
@@ -11,9 +11,9 @@#include "cpu.h" #include "hw/hw.h" #include "hw/devices.h" +#include "hw/pci/pci_host.h" #include "sysemu/sysemu.h" #include "alpha_sys.h" -#include "exec/address-spaces.h" #define TYPE_TYPHOON_PCI_HOST_BRIDGE "typhoon-pcihost"
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 33/34] hw/alpha: remove old i386 dependency
Quoted 12 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/alpha/alpha_sys.h | 2 -- hw/alpha/pci.c | 2 ++ hw/alpha/typhoon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)hw/alpha/alpha_sys.h +0
-0
hw/alpha/alpha_sys.h line 8
Quoted 6 lines
hw/alpha/alpha_sys.h +0
-2@@ -5,8 +5,6 @@#include "target/alpha/cpu-qom.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_host.h" -#include "hw/ide.h" #include "hw/i386/pc.h"
Didn't you want to remove that pc.h line according to the patch description?
Thomas
Re: [Qemu-devel] [PATCH 33/34] hw/alpha: remove old i386 dependency
Hi Thomas,
Quoted 14 lines · Thomas Huth
Quoted 13 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/alpha/alpha_sys.h | 2 -- hw/alpha/pci.c | 2 ++ hw/alpha/typhoon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)hw/alpha/alpha_sys.h +0
-0@@ -5,8 +5,6 @@
Quoted 7 lines
hw/alpha/alpha_sys.h line 8
Quoted 5 lines
hw/alpha/alpha_sys.h +0
-2#include "target/alpha/cpu-qom.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_host.h" -#include "hw/ide.h" #include "hw/i386/pc.h" Didn't you want to remove that
pc.hline according to the patch description?
Not yet :( This include is still needed for the i8259 PIC. This change is done in the part 2 (following series).
That said, I should improve the patch description :)
Re: [Qemu-devel] [PATCH 33/34] hw/alpha: remove old i386 dependency
In reply to Philippe Mathieu-Daudé2017-09-22 12:01 GMT-04:00 Philippe Mathieu-Daudé <[email protected]>:
hw/alpha/alpha_sys.h line 8
Quoted 11 lines
hw/alpha/alpha_sys.h +0
-2@@ -5,8 +5,6 @@#include "target/alpha/cpu-qom.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_host.h" -#include "hw/ide.h"
Why are you deleting pci/pci_host.h here?
Alternately, why are you leaving pci/pci.h?
hw/alpha/pci.c line 13
Quoted 11 lines
hw/alpha/pci.c +2
-0@@ -8,6 +8,8 @@#include "qemu/osdep.h" #include "qemu-common.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_host.h"
One way we have a double-include of pci/pci.h here, the other way we shouldn't re-include either.
r~
Re: [Qemu-devel] [PATCH 33/34] hw/alpha: remove old i386 dependency
Quoted 8 lines · Richard Henderson
2017-09-22 12:01 GMT-04:00 Philippe Mathieu-Daudé <[email protected]>:
Quoted 6 lines
hw/alpha/alpha_sys.h +0
-0@@ -5,8 +5,6 @@
Quoted 7 lines
hw/alpha/alpha_sys.h line 10
Quoted 5 lines
hw/alpha/alpha_sys.h +0
-2#include "target/alpha/cpu-qom.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_host.h" -#include "hw/ide.h" Why are you deleting
pci/pci_host.hhere?
Indeed it is required since PCIBus is defined there.
Quoted 9 lines
Alternately, why are you leaving
pci/pci.h?Quoted 6 lines
hw/alpha/pci.c +0
-0@@ -8,6 +8,8 @@
Quoted 8 lines
hw/alpha/pci.c
Quoted 5 lines
hw/alpha/pci.c +2
-0#include "qemu/osdep.h" #include "qemu-common.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_host.h" One way we have a double-include of
pci/pci.hhere, the other way we shouldn't re-include either.
Please ignore this patch.
PATCH 34/34 misc: drop old i386 dependency
In reply to Philippe Mathieu-Daudéwhile here, add an entry for wdt_ib700 in MAINTAINERS
--- hw/char/debugcon.c | 1 - hw/intc/lm32_pic.c | 1 - hw/moxie/moxiesim.c | 1 - hw/sparc/sun4m.c | 1 - hw/watchdog/wdt_ib700.c | 1 - MAINTAINERS | 1 + 6 files changed, 1 insertion(+), 5 deletions(-)
hw/char/debugcon.c +0 -1
@@ -29,7 +29,6 @@#include "hw/hw.h" #include "chardev/char-fe.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" #define TYPE_ISA_DEBUGCON_DEVICE "isa-debugcon"#define ISA_DEBUGCON_DEVICE (obj) \
hw/intc/lm32_pic.c +0 -1
@@ -20,7 +20,6 @@#include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "monitor/monitor.h" #include "hw/sysbus.h" #include "trace.h"
hw/moxie/moxiesim.c +0 -1
@@ -30,7 +30,6 @@#include "cpu.h" #include "hw/sysbus.h" #include "hw/hw.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "net/net.h" #include "sysemu/sysemu.h"
hw/sparc/sun4m.c +0 -1
@@ -36,7 +36,6 @@#include "net/net.h" #include "hw/boards.h" #include "hw/scsi/esp.h" -#include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "hw/nvram/sun_nvram.h" #include "hw/nvram/chrp_nvram.h"
hw/watchdog/wdt_ib700.c +0 -1
@@ -25,7 +25,6 @@#include "sysemu/watchdog.h" #include "hw/hw.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" /*#define IB700_DEBUG 1*/
MAINTAINERS +1 -0
@@ -852,6 +852,7 @@ F: hw/misc/pc-testdev.c F: hw/timer/hpet* F: hw/timer/i8254* F: hw/timer/mc146818rtc* +F: hw/watchdog/wdt_ib700.c F: include/hw/dma/i8257_dma.h F: include/hw/i2c/pm_smbus.h F: include/hw/input/i8042.h
Signature · 1 line
2.14.1
Re: [Qemu-devel] [PATCH 34/34] misc: drop old i386 dependency
Quoted 11 lines · Philippe Mathieu-Daudé
while here, add an entry for
wdt_ib700inMAINTAINERSSigned-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/char/debugcon.c | 1 - hw/intc/lm32_pic.c | 1 - hw/moxie/moxiesim.c | 1 - hw/sparc/sun4m.c | 1 - hw/watchdog/wdt_ib700.c | 1 - MAINTAINERS | 1 + 6 files changed, 1 insertion(+), 5 deletions(-)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hervé Poussineau
Reviewed-byRe: [Qemu-devel] [PATCH 21/34] hw/display/vga: remove the old i386/pc dependency
Quoted 18 lines · Philippe Mathieu-Daudé
move public API to "
hw/display/vga.h" and private registers to "hw/display/vga_int_regs.h"Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
./scripts/get_maintainer.pl-f hw/display/vga*
get_maintainer.pl: No maintainers found...hw/display/vga_int.h | 3 ++- hw/display/{vga.h => vga_int_regs.h} | 0 include/hw/display/vga.h | 25 +++++++++++++++++++++++++ include/hw/i386/pc.h | 12 ------------ hw/display/vga-isa-mm.c | 4 +--- hw/display/vga-isa.c | 2 +- hw/display/vga.c | 4 ++-- hw/mips/mips_jazz.c | 1 + vl.c | 2 +- 9 files changed, 33 insertions(+), 20 deletions(-)
Quoted 3 lines
rename
hw/display/{vga.h=>vga_int_regs.h} (100%) create mode 100644include/hw/display/vga.h
Michael Tokarev
AppliedThis was an old(ish) patchset. Aplying it now.
Quoted 11 lines · Philippe Mathieu-Daudé
Hi,
quite a bunch of patches and files modified, but the diffstat is not that big.
First part is from clean-includes script, Then comes code movement, about no logical changes.
Now some non-x86 builds and cocci spatch run a bit faster :)
I updated some
MAINTAINERSentries while here.
Quoted 8 lines
Also I couldn't test the KVM/XEN/HAX part.
Regards,
Phil.
Philippe Mathieu-Daudé (34):
hw: use "qemu/osdep.h" as first #include in source files
applied
Quoted 1 line
hw: remove "
qemu/osdep.h" from header files
not applied, doing two things, suggested split-up
(I'm fine with it as it is)
Quoted 1 line
block: remove "
qemu/osdep.h" from header file
applied
Quoted 1 line
misc: remove headers implicitly included
applied
Quoted 1 line
misc: remove duplicated includes
applied
Quoted 1 line
ppc: remove duplicated includes
applied
Quoted 1 line
i386/hax: remove duplicated includes
applied (note it can be trimmed more)
Quoted 1 line
nios2: remove duplicated includes
applied
Quoted 1 line
misc: avoid "
include/" in include path
not applied, probably should be split, but I'm fine with it as it is
Quoted 1 line
amd_iommu: avoid needless includes in header file
applied
Quoted 1 line
i386/pc: use
TYPE_PORT92
applied
Quoted 1 line
misc: remove old i386 dependency
applied
Quoted 1 line
hw/ide: remove old i386 dependency
applied
Quoted 1 line
hw/ipmi: remove old i386 dependency
applied
Quoted 1 line
hw/i2c: remove old i386 dependency
applied
Quoted 1 line
hw/tpm: remove old i386 dependency
applied
Quoted 1 line
hw/virtio-balloon: remove old i386 dependency
applied
Quoted 1 line
hw/unicore32: restrict hw addr defines to source file
applied
Quoted 1 line
hw/acpi: ACPI_PM_* defines are not restricted to i386 arch
applied
Quoted 1 line
hw/timer/i8254: rename
pit_init()->i8254_pit_init()
not applied, split?
Quoted 1 line
hw/display/vga: remove the old i386/pc dependency
somehow I can't find this patch, neither in my inbox nor in patchwork
Quoted 1 line
hw/input/i8042: extract API from
hw/i386/pc.h
CHECK
Quoted 1 line
hw/dma/i8257: rename
DMA_init()toi8257_dma_init()
not applied, pending **errp addition
Quoted 1 line
hw/timer/mc146818: rename
rtc_init()->mc146818_init()
applied
Quoted 1 line
hw/timer/m48t59: use
TYPE_M48T59_ISA, add entries toMAINTAINERS
not applied, it went out of context without i8257_dma_init rename btw, why do we prefer these TYPE_XXX things instead of simple "xxx" stuff?
Quoted 1 line
hw/net/ne2000: extract ne2k-isa code from i386/pc to
ne2000-isa.c
applied
Quoted 1 line
hw/pci: declare
pci_nic_init_nofail()in "hw/net/pci.h"
not applied, it does more than mentioned
Quoted 5 lines
hw/net/e1000: use
TYPE_PCI_E1000
hw/net/e1000e: useTYPE_PCI_E1000E
hw/net/pcnet: useTYPE_PCI_PCNET
hw/net/rtl8139: useTYPE_PCI_RTL8139
hw/net/ne2000: useTYPE_PCI_NE2000
Not applied, at least not yet, why do we use these TYPE_XX stuff to start with?
Quoted 1 line
hw/alpha: remove old i386 dependency
not applied
Quoted 1 line
misc: drop old i386 dependency
applied, except of the MAINTAINERS part.
Applying these series is quite a bit boring task I'd say :)
Thanks,
/mjt
Hi Michael,
Thanks for your comments!
Quoted 3 lines
Quoted 1 line
hw: remove "
qemu/osdep.h" from header filesnot applied, doing two things, suggested split-up
(I'm fine with it as it is)
split out MAINTAINERS entry
Quoted 2 lines
Quoted 1 line
i386/hax: remove duplicated includes
applied (note it can be trimmed more)
done in another patch.
Quoted 2 lines
Quoted 1 line
misc: avoid "
include/" in include pathnot applied, probably should be split, but I'm fine with it as it is
split out numa.c
Quoted 2 lines
Quoted 1 line
hw/timer/i8254: rename
pit_init()->i8254_pit_init()not applied, split?
split out MAINTAINERS entry
Quoted 2 lines
Quoted 1 line
hw/display/vga: remove the old i386/pc dependency
somehow I can't find this patch, neither in my inbox nor in patchwork
weird...
Quoted 2 lines
Quoted 1 line
hw/input/i8042: extract API from
hw/i386/pc.hCHECK
split out MAINTAINERS entry
Quoted 2 lines
Quoted 1 line
hw/dma/i8257: rename
DMA_init()toi8257_dma_init()not applied, pending **errp addition
attempt to fix it...
Quoted 3 lines
Quoted 1 line
hw/timer/m48t59: use
TYPE_M48T59_ISA, add entries toMAINTAINERSnot applied, it went out of context without
i8257_dma_initrename btw, why do we prefer theseTYPE_XXXthings instead of simple "xxx" stuff?
split out MAINTAINERS entry, dropped out TYPE_M48T59_ISA use.
Quoted 2 lines
Quoted 1 line
hw/pci: declare
pci_nic_init_nofail()in "hw/net/pci.h"not applied, it does more than mentioned
dropped from this series.
Quoted 8 lines
Quoted 5 lines
hw/net/e1000: use
TYPE_PCI_E1000
hw/net/e1000e: useTYPE_PCI_E1000E
hw/net/pcnet: useTYPE_PCI_PCNET
hw/net/rtl8139: useTYPE_PCI_RTL8139
hw/net/ne2000: useTYPE_PCI_NE2000Not applied, at least not yet, why do we use these
TYPE_XXstuff to start with?
TYPE_XX is the interface, having the devices using TYPE_XX instead of hardcoded name guarantee safe rename/refactor.
anyway, dropped.
Quoted 1 line
Applying these series is quite a bit boring task I'd say :)
separating them from the whole branch too! but they are required for the final objective which I'll send in 3 or 4 parts.
Regards,
Phil.