Clean up the ppc configs
v2 cover Clean up the ppc configs
ppc64-softmmu is a superset of ppc-softmmu which in turn is a superset of ppcemb-softmmu. But since the config files are currently independent from each other, we missed to define some CONFIG switches in the super-
sets: CONFIG_SUNGEM is missing from the ppc64-softmmu config, and the CONFIG_IDE_SII3112 switch is only defined in ppcemb-softmmu.
This patch series fixes these problems, together with cleaning up the config- and make-files for better usability. qemu-system-ppcemb is finally marked as deprecated since there is hardly any use case for this separate build nowadays anymore (and if somebody really still needs page sizes < 4k, we should likely rather use the dynamic approach that is already done on the ARM boards instead).
v2:
- Added patch to disable the PPC4xx boards in the hw/ppc/Makefile
- Added patch to deprecate qemu-system-ppcemb
Thomas Huth (4):
default-configs/ppc64-softmmu: Include 32-bit configs instead of
copying them
default-configs/ppc-softmmu: Restructure the switches according to the
machines
hw/ppc/Makefile: Add a way to disable the PPC4xx boards
ppc: Deprecate qemu-system-ppcemb
default-configs/ppc-softmmu.mak | 59 ++++++++++++++++++++----------------- default-configs/ppc64-softmmu.mak | 61 +++++---------------------------------- hw/ppc/Makefile.objs | 4 +-- qemu-doc.texi | 6 ++++ target/ppc/translate_init.c | 5 ++++ 5 files changed, 53 insertions(+), 82 deletions(-)
Signature · 1 line
1.8.3.1
PATCH v2 1/4 default-configs/ppc64-softmmu: Include 32-bit configs instead of copying them
qemu-softmmu-ppc64 is supposed to be a superset of qemu-softmmu-ppc. However, instead of simply including the 32-bit config file, we've duplicated all CONFIG_xxx settings there instead. This way, we've missed some CONFIG switches in ppc64-softmmu.mak which were only added to the 32-bit config file (e.g. CONFIG_SUNGEM). Let's fix this problem by including the 32-bit config file into the 64-bit config file instead of duplicating all the CONFIG switches there.
--- default-configs/ppc64-softmmu.mak | 61 +++++---------------------------------- 1 file changed, 8 insertions(+), 53 deletions(-)
default-configs/ppc64-softmmu.mak +8 -53
@@ -1,64 +1,19 @@ # Default configuration for ppc64-softmmu -include pci.mak -include sound.mak -include usb.mak -CONFIG_PPC4XX=y -CONFIG_VIRTIO_VGA=y -CONFIG_ESCC=y -CONFIG_M48T59=y +# Include all 32-bit boards +include ppc-softmmu.mak + +# For PowerNV +CONFIG_POWERNV=y CONFIG_IPMI=y CONFIG_IPMI_LOCAL=y CONFIG_IPMI_EXTERN=y CONFIG_ISA_IPMI_BT=y -CONFIG_SERIAL=y -CONFIG_PARALLEL=y -CONFIG_I8254=y -CONFIG_PCKBD=y -CONFIG_FDC=y -CONFIG_I8257=y -CONFIG_I82374=y -CONFIG_OPENPIC=y -CONFIG_PREP_PCI=y -CONFIG_I82378=y -CONFIG_PC87312=y -CONFIG_MACIO=y -CONFIG_PCSPK=y -CONFIG_CUDA=y -CONFIG_ADB=y -CONFIG_MAC_NVRAM=y -CONFIG_MAC_DBDMA=y -CONFIG_HEATHROW_PIC=y -CONFIG_GRACKLE_PCI=y -CONFIG_UNIN_PCI=y -CONFIG_DEC_PCI=y -CONFIG_PPCE500_PCI=y -CONFIG_IDE_ISA=y -CONFIG_IDE_CMD646=y -CONFIG_IDE_MACIO=y -CONFIG_NE2000_ISA=y -CONFIG_PFLASH_CFI01=y -CONFIG_PFLASH_CFI02=y -CONFIG_PTIMER=y -CONFIG_I8259=y -CONFIG_XILINX=y -CONFIG_XILINX_ETHLITE=y -CONFIG_PSERIES=y -CONFIG_POWERNV=y -CONFIG_PREP=y -CONFIG_MAC=y -CONFIG_E500=y -CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM)) -CONFIG_PLATFORM_BUS=y -CONFIG_ETSEC=y -CONFIG_SM501=y + # For pSeries +CONFIG_PSERIES=y +CONFIG_VIRTIO_VGA=y CONFIG_XICS=$(CONFIG_PSERIES) CONFIG_XICS_SPAPR=$(CONFIG_PSERIES) CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM)) -# For PReP -CONFIG_SERIAL_ISA=y -CONFIG_MC146818RTC=y -CONFIG_ISA_TESTDEV=y CONFIG_MEM_HOTPLUG=y -CONFIG_RS6000_MC=y
Signature · 1 line
1.8.3.1
PATCH v2 2/4 default-configs/ppc-softmmu: Restructure the switches according to the machines
In reply to Thomas HuthOrder the CONFIG switches in ppc-softmmu.mak according to the machine classes where they are used (embedded, Mac or PReP), so that it is easier for the users to disable a set of switches completely if they are not needed.
Also add the missing CONFIG_IDE_SII3112 switch to the embedded section which was previously only added to ppcemb-softmmu.mak.
And while we're at it, also remove the CONFIG_IDE_CMD646 switch since this controller does not seem to be used by any ppc machine in QEMU.
--- default-configs/ppc-softmmu.mak | 59 ++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 27 deletions(-)
default-configs/ppc-softmmu.mak +32 -27
@@ -3,52 +3,57 @@ include pci.mak include sound.mak include usb.mak + +# For embedded PPCs: CONFIG_PPC4XX=y -CONFIG_ESCC=y CONFIG_M48T59=y CONFIG_SERIAL=y -CONFIG_PARALLEL=y -CONFIG_I8254=y -CONFIG_PCKBD=y -CONFIG_FDC=y CONFIG_I8257=y -CONFIG_I82374=y CONFIG_OPENPIC=y -CONFIG_PREP_PCI=y -CONFIG_I82378=y -CONFIG_PC87312=y -CONFIG_MACIO=y -CONFIG_SUNGEM=y -CONFIG_PCSPK=y -CONFIG_CS4231A=y -CONFIG_CUDA=y -CONFIG_ADB=y -CONFIG_MAC_NVRAM=y -CONFIG_MAC_DBDMA=y -CONFIG_HEATHROW_PIC=y -CONFIG_GRACKLE_PCI=y -CONFIG_UNIN_PCI=y -CONFIG_DEC_PCI=y CONFIG_PPCE500_PCI=y -CONFIG_IDE_ISA=y -CONFIG_IDE_CMD646=y -CONFIG_IDE_MACIO=y -CONFIG_NE2000_ISA=y CONFIG_PFLASH_CFI01=y CONFIG_PFLASH_CFI02=y CONFIG_PTIMER=y CONFIG_I8259=y CONFIG_XILINX=y CONFIG_XILINX_ETHLITE=y -CONFIG_PREP=y -CONFIG_MAC=y CONFIG_E500=y CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM)) CONFIG_PLATFORM_BUS=y CONFIG_ETSEC=y CONFIG_SM501=y +CONFIG_IDE_SII3112=y + +# For Macs +CONFIG_MAC=y +CONFIG_ESCC=y +CONFIG_MACIO=y +CONFIG_SUNGEM=y +CONFIG_CUDA=y +CONFIG_ADB=y +CONFIG_MAC_NVRAM=y +CONFIG_MAC_DBDMA=y +CONFIG_HEATHROW_PIC=y +CONFIG_GRACKLE_PCI=y +CONFIG_UNIN_PCI=y +CONFIG_DEC_PCI=y +CONFIG_IDE_MACIO=y + # For PReP +CONFIG_PREP=y +CONFIG_PREP_PCI=y CONFIG_SERIAL_ISA=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y CONFIG_RS6000_MC=y +CONFIG_PARALLEL=y +CONFIG_I82374=y +CONFIG_I82378=y +CONFIG_I8254=y +CONFIG_PCKBD=y +CONFIG_FDC=y +CONFIG_NE2000_ISA=y +CONFIG_PC87312=y +CONFIG_PCSPK=y +CONFIG_IDE_ISA=y +CONFIG_CS4231A=y
Signature · 1 line
1.8.3.1
PATCH v2 3/4 hw/ppc/Makefile: Add a way to disable the PPC4xx boards
In reply to Thomas HuthWe've got the config switch CONFIG_PPC4XX, so we should use it in the Makefile accordingly and only include the PPC4xx boards if this switch has been enabled. (Note: Unfortunately, the files ppc4xx_devs.c and ppc405_uc.c still have to be included in the build anyway to fulfil some complicated linker dependencies ... so these are subject to a more thourough clean-up later)
--- hw/ppc/Makefile.objs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/ppc/Makefile.objs +2 -2
@@ -12,8 +12,8 @@ obj-y += spapr_pci_vfio.o endif obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o # PowerPC 4xx boards -obj-y += ppc405_boards.o ppc4xx_devs.o ppc405_uc.o ppc440_bamboo.o -obj-y += ppc4xx_pci.o +obj-y += ppc4xx_devs.o ppc405_uc.o +obj-$(CONFIG_PPC4XX) += ppc4xx_pci.o ppc405_boards.o ppc440_bamboo.o # PReP obj-$(CONFIG_PREP) += prep.o obj-$(CONFIG_PREP) += prep_systemio.o
Signature · 1 line
1.8.3.1
PATCH v2 4/4 ppc: Deprecate qemu-system-ppcemb
In reply to Thomas Huthqemu-system-ppcemb has been once split of qemu-system-ppc to support CPU page sizes < 4096 for some of the embedded 4xx PowerPC CPUs. However, there was hardly any OS available in the wild that really used such small page sizes (Linux uses 4096 on PPC), so there is no known recent use case for this separate build anymore. It's rather cumbersome to maintain a separate set of config switches for this, and it's wasting compile and test time of all the developers who have to build all QEMU targets to verify that their changes did not break anything.
Except for the small CPU page sizes, qemu-system-ppc can be used as a full replacement for qemu-system-ppcemb since it contains all the embedded 4xx PPC boards and CPUs, too. Thus let's start the deprecation process for qemu-system-ppcemb to see whether somebody still needs the small page sizes or whether we could finally remove this unloved separate build.
--- qemu-doc.texi | 6 ++++++ target/ppc/translate_init.c | 5 +++++ 2 files changed, 11 insertions(+)
qemu-doc.texi +6 -0
@@ -2757,6 +2757,12 @@ The ``host_net_remove'' command is replaced by the ``netdev_del'' command. The ``ivshmem'' device type is replaced by either the ``ivshmem-plain'' or ``ivshmem-doorbell`` device types. +@subsection Page size support < 4k for embedded PowerPC CPUs (since 2.12.0) + +qemu-system-ppcemb will be removed. qemu-system-ppc (or qemu-system-ppc64) +should be used instead. That means that embedded 4xx PowerPC CPUs will not +support page sizes < 4096 any longer. + @section System emulator machines @subsection Xilinx EP108 (since 2.11.0)
target/ppc/translate_init.c +5 -0
@@ -10634,6 +10634,11 @@ static void ppc_cpu_register_types(void) {type_register_static (&ppc_cpu_type_info);type_register_static (&ppc_vhyp_type_info); + +#ifdef TARGET_PPCEMB +warn_report ("qemu-system-ppcemb is deprecated, " +"please use qemu-system-ppc instead." ); +#endif }type_init (ppc_cpu_register_types)
Signature · 1 line
1.8.3.1
David Gibson
AppliedQuoted 6 lines · Thomas Huth
ppc64-softmmu is a superset of ppc-softmmu which in turn is a superset of ppcemb-softmmu. But since the config files are currently independent from each other, we missed to define some CONFIG switches in the super-
sets:CONFIG_SUNGEMis missing from the ppc64-softmmu config, and theCONFIG_IDE_SII3112switch is only defined in ppcemb-softmmu.
Quoted 6 lines
This patch series fixes these problems, together with cleaning up the config- and make-files for better usability. qemu-system-ppcemb is finally marked as deprecated since there is hardly any use case for this separate build nowadays anymore (and if somebody really still needs page sizes < 4k, we should likely rather use the dynamic approach that is already done on the ARM boards instead).
Applied to ppc-for-2.12, thanks.
Quoted 20 lines
v2:
- Added patch to disable the PPC4xx boards in the hw/ppc/Makefile
- Added patch to deprecate qemu-system-ppcembThomas Huth (4):
default-configs/ppc64-softmmu: Include 32-bit configs instead of
copying them
default-configs/ppc-softmmu: Restructure the switches according to the
machines
hw/ppc/Makefile: Add a way to disable the PPC4xx boards
ppc: Deprecate qemu-system-ppcembdefault-configs/ppc-softmmu.mak | 59 ++++++++++++++++++++----------------- default-configs/ppc64-softmmu.mak | 61 +++++---------------------------------- hw/ppc/Makefile.objs | 4 +-- qemu-doc.texi | 6 ++++ target/ppc/translate_init.c | 5 ++++ 5 files changed, 53 insertions(+), 82 deletions(-)
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