Kconfig dependencies for ppc machines
v2 cover Kconfig dependencies for ppc machines
Here's now my stab at expressing the ppc machine dependencies with Kconfig. I've carefully stepped through the dependencies and tried to built each machine separately (which should be possible now, apart from some few quirks like the RTAS dependency in qtest.c which I will address later).
v2: Adressed review feedback from v1
Based-on: [email protected]
Thomas Huth (5):
ppc64: Express dependencies of 'pseries' and 'powernv' machines with
kconfig
ppc: Express dependencies of the 'prep' and '40p' machines with
kconfig
ppc: Express dependencies of the Mac machines with kconfig
ppc: Express dependencies of the Sam460EX machines with kconfig
ppc: Express dependencies of the embedded machines with kconfig
default-configs/ppc-softmmu.mak | 51 +++-------------------------------- default-configs/ppc64-softmmu.mak | 8 ------ hw/display/Kconfig | 1 + hw/intc/Kconfig | 6 ++--- hw/mem/Kconfig | 1 + hw/misc/Kconfig | 6 +++++ hw/net/Kconfig | 2 ++ hw/nvram/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 ++- hw/ppc/Kconfig | 57 ++++++++++++++++++++++++++++++++++++--- hw/usb/Kconfig | 2 +- 11 files changed, 75 insertions(+), 65 deletions(-)
Signature · 1 line
1.8.3.1
PATCH v2 1/5 ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
The POWERNV switch should always select ISA_IPMI_BT, then the other IPMI options are turned on automatically now.CONFIG_DIMM should always be selected by the pseries machine, which in turn depends on CONFIG_MEM_DEVICE since DIMM implements this interface.CONFIG_VIRTIO_VGA can be dropped from default-configs/ppc64-softmmu.mak completely since this device is already automatically enabled via hw/display/Kconfig now.
--- default-configs/ppc64-softmmu.mak | 8 -------- hw/intc/Kconfig | 6 ++---- hw/mem/Kconfig | 1 + hw/ppc/Kconfig | 18 ++++++++++++++---- 4 files changed, 17 insertions(+), 16 deletions(-)
default-configs/ppc64-softmmu.mak +0 -8
@@ -5,14 +5,6 @@ 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 # For pSeries CONFIG_PSERIES=y -CONFIG_VIRTIO_VGA=y -CONFIG_MEM_DEVICE=y -CONFIG_DIMM=y -CONFIG_SPAPR_RNG=y
hw/intc/Kconfig +2 -4
@@ -31,13 +31,11 @@ config OPENPIC_KVM config XICS bool - default y - depends on PSERIES + depends on POWERNV || PSERIES config XICS_SPAPR bool - default y - depends on PSERIES + select XICS config XICS_KVM bool
hw/mem/Kconfig +1 -0
@@ -1,5 +1,6 @@ config DIMM bool + select MEM_DEVICE config MEM_DEVICE bool
hw/ppc/Kconfig +14 -4
@@ -1,11 +1,23 @@ config PSERIES bool + select DIMM + select PCI + select VFIO + select XICS_SPAPR + select XIVE_SPAPR config SPAPR_RNG bool + default y + depends on PSERIES config POWERNV bool + select ISA_IPMI_BT + select ISA_BUS + select MC146818RTC + select XICS + select XIVE config PPC405 bool
@@ -45,16 +57,14 @@ config MAC_PMU config XIVE bool - default y - depends on PSERIES + depends on POWERNV || PSERIES config MACIO_GPIO bool config XIVE_SPAPR bool - default y - depends on PSERIES + select XIVE config CUDA bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH v2 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
hw/ppc/Kconfig line 7
Quoted 7 lines · Thomas Huth
config PSERIES
boolhw/ppc/Kconfig +5
-0+ select DIMM + select PCI + select VFIO + select XICS_SPAPR + select XIVE_SPAPR
Missing "select SPAPR_VSCSI", added it locally.
hw/ppc/Kconfig line 20
Quoted 9 lines
config POWERNV
boolhw/ppc/Kconfig +5
-0+ select ISA_IPMI_BT + select ISA_BUS + select MC146818RTC + select XICS + select XIVE
Missing "select IPMI_LOCAL" for
/home/pbonzini/work/upstream/qemu/hw/ppc/pnv_bmc.c:67: undefined reference to `ipmi_bmc_gen_event'hw/ppc/pnv_bmc.o: In function `pnv_dt_bmc_sensors':/home/pbonzini/work/upstream/qemu/hw/ppc/pnv_bmc.c:95: undefined reference to `ipmi_bmc_sdr_find'
added it locally too.
Paolo
PATCH v2 2/5 ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
In reply to Thomas HuthSelect the required devices in hw/ppc/Kconfig instead, so that ppc-softmmu.mak only contains the user-selectable PREP switch. Plug-in devices like NE2000_ISA are pulled in automatically by the Kconfig build system now.
--- default-configs/ppc-softmmu.mak | 8 -------- hw/ppc/Kconfig | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-)
default-configs/ppc-softmmu.mak +0 -8
@@ -57,11 +57,3 @@ CONFIG_MAC_NEWWORLD=y # For PReP CONFIG_PREP=y -CONFIG_PREP_PCI=y -CONFIG_RS6000_MC=y -CONFIG_I82374=y -CONFIG_I82378=y -CONFIG_PCKBD=y -CONFIG_NE2000_ISA=y -CONFIG_PC87312=y -CONFIG_CS4231A=y
hw/ppc/Kconfig +8 -0
@@ -33,6 +33,14 @@ config SAM460EX config PREP bool + select CS4231A + select PREP_PCI + select I82374 + select I82378 + select LSI_SCSI_PCI + select M48T59 + select PC87312 + select RS6000_MC config RS6000_MC bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH v2 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
Le 31/01/2019 à 14:53, Thomas Huth a écrit :
Quoted 5 lines
Select the required devices in hw/ppc/Kconfig instead, so that ppc-softmmu.mak only contains the user-selectable PREP switch. Plug-in devices like
NE2000_ISAare pulled in automatically by theKconfigbuild system now.
Quoted 7 lines
Cc Hervé Poussineau <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- default-configs/ppc-softmmu.mak | 8 -------- hw/ppc/Kconfig | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-)
PATCH v2 3/5 ppc: Express dependencies of the Mac machines with kconfig
In reply to Thomas HuthThis will make it for example easier if the users want to disable one of the two machines for their builds.
--- default-configs/ppc-softmmu.mak | 15 --------------- hw/misc/Kconfig | 6 ++++++ hw/net/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 +++- hw/ppc/Kconfig | 9 +++++++++ 5 files changed, 20 insertions(+), 16 deletions(-)
default-configs/ppc-softmmu.mak +0 -15
@@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y CONFIG_SMBUS_EEPROM=y # For Macs -CONFIG_ESCC=y -CONFIG_MACIO=y -CONFIG_MACIO_GPIO=y -CONFIG_SUNGEM=y -CONFIG_MOS6522=y -CONFIG_CUDA=y -CONFIG_ADB=y -CONFIG_MAC_NVRAM=y -CONFIG_MAC_DBDMA=y -CONFIG_MAC_PMU=y -CONFIG_HEATHROW_PIC=y -CONFIG_GRACKLE_PCI=y -CONFIG_UNIN_PCI=y -CONFIG_DEC_PCI=y -CONFIG_IDE_MACIO=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y
hw/misc/Kconfig +6 -0
@@ -59,6 +59,12 @@ config MOS6522 config MACIO bool + select CUDA + select ESCC + select IDE_MACIO + select MAC_DBDMA + select MAC_NVRAM + select MOS6522 config IVSHMEM_DEVICE bool
hw/net/Kconfig +2 -0
@@ -85,6 +85,8 @@ config FTGMAC100 config SUNGEM bool + default y if (MAC_OLDWORLD || MAC_NEWWORLD) + depends on PCI config COLDFIRE bool
hw/pci-host/Kconfig +3 -1
@@ -10,8 +10,10 @@ config GRACKLE_PCI bool config UNIN_PCI - select PCI bool + select PCI + select DEC_PCI + select OPENPIC config PPCE500_PCI select PCI
hw/ppc/Kconfig +9 -0
@@ -47,9 +47,18 @@ config RS6000_MC config MAC_OLDWORLD bool + select ADB + select GRACKLE_PCI + select HEATHROW_PIC + select MACIO config MAC_NEWWORLD bool + select ADB + select MACIO + select MACIO_GPIO + select MAC_PMU + select UNIN_PCI config E500 bool
Signature · 1 line
1.8.3.1
PATCH v2 4/5 ppc: Express dependencies of the Sam460EX machines with kconfig
In reply to Thomas HuthMost of the dependencies are now directly selected by the SAM460EX switch. We can drop CONFIG_VGA_CIRRUS since this device is already selected automatically when CONFIG_PCI_DEVICES is set.
--- default-configs/ppc-softmmu.mak | 10 ---------- hw/display/Kconfig | 1 + hw/ppc/Kconfig | 10 ++++++++++ hw/usb/Kconfig | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-)
default-configs/ppc-softmmu.mak +0 -10
@@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y # For Sam460ex CONFIG_SAM460EX=y -CONFIG_USB_EHCI_SYSBUS=y -CONFIG_SM501=y -CONFIG_DDC=y -CONFIG_IDE_SII3112=y -CONFIG_I2C=y -CONFIG_AT24C=y -CONFIG_BITBANG_I2C=y -CONFIG_M41T80=y -CONFIG_VGA_CIRRUS=y -CONFIG_SMBUS_EEPROM=y # For Macs CONFIG_MAC_OLDWORLD=y
hw/display/Kconfig +1 -0
@@ -76,6 +76,7 @@ config MILKYMIST_TMU2 config SM501 bool depends on I2C + select DDC config TCX bool
hw/ppc/Kconfig +10 -0
@@ -27,9 +27,19 @@ config PPC440 config PPC4XX bool + select BITBANG_I2C + select PCI config SAM460EX bool + select PFLASH_CFI01 + select IDE_SII3112 + select M41T80 + select PPC440 + select SM501 + select SMBUS_EEPROM + select USB_EHCI_SYSBUS + select USB_OHCI config PREP bool
hw/usb/Kconfig +1 -1
@@ -21,7 +21,7 @@ config USB_EHCI config USB_EHCI_SYSBUS bool - select USB + select USB_EHCI config USB_XHCI bool
Signature · 1 line
1.8.3.1
PATCH v2 5/5 ppc: Express dependencies of the embedded machines with kconfig
In reply to Thomas HuthThis makes it much easier if the users want to disable some of the embedded machines for their builds.
--- default-configs/ppc-softmmu.mak | 18 ++++-------------- hw/nvram/Kconfig | 2 ++ hw/ppc/Kconfig | 12 ++++++++++++ 3 files changed, 18 insertions(+), 14 deletions(-)
default-configs/ppc-softmmu.mak +4 -14
@@ -1,27 +1,17 @@ # Default configuration for ppc-softmmu -CONFIG_PCI=y CONFIG_PCI_DEVICES=y -CONFIG_ISA_BUS=y CONFIG_TEST_DEVICES=y -# For embedded PPCs: -CONFIG_PPC4XX=y -CONFIG_M48T59=y +# FIXME: CONFIG_SERIAL is currently still required to link all of the +# ppc machines (due to the usage of serial_mm_init() in ppc405_uc.c). CONFIG_SERIAL=y -CONFIG_OPENPIC=y -CONFIG_PPCE500_PCI=y -CONFIG_PFLASH_CFI01=y -CONFIG_PFLASH_CFI02=y -CONFIG_XILINX=y -CONFIG_XILINX_ETHLITE=y + +# For embedded PPCs: CONFIG_E500=y -CONFIG_PLATFORM_BUS=y -CONFIG_ETSEC=y CONFIG_PPC405=y CONFIG_PPC440=y CONFIG_VIRTEX=y -CONFIG_PCI_EXPRESS=y # For Sam460ex CONFIG_SAM460EX=y
hw/nvram/Kconfig +2 -0
@@ -3,6 +3,8 @@ config DS1225Y config AT24C bool + default y if E500 + depends on I2C config MAC_NVRAM bool
hw/ppc/Kconfig +12 -0
@@ -21,9 +21,14 @@ config POWERNV config PPC405 bool + select M48T59 + select PFLASH_CFI02 + select PPC4XX config PPC440 bool + select PCI_EXPRESS + select PPC4XX config PPC4XX bool
@@ -72,9 +77,16 @@ config MAC_NEWWORLD config E500 bool + select ETSEC + select OPENPIC + select PLATFORM_BUS + select PPCE500_PCI config VIRTEX bool + select PFLASH_CFI01 + select XILINX + select XILINX_ETHLITE config MAC_DBDMA bool
Signature · 1 line
1.8.3.1
Quoted 19 lines · Thomas Huth
Here's now my stab at expressing the ppc machine dependencies with
Kconfig. I've carefully stepped through the dependencies and tried to built each machine separately (which should be possible now, apart from some few quirks like the RTAS dependency inqtest.cwhich I will address later).v2: Adressed review feedback from v1
Based-on: [email protected]
Thomas Huth (5):
ppc64: Express dependencies of 'pseries' and 'powernv' machines with
kconfig
ppc: Express dependencies of the 'prep' and '40p' machines with
kconfig
ppc: Express dependencies of the Mac machines with kconfig
ppc: Express dependencies of the Sam460EX machines with kconfig
ppc: Express dependencies of the embedded machines with kconfig
Quoted 13 lines
default-configs/ppc-softmmu.mak | 51 +++-------------------------------- default-configs/ppc64-softmmu.mak | 8 ------ hw/display/Kconfig | 1 + hw/intc/Kconfig | 6 ++--- hw/mem/Kconfig | 1 + hw/misc/Kconfig | 6 +++++ hw/net/Kconfig | 2 ++ hw/nvram/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 ++- hw/ppc/Kconfig | 57 ++++++++++++++++++++++++++++++++++++--- hw/usb/Kconfig | 2 +- 11 files changed, 75 insertions(+), 65 deletions(-)
I queued this to my kconfig branch at https://github.com/bonzini/qemu.git.
Only ARM and MIPS are missing there. :)
Paolo