From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlQv9-0001sA-7p for qemu-devel@nongnu.org; Thu, 12 Jan 2012 15:06:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlQv6-0000RH-KX for qemu-devel@nongnu.org; Thu, 12 Jan 2012 15:06:47 -0500 Received: from mail-qw0-f52.google.com ([209.85.216.52]:35783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlQv6-0000RD-GS for qemu-devel@nongnu.org; Thu, 12 Jan 2012 15:06:44 -0500 Received: by qadc11 with SMTP id c11so526044qad.4 for ; Thu, 12 Jan 2012 12:06:43 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1326390853-1892-1-git-send-email-aliguori@us.ibm.com> References: <1326390853-1892-1-git-send-email-aliguori@us.ibm.com> Date: Thu, 12 Jan 2012 20:06:43 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] build: fix target_phys_addr_t to 64-bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 12 January 2012 17:54, Anthony Liguori wrote: > This simplifies the build quite a bit and improves the builds performance= by > not rebuilding many objects twice. > > There were a surprising number of places that had assumed wrong things ab= out the > size of target_phys_addr_t including that it was fixed at 32-bit and that= it > was identical to target_ulong. Up until now, in a lot of CPU-specific code it has been perfectly reasonabl= e to assume target_phys_addr_t was 32 bits. > > Signed-off-by: Anthony Liguori > --- > =C2=A0Makefile =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A02 +- > =C2=A0Makefile.hw =C2=A0 =C2=A0 | =C2=A0 25 -------- > =C2=A0Makefile.objs =C2=A0 | =C2=A0182 +++++++++++++++++++++++++++-------= --------------------- > =C2=A0Makefile.target | =C2=A0 =C2=A04 - > =C2=A0configure =C2=A0 =C2=A0 =C2=A0 | =C2=A0 13 +---- > =C2=A0cpu-common.h =C2=A0 =C2=A0| =C2=A0 =C2=A08 --- > =C2=A0dma.h =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A02 - > =C2=A0hw/a9mpcore.c =C2=A0 | =C2=A0 =C2=A04 +- > =C2=A0hw/hw.h =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A02 +- > =C2=A0hw/intel-hda.c =C2=A0| =C2=A0 =C2=A04 - > =C2=A0hw/omap.h =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A06 -- > =C2=A0hw/pxa2xx_dma.c | =C2=A0 =C2=A06 +- > =C2=A0hw/pxa2xx_lcd.c | =C2=A0 =C2=A06 +- > =C2=A0hw/rtl8139.c =C2=A0 =C2=A0| =C2=A0 =C2=A04 - > =C2=A0hw/sh_serial.c =C2=A0| =C2=A0 =C2=A06 +- > =C2=A0monitor.c =C2=A0 =C2=A0 =C2=A0 | =C2=A0 21 ------ > =C2=A0qemu-log.h =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A04 +- > =C2=A0targphys.h =C2=A0 =C2=A0 =C2=A0| =C2=A0 11 --- > =C2=A018 files changed, 106 insertions(+), 204 deletions(-) > =C2=A0delete mode 100644 Makefile.hw > > diff --git a/Makefile b/Makefile > index 2bbc547..32a8ec6 100644 > --- a/Makefile > +++ b/Makefile > @@ -197,7 +197,7 @@ $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) $(GENERATED_HEA= DERS) > > =C2=A0qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(qapi-obj-y) $(tools-obj-= y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ) > > -QEMULIBS=3Dlibhw32 libhw64 libuser libdis libdis-user > +QEMULIBS=3Dlibuser libdis libdis-user > > =C2=A0clean: > =C2=A0# avoid old build problems by removing potentially incorrect old fi= les > diff --git a/Makefile.hw b/Makefile.hw > deleted file mode 100644 > index 63eb7e4..0000000 > --- a/Makefile.hw > +++ /dev/null > @@ -1,25 +0,0 @@ > -# Makefile for qemu target independent devices. > - > -include ../config-host.mak > -include ../config-all-devices.mak > -include config.mak > -include $(SRC_PATH)/rules.mak > - > -.PHONY: all > - > -$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw) > - > -QEMU_CFLAGS+=3D-I.. > -QEMU_CFLAGS +=3D $(GLIB_CFLAGS) > - > -include $(SRC_PATH)/Makefile.objs > - > -all: $(hw-obj-y) > -# Dummy command so that make thinks it has done something > - =C2=A0 =C2=A0 =C2=A0 @true > - > -clean: > - =C2=A0 =C2=A0 =C2=A0 rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ > - > -# Include automatically generated dependency files > --include $(wildcard *.d */*.d) > diff --git a/Makefile.objs b/Makefile.objs > index 4f6d26c..13a2281 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -179,118 +179,114 @@ user-obj-y +=3D tcg-runtime.o host-utils.o > =C2=A0user-obj-y +=3D cutils.o cache-utils.o > =C2=A0user-obj-y +=3D $(trace-obj-y) > > -###################################################################### > -# libhw > - > -hw-obj-y =3D > -hw-obj-y +=3D vl.o loader.o > -hw-obj-$(CONFIG_VIRTIO) +=3D virtio-console.o > -hw-obj-y +=3D usb-libhw.o > -hw-obj-$(CONFIG_VIRTIO_PCI) +=3D virtio-pci.o > -hw-obj-y +=3D fw_cfg.o > -hw-obj-$(CONFIG_PCI) +=3D pci.o pci_bridge.o > -hw-obj-$(CONFIG_PCI) +=3D msix.o msi.o > -hw-obj-$(CONFIG_PCI) +=3D pci_host.o pcie_host.o > -hw-obj-$(CONFIG_PCI) +=3D ioh3420.o xio3130_upstream.o xio3130_downstrea= m.o > -hw-obj-y +=3D watchdog.o > -hw-obj-$(CONFIG_ISA_MMIO) +=3D isa_mmio.o > -hw-obj-$(CONFIG_ECC) +=3D ecc.o > -hw-obj-$(CONFIG_NAND) +=3D nand.o > -hw-obj-$(CONFIG_PFLASH_CFI01) +=3D pflash_cfi01.o > -hw-obj-$(CONFIG_PFLASH_CFI02) +=3D pflash_cfi02.o > - > -hw-obj-$(CONFIG_M48T59) +=3D m48t59.o > -hw-obj-$(CONFIG_ESCC) +=3D escc.o > -hw-obj-$(CONFIG_EMPTY_SLOT) +=3D empty_slot.o > - > -hw-obj-$(CONFIG_SERIAL) +=3D serial.o > -hw-obj-$(CONFIG_PARALLEL) +=3D parallel.o > -hw-obj-$(CONFIG_I8254) +=3D i8254.o > -hw-obj-$(CONFIG_PCSPK) +=3D pcspk.o > -hw-obj-$(CONFIG_PCKBD) +=3D pckbd.o > -hw-obj-$(CONFIG_USB_UHCI) +=3D usb-uhci.o > -hw-obj-$(CONFIG_USB_OHCI) +=3D usb-ohci.o > -hw-obj-$(CONFIG_USB_EHCI) +=3D usb-ehci.o > -hw-obj-$(CONFIG_FDC) +=3D fdc.o > -hw-obj-$(CONFIG_ACPI) +=3D acpi.o acpi_piix4.o > -hw-obj-$(CONFIG_APM) +=3D pm_smbus.o apm.o > -hw-obj-$(CONFIG_DMA) +=3D dma.o > -hw-obj-$(CONFIG_HPET) +=3D hpet.o > -hw-obj-$(CONFIG_APPLESMC) +=3D applesmc.o > -hw-obj-$(CONFIG_SMARTCARD) +=3D usb-ccid.o ccid-card-passthru.o > -hw-obj-$(CONFIG_SMARTCARD_NSS) +=3D ccid-card-emulated.o > -hw-obj-$(CONFIG_USB_REDIR) +=3D usb-redir.o > -hw-obj-$(CONFIG_I8259) +=3D i8259.o > +common-obj-y +=3D vl.o loader.o > +common-obj-$(CONFIG_VIRTIO) +=3D virtio-console.o > +common-obj-y +=3D usb-libhw.o > +common-obj-$(CONFIG_VIRTIO_PCI) +=3D virtio-pci.o > +common-obj-y +=3D fw_cfg.o > +common-obj-$(CONFIG_PCI) +=3D pci.o pci_bridge.o > +common-obj-$(CONFIG_PCI) +=3D msix.o msi.o > +common-obj-$(CONFIG_PCI) +=3D pci_host.o pcie_host.o > +common-obj-$(CONFIG_PCI) +=3D ioh3420.o xio3130_upstream.o xio3130_downs= tream.o > +common-obj-y +=3D watchdog.o > +common-obj-$(CONFIG_ISA_MMIO) +=3D isa_mmio.o > +common-obj-$(CONFIG_ECC) +=3D ecc.o > +common-obj-$(CONFIG_NAND) +=3D nand.o > +common-obj-$(CONFIG_PFLASH_CFI01) +=3D pflash_cfi01.o > +common-obj-$(CONFIG_PFLASH_CFI02) +=3D pflash_cfi02.o > + > +common-obj-$(CONFIG_M48T59) +=3D m48t59.o > +common-obj-$(CONFIG_ESCC) +=3D escc.o > +common-obj-$(CONFIG_EMPTY_SLOT) +=3D empty_slot.o > + > +common-obj-$(CONFIG_SERIAL) +=3D serial.o > +common-obj-$(CONFIG_PARALLEL) +=3D parallel.o > +common-obj-$(CONFIG_I8254) +=3D i8254.o > +common-obj-$(CONFIG_PCSPK) +=3D pcspk.o > +common-obj-$(CONFIG_PCKBD) +=3D pckbd.o > +common-obj-$(CONFIG_USB_UHCI) +=3D usb-uhci.o > +common-obj-$(CONFIG_USB_OHCI) +=3D usb-ohci.o > +common-obj-$(CONFIG_USB_EHCI) +=3D usb-ehci.o > +common-obj-$(CONFIG_FDC) +=3D fdc.o > +common-obj-$(CONFIG_ACPI) +=3D acpi.o acpi_piix4.o > +common-obj-$(CONFIG_APM) +=3D pm_smbus.o apm.o > +common-obj-$(CONFIG_DMA) +=3D dma.o > +common-obj-$(CONFIG_HPET) +=3D hpet.o > +common-obj-$(CONFIG_APPLESMC) +=3D applesmc.o > +common-obj-$(CONFIG_SMARTCARD) +=3D usb-ccid.o ccid-card-passthru.o > +common-obj-$(CONFIG_SMARTCARD_NSS) +=3D ccid-card-emulated.o > +common-obj-$(CONFIG_USB_REDIR) +=3D usb-redir.o > +common-obj-$(CONFIG_I8259) +=3D i8259.o Why is all this makefile frobbery in the same patch as the things fixing assumptions about the size of the type and the actual change to the size of the type? > > =C2=A0# PPC devices > -hw-obj-$(CONFIG_PREP_PCI) +=3D prep_pci.o > +common-obj-$(CONFIG_PREP_PCI) +=3D prep_pci.o > =C2=A0# Mac shared devices > -hw-obj-$(CONFIG_MACIO) +=3D macio.o > -hw-obj-$(CONFIG_CUDA) +=3D cuda.o > -hw-obj-$(CONFIG_ADB) +=3D adb.o > -hw-obj-$(CONFIG_MAC_NVRAM) +=3D mac_nvram.o > -hw-obj-$(CONFIG_MAC_DBDMA) +=3D mac_dbdma.o > +common-obj-$(CONFIG_MACIO) +=3D macio.o > +common-obj-$(CONFIG_CUDA) +=3D cuda.o > +common-obj-$(CONFIG_ADB) +=3D adb.o > +common-obj-$(CONFIG_MAC_NVRAM) +=3D mac_nvram.o > +common-obj-$(CONFIG_MAC_DBDMA) +=3D mac_dbdma.o > =C2=A0# OldWorld PowerMac > -hw-obj-$(CONFIG_HEATHROW_PIC) +=3D heathrow_pic.o > -hw-obj-$(CONFIG_GRACKLE_PCI) +=3D grackle_pci.o > +common-obj-$(CONFIG_HEATHROW_PIC) +=3D heathrow_pic.o > +common-obj-$(CONFIG_GRACKLE_PCI) +=3D grackle_pci.o > =C2=A0# NewWorld PowerMac > -hw-obj-$(CONFIG_UNIN_PCI) +=3D unin_pci.o > -hw-obj-$(CONFIG_DEC_PCI) +=3D dec_pci.o > +common-obj-$(CONFIG_UNIN_PCI) +=3D unin_pci.o > +common-obj-$(CONFIG_DEC_PCI) +=3D dec_pci.o > =C2=A0# PowerPC E500 boards > -hw-obj-$(CONFIG_PPCE500_PCI) +=3D ppce500_pci.o > +common-obj-$(CONFIG_PPCE500_PCI) +=3D ppce500_pci.o > > =C2=A0# MIPS devices > -hw-obj-$(CONFIG_PIIX4) +=3D piix4.o > -hw-obj-$(CONFIG_G364FB) +=3D g364fb.o > +common-obj-$(CONFIG_PIIX4) +=3D piix4.o > +common-obj-$(CONFIG_G364FB) +=3D g364fb.o > > =C2=A0# PCI watchdog devices > -hw-obj-$(CONFIG_PCI) +=3D wdt_i6300esb.o > +common-obj-$(CONFIG_PCI) +=3D wdt_i6300esb.o > > -hw-obj-$(CONFIG_PCI) +=3D pcie.o pcie_aer.o pcie_port.o > +common-obj-$(CONFIG_PCI) +=3D pcie.o pcie_aer.o pcie_port.o > > =C2=A0# PCI network cards > -hw-obj-$(CONFIG_NE2000_PCI) +=3D ne2000.o > -hw-obj-$(CONFIG_EEPRO100_PCI) +=3D eepro100.o > -hw-obj-$(CONFIG_PCNET_PCI) +=3D pcnet-pci.o > -hw-obj-$(CONFIG_PCNET_COMMON) +=3D pcnet.o > -hw-obj-$(CONFIG_E1000_PCI) +=3D e1000.o > -hw-obj-$(CONFIG_RTL8139_PCI) +=3D rtl8139.o > - > -hw-obj-$(CONFIG_SMC91C111) +=3D smc91c111.o > -hw-obj-$(CONFIG_LAN9118) +=3D lan9118.o > -hw-obj-$(CONFIG_NE2000_ISA) +=3D ne2000-isa.o > -hw-obj-$(CONFIG_OPENCORES_ETH) +=3D opencores_eth.o > +common-obj-$(CONFIG_NE2000_PCI) +=3D ne2000.o > +common-obj-$(CONFIG_EEPRO100_PCI) +=3D eepro100.o > +common-obj-$(CONFIG_PCNET_PCI) +=3D pcnet-pci.o > +common-obj-$(CONFIG_PCNET_COMMON) +=3D pcnet.o > +common-obj-$(CONFIG_E1000_PCI) +=3D e1000.o > +common-obj-$(CONFIG_RTL8139_PCI) +=3D rtl8139.o > + > +common-obj-$(CONFIG_SMC91C111) +=3D smc91c111.o > +common-obj-$(CONFIG_LAN9118) +=3D lan9118.o > +common-obj-$(CONFIG_NE2000_ISA) +=3D ne2000-isa.o > +common-obj-$(CONFIG_OPENCORES_ETH) +=3D opencores_eth.o > > =C2=A0# IDE > -hw-obj-$(CONFIG_IDE_CORE) +=3D ide/core.o ide/atapi.o > -hw-obj-$(CONFIG_IDE_QDEV) +=3D ide/qdev.o > -hw-obj-$(CONFIG_IDE_PCI) +=3D ide/pci.o > -hw-obj-$(CONFIG_IDE_ISA) +=3D ide/isa.o > -hw-obj-$(CONFIG_IDE_PIIX) +=3D ide/piix.o > -hw-obj-$(CONFIG_IDE_CMD646) +=3D ide/cmd646.o > -hw-obj-$(CONFIG_IDE_MACIO) +=3D ide/macio.o > -hw-obj-$(CONFIG_IDE_VIA) +=3D ide/via.o > -hw-obj-$(CONFIG_AHCI) +=3D ide/ahci.o > -hw-obj-$(CONFIG_AHCI) +=3D ide/ich.o > +common-obj-$(CONFIG_IDE_CORE) +=3D ide/core.o ide/atapi.o > +common-obj-$(CONFIG_IDE_QDEV) +=3D ide/qdev.o > +common-obj-$(CONFIG_IDE_PCI) +=3D ide/pci.o > +common-obj-$(CONFIG_IDE_ISA) +=3D ide/isa.o > +common-obj-$(CONFIG_IDE_PIIX) +=3D ide/piix.o > +common-obj-$(CONFIG_IDE_CMD646) +=3D ide/cmd646.o > +common-obj-$(CONFIG_IDE_MACIO) +=3D ide/macio.o > +common-obj-$(CONFIG_IDE_VIA) +=3D ide/via.o > +common-obj-$(CONFIG_AHCI) +=3D ide/ahci.o > +common-obj-$(CONFIG_AHCI) +=3D ide/ich.o > > =C2=A0# SCSI layer > -hw-obj-$(CONFIG_LSI_SCSI_PCI) +=3D lsi53c895a.o > -hw-obj-$(CONFIG_ESP) +=3D esp.o > +common-obj-$(CONFIG_LSI_SCSI_PCI) +=3D lsi53c895a.o > +common-obj-$(CONFIG_ESP) +=3D esp.o > > -hw-obj-y +=3D dma-helpers.o sysbus.o isa-bus.o > -hw-obj-y +=3D qdev-addr.o container.o > +common-obj-y +=3D dma-helpers.o sysbus.o isa-bus.o > +common-obj-y +=3D qdev-addr.o container.o > > =C2=A0# VGA > -hw-obj-$(CONFIG_VGA_PCI) +=3D vga-pci.o > -hw-obj-$(CONFIG_VGA_ISA) +=3D vga-isa.o > -hw-obj-$(CONFIG_VGA_ISA_MM) +=3D vga-isa-mm.o > -hw-obj-$(CONFIG_VMWARE_VGA) +=3D vmware_vga.o > -hw-obj-$(CONFIG_VMMOUSE) +=3D vmmouse.o > +common-obj-$(CONFIG_VGA_PCI) +=3D vga-pci.o > +common-obj-$(CONFIG_VGA_ISA) +=3D vga-isa.o > +common-obj-$(CONFIG_VGA_ISA_MM) +=3D vga-isa-mm.o > +common-obj-$(CONFIG_VMWARE_VGA) +=3D vmware_vga.o > +common-obj-$(CONFIG_VMMOUSE) +=3D vmmouse.o > > -hw-obj-$(CONFIG_RC4030) +=3D rc4030.o > -hw-obj-$(CONFIG_DP8393X) +=3D dp8393x.o > -hw-obj-$(CONFIG_DS1225Y) +=3D ds1225y.o > -hw-obj-$(CONFIG_MIPSNET) +=3D mipsnet.o > +common-obj-$(CONFIG_RC4030) +=3D rc4030.o > +common-obj-$(CONFIG_DP8393X) +=3D dp8393x.o > +common-obj-$(CONFIG_DS1225Y) +=3D ds1225y.o > +common-obj-$(CONFIG_MIPSNET) +=3D mipsnet.o > > =C2=A0# Sound > =C2=A0sound-obj-y =3D > @@ -303,7 +299,7 @@ sound-obj-$(CONFIG_CS4231A) +=3D cs4231a.o > =C2=A0sound-obj-$(CONFIG_HDA) +=3D intel-hda.o hda-audio.o > > =C2=A0adlib.o fmopl.o: QEMU_CFLAGS +=3D -DBUILD_Y8950=3D0 > -hw-obj-$(CONFIG_SOUND) +=3D $(sound-obj-y) > +common-obj-$(CONFIG_SOUND) +=3D $(sound-obj-y) > > =C2=A09pfs-nested-$(CONFIG_VIRTFS) =C2=A0=3D virtio-9p.o > =C2=A09pfs-nested-$(CONFIG_VIRTFS) +=3D virtio-9p-local.o virtio-9p-xattr= .o > @@ -313,7 +309,7 @@ hw-obj-$(CONFIG_SOUND) +=3D $(sound-obj-y) > =C2=A09pfs-nested-$(CONFIG_OPEN_BY_HANDLE) +=3D =C2=A0virtio-9p-handle.o > =C2=A09pfs-nested-$(CONFIG_VIRTFS) +=3D virtio-9p-proxy.o > > -hw-obj-$(CONFIG_REALLY_VIRTFS) +=3D $(addprefix 9pfs/, $(9pfs-nested-y)) > +common-obj-$(CONFIG_REALLY_VIRTFS) +=3D $(addprefix 9pfs/, $(9pfs-nested= -y)) > =C2=A0$(addprefix 9pfs/, $(9pfs-nested-y)): QEMU_CFLAGS+=3D$(GLIB_CFLAGS) > > > diff --git a/Makefile.target b/Makefile.target > index 06d79b8..1a832db 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -9,9 +9,6 @@ include ../config-host.mak > =C2=A0include config-devices.mak > =C2=A0include config-target.mak > =C2=A0include $(SRC_PATH)/rules.mak > -ifneq ($(HWDIR),) > -include $(HWDIR)/config.mak > -endif > > =C2=A0TARGET_PATH=3D$(SRC_PATH)/target-$(TARGET_BASE_ARCH) > =C2=A0$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw) > @@ -392,7 +389,6 @@ $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HE= ADERS) > =C2=A0obj-y +=3D $(addprefix ../, $(common-obj-y)) > =C2=A0obj-y +=3D $(addprefix ../libdis/, $(libdis-y)) > =C2=A0obj-y +=3D $(libobj-y) > -obj-y +=3D $(addprefix $(HWDIR)/, $(hw-obj-y)) > =C2=A0obj-y +=3D $(addprefix ../, $(trace-obj-y)) > > =C2=A0endif # CONFIG_SOFTMMU > diff --git a/configure b/configure > index eb9a01d..c184465 100755 > --- a/configure > +++ b/configure > @@ -3574,8 +3574,6 @@ if test "$target_softmmu" =3D "yes" ; then > =C2=A0 echo "TARGET_PHYS_ADDR_BITS=3D$target_phys_bits" >> $config_target= _mak > =C2=A0 echo "CONFIG_SOFTMMU=3Dy" >> $config_target_mak > =C2=A0 echo "LIBS+=3D$libs_softmmu $target_libs_softmmu" >> $config_targe= t_mak > - =C2=A0echo "HWDIR=3D../libhw$target_phys_bits" >> $config_target_mak > - =C2=A0echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_h= ost_mak > =C2=A0fi > =C2=A0if test "$target_user_only" =3D "yes" ; then > =C2=A0 echo "CONFIG_USER_ONLY=3Dy" >> $config_target_mak > @@ -3780,7 +3778,7 @@ DIRS=3D"$DIRS pc-bios/spapr-rtas" > =C2=A0DIRS=3D"$DIRS roms/seabios roms/vgabios" > =C2=A0DIRS=3D"$DIRS fsdev ui" > =C2=A0DIRS=3D"$DIRS qapi qapi-generated" > -DIRS=3D"$DIRS qga trace" > +DIRS=3D"$DIRS qga trace ide 9pfs" > =C2=A0FILES=3D"Makefile tests/tcg/Makefile qdict-test-data.txt" > =C2=A0FILES=3D"$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" > =C2=A0FILES=3D"$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" > @@ -3815,15 +3813,6 @@ for rom in seabios vgabios ; do > =C2=A0 =C2=A0 echo "LD=3D$ld" >> $config_mak > =C2=A0done > > -for hwlib in 32 64; do > - =C2=A0d=3Dlibhw$hwlib > - =C2=A0mkdir -p $d > - =C2=A0mkdir -p $d/ide > - =C2=A0symlink $source_path/Makefile.hw $d/Makefile > - =C2=A0mkdir -p $d/9pfs > - =C2=A0echo "QEMU_CFLAGS+=3D-DTARGET_PHYS_ADDR_BITS=3D$hwlib" > $d/confi= g.mak > -done > - > =C2=A0if [ "$source_path" !=3D `pwd` ]; then > =C2=A0 =C2=A0 # out of tree build > =C2=A0 =C2=A0 mkdir -p libcacard > diff --git a/cpu-common.h b/cpu-common.h > index a40c57d..85a3b35 100644 > --- a/cpu-common.h > +++ b/cpu-common.h > @@ -3,9 +3,7 @@ > > =C2=A0/* CPU interfaces that are target independent. =C2=A0*/ > > -#ifdef TARGET_PHYS_ADDR_BITS > =C2=A0#include "targphys.h" > -#endif > > =C2=A0#ifndef NEED_CPU_H > =C2=A0#include "poison.h" > @@ -23,15 +21,9 @@ enum device_endian { > =C2=A0}; > > =C2=A0/* address in the RAM (different from a physical address) */ > -#if defined(CONFIG_XEN_BACKEND) && TARGET_PHYS_ADDR_BITS =3D=3D 64 > =C2=A0typedef uint64_t ram_addr_t; > =C2=A0# =C2=A0define RAM_ADDR_MAX UINT64_MAX > =C2=A0# =C2=A0define RAM_ADDR_FMT "%" PRIx64 > -#else > -typedef unsigned long ram_addr_t; > -# =C2=A0define RAM_ADDR_MAX ULONG_MAX > -# =C2=A0define RAM_ADDR_FMT "%lx" > -#endif > > =C2=A0/* memory API */ > > diff --git a/dma.h b/dma.h > index a13209d..03c6843 100644 > --- a/dma.h > +++ b/dma.h > @@ -17,7 +17,6 @@ > > =C2=A0typedef struct ScatterGatherEntry ScatterGatherEntry; > > -#if defined(TARGET_PHYS_ADDR_BITS) > =C2=A0typedef target_phys_addr_t dma_addr_t; > > =C2=A0#define DMA_ADDR_FMT TARGET_FMT_plx > @@ -42,7 +41,6 @@ struct QEMUSGList { > =C2=A0void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint); > =C2=A0void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t l= en); > =C2=A0void qemu_sglist_destroy(QEMUSGList *qsg); > -#endif > > =C2=A0typedef BlockDriverAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t s= ector_num, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0QEMUIOVector *iov, int nb_sect= ors, > diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c > index 3ef0e13..fece100 100644 > --- a/hw/a9mpcore.c > +++ b/hw/a9mpcore.c > @@ -87,8 +87,8 @@ static void a9_scu_write(void *opaque, target_phys_addr= _t offset, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 mask =3D 0xffffffff; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; > =C2=A0 =C2=A0 default: > - =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "Invalid size %u in write to= a9 scu register %x\n", > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0size, offset); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "Invalid size %u in write to= a9 scu register " > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TARGET_FMT_plx "= \n", size, offset); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return; > =C2=A0 =C2=A0 } I don't like this. When target_phys_addr_t was 32 bits, then using TARGET_FMT_plx to print offsets into devices isn't too unreasonable as you only get 8 hex digits. If you expand to 64 bits then suddenly all these offsets which are actually really typically small numbers get printed as 16 hex digits, which I think looks bad. I'm dubious about the utility of being able to hand a 64 bit offset into an device IO routine anyway. > diff --git a/hw/hw.h b/hw/hw.h > index 932014a..8d0c7c9 100644 > --- a/hw/hw.h > +++ b/hw/hw.h > @@ -4,7 +4,7 @@ > > =C2=A0#include "qemu-common.h" > > -#if defined(TARGET_PHYS_ADDR_BITS) && !defined(NEED_CPU_H) > +#if !defined(NEED_CPU_H) > =C2=A0#include "cpu-common.h" > =C2=A0#endif > > diff --git a/hw/intel-hda.c b/hw/intel-hda.c > index 10769e0..322440e 100644 > --- a/hw/intel-hda.c > +++ b/hw/intel-hda.c > @@ -215,13 +215,9 @@ static target_phys_addr_t intel_hda_addr(uint32_t lb= ase, uint32_t ubase) > =C2=A0{ > =C2=A0 =C2=A0 target_phys_addr_t addr; > > -#if TARGET_PHYS_ADDR_BITS =3D=3D 32 > - =C2=A0 =C2=A0addr =3D lbase; > -#else > =C2=A0 =C2=A0 addr =3D ubase; > =C2=A0 =C2=A0 addr <<=3D 32; > =C2=A0 =C2=A0 addr |=3D lbase; > -#endif > =C2=A0 =C2=A0 return addr; > =C2=A0} > > diff --git a/hw/omap.h b/hw/omap.h > index 60fa34c..a99fb7e 100644 > --- a/hw/omap.h > +++ b/hw/omap.h > @@ -951,13 +951,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryReg= ion *sysmem, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unsigned long sdr= am_size, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 const char *core)= ; > > -# if TARGET_PHYS_ADDR_BITS =3D=3D 32 > -# =C2=A0define OMAP_FMT_plx "%#08x" > -# elif TARGET_PHYS_ADDR_BITS =3D=3D 64 > =C2=A0# =C2=A0define OMAP_FMT_plx "%#08" PRIx64 > -# else > -# =C2=A0error TARGET_PHYS_ADDR_BITS undefined > -# endif Same comments about way too many digits in log messages. (If this patch or similar goes in at some later date we can throw in a cleanup patch to just drop the OMAP_FMT_plx macro.) > > =C2=A0uint32_t omap_badwidth_read8(void *opaque, target_phys_addr_t addr)= ; > =C2=A0void omap_badwidth_write8(void *opaque, target_phys_addr_t addr, > diff --git a/hw/pxa2xx_dma.c b/hw/pxa2xx_dma.c > index cb28107..ffb391d 100644 > --- a/hw/pxa2xx_dma.c > +++ b/hw/pxa2xx_dma.c > @@ -512,9 +512,9 @@ static VMStateDescription vmstate_pxa2xx_dma_chan =3D= { > =C2=A0 =C2=A0 .minimum_version_id =3D 1, > =C2=A0 =C2=A0 .minimum_version_id_old =3D 1, > =C2=A0 =C2=A0 .fields =3D (VMStateField[]) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINTTL(descr, PXA2xxDMAChannel), > - =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINTTL(src, PXA2xxDMAChannel), > - =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINTTL(dest, PXA2xxDMAChannel), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT64(descr, PXA2xxDMAChannel), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT64(src, PXA2xxDMAChannel), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT64(dest, PXA2xxDMAChannel), Isn't this a format change demanding a version bump? > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_UINT32(cmd, PXA2xxDMAChannel), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_UINT32(state, PXA2xxDMAChannel), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_INT32(request, PXA2xxDMAChannel), > diff --git a/hw/pxa2xx_lcd.c b/hw/pxa2xx_lcd.c > index 5dd4ef0..a84cd77 100644 > --- a/hw/pxa2xx_lcd.c > +++ b/hw/pxa2xx_lcd.c > @@ -921,11 +921,11 @@ static const VMStateDescription vmstate_dma_channel= =3D { > =C2=A0 =C2=A0 .minimum_version_id =3D 0, > =C2=A0 =C2=A0 .minimum_version_id_old =3D 0, > =C2=A0 =C2=A0 .fields =C2=A0 =C2=A0 =C2=A0=3D (VMStateField[]) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINTTL(branch, struct DMAChannel), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT64(branch, struct DMAChannel), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_UINT8(up, struct DMAChannel), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_BUFFER(pbuffer, struct DMAChannel), > - =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINTTL(descriptor, struct DMAChannel= ), > - =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINTTL(source, struct DMAChannel), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT64(descriptor, struct DMAChannel= ), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT64(source, struct DMAChannel), Ditto. > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_UINT32(id, struct DMAChannel), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_UINT32(command, struct DMAChannel), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 VMSTATE_END_OF_LIST() > diff --git a/hw/rtl8139.c b/hw/rtl8139.c > index 0ae9f57..e8eca15 100644 > --- a/hw/rtl8139.c > +++ b/hw/rtl8139.c > @@ -799,11 +799,7 @@ static void rtl8139_write_buffer(RTL8139State *s, co= nst void *buf, int size) > =C2=A0#define MIN_BUF_SIZE 60 > =C2=A0static inline dma_addr_t rtl8139_addr64(uint32_t low, uint32_t high= ) > =C2=A0{ > -#if TARGET_PHYS_ADDR_BITS > 32 > =C2=A0 =C2=A0 return low | ((target_phys_addr_t)high << 32); > -#else > - =C2=A0 =C2=A0return low; > -#endif > =C2=A0} > > =C2=A0static int rtl8139_can_receive(VLANClientState *nc) > diff --git a/hw/sh_serial.c b/hw/sh_serial.c > index 43b0eb1..c612a90 100644 > --- a/hw/sh_serial.c > +++ b/hw/sh_serial.c > @@ -186,7 +186,8 @@ static void sh_serial_write(void *opaque, target_phys= _addr_t offs, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 } > =C2=A0 =C2=A0 } > > - =C2=A0 =C2=A0fprintf(stderr, "sh_serial: unsupported write to 0x%02x\n"= , offs); > + =C2=A0 =C2=A0fprintf(stderr, "sh_serial: unsupported write to " TARGET_= FMT_plx "\n", > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0offs); And here you can see that you've clearly just messed up the intended two-hex-digits only printing. > =C2=A0 =C2=A0 abort(); > =C2=A0} > > @@ -287,7 +288,8 @@ static uint64_t sh_serial_read(void *opaque, target_p= hys_addr_t offs, > =C2=A0#endif > > =C2=A0 =C2=A0 if (ret & ~((1 << 16) - 1)) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "sh_serial: unsupported read= from 0x%02x\n", offs); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0fprintf(stderr, "sh_serial: unsupported read= from 0x" > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TARGET_FMT_plx "= \n", offs); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 abort(); > =C2=A0 =C2=A0 } > > diff --git a/monitor.c b/monitor.c > index 7334401..be3d7f4 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1274,26 +1274,6 @@ static void do_print(Monitor *mon, const QDict *qd= ict) > =C2=A0 =C2=A0 int format =3D qdict_get_int(qdict, "format"); > =C2=A0 =C2=A0 target_phys_addr_t val =3D qdict_get_int(qdict, "val"); > > -#if TARGET_PHYS_ADDR_BITS =3D=3D 32 > - =C2=A0 =C2=A0switch(format) { > - =C2=A0 =C2=A0case 'o': > - =C2=A0 =C2=A0 =C2=A0 =C2=A0monitor_printf(mon, "%#o", val); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > - =C2=A0 =C2=A0case 'x': > - =C2=A0 =C2=A0 =C2=A0 =C2=A0monitor_printf(mon, "%#x", val); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > - =C2=A0 =C2=A0case 'u': > - =C2=A0 =C2=A0 =C2=A0 =C2=A0monitor_printf(mon, "%u", val); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > - =C2=A0 =C2=A0default: > - =C2=A0 =C2=A0case 'd': > - =C2=A0 =C2=A0 =C2=A0 =C2=A0monitor_printf(mon, "%d", val); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > - =C2=A0 =C2=A0case 'c': > - =C2=A0 =C2=A0 =C2=A0 =C2=A0monitor_printc(mon, val); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > - =C2=A0 =C2=A0} > -#else > =C2=A0 =C2=A0 switch(format) { > =C2=A0 =C2=A0 case 'o': > =C2=A0 =C2=A0 =C2=A0 =C2=A0 monitor_printf(mon, "%#" PRIo64, val); > @@ -1312,7 +1292,6 @@ static void do_print(Monitor *mon, const QDict *qdi= ct) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 monitor_printc(mon, val); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; > =C2=A0 =C2=A0 } > -#endif > =C2=A0 =C2=A0 monitor_printf(mon, "\n"); > =C2=A0} > > diff --git a/qemu-log.h b/qemu-log.h > index fccfb110..7c9180c 100644 > --- a/qemu-log.h > +++ b/qemu-log.h > @@ -51,6 +51,7 @@ extern int loglevel; > =C2=A0/* Special cases: */ > > =C2=A0/* cpu_dump_state() logging functions: */ > +#ifdef NEED_CPU_H > =C2=A0#define log_cpu_state(env, f) cpu_dump_state((env), logfile, fprint= f, (f)); > =C2=A0#define log_cpu_state_mask(b, env, f) do { =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 \ > =C2=A0 =C2=A0 =C2=A0 if (loglevel & (b)) log_cpu_state((env), (f)); \ > @@ -64,8 +65,7 @@ extern int loglevel; > > =C2=A0/* page_dump() output to the log file: */ > =C2=A0#define log_page_dump() page_dump(logfile) > - > - > +#endif Why does this #ifdef become necessary? (not saying it isn't, just wondering) > > =C2=A0/* Maintenance: */ > > diff --git a/targphys.h b/targphys.h > index 95648d6..8c4928a 100644 > --- a/targphys.h > +++ b/targphys.h > @@ -3,19 +3,8 @@ > =C2=A0#ifndef TARGPHYS_H > =C2=A0#define TARGPHYS_H > > -#ifdef TARGET_PHYS_ADDR_BITS > -/* target_phys_addr_t is the type of a physical address (its size can > - =C2=A0 be different from 'target_ulong'). =C2=A0*/ > - > -#if TARGET_PHYS_ADDR_BITS =3D=3D 32 > -typedef uint32_t target_phys_addr_t; > -#define TARGET_PHYS_ADDR_MAX UINT32_MAX > -#define TARGET_FMT_plx "%08x" > -#elif TARGET_PHYS_ADDR_BITS =3D=3D 64 > =C2=A0typedef uint64_t target_phys_addr_t; > =C2=A0#define TARGET_PHYS_ADDR_MAX UINT64_MAX > =C2=A0#define TARGET_FMT_plx "%016" PRIx64 > -#endif > -#endif > > =C2=A0#endif > -- > 1.7.4.1 -- PMM