Kconfig switches
v3 cover Kconfig switches
Here are some more Kconfig patches that clean up the switches of existing devices and introduce proper config switches for some other devices that were always enabled before.
v3:
- Added Philippe's Reviewed-bys
- The MUSCA and MPS2 switches now also select the "unimplemented" device
v2:
- Included Philippe's patches to avoid a conflict with XLNX_ZYNQMP
- Don't rely on indirect dependencies, always "select XYZ" if it is adequate
- Added patch for the generic loader device
Philippe Mathieu-Daudé (3):
hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines
Thomas Huth (5):
hw/core: Add a config switch for the "register" device hw/core: Add a config switch for the "or-irq" device hw/core: Add a config switch for the "split-irq" device hw/misc: Add a config switch for the "unimplemented" device hw/core: Add a config switch for the generic loader device
hw/Kconfig | 4 ++++ hw/arm/Kconfig | 17 +++++++++++++++++ hw/core/Kconfig | 13 +++++++++++++ hw/core/Makefile.objs | 8 ++++---- hw/dma/Kconfig | 1 + hw/dma/Makefile.objs | 1 - hw/intc/Makefile.objs | 2 +- hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- hw/sparc64/Kconfig | 1 + hw/timer/Kconfig | 3 --- 13 files changed, 48 insertions(+), 11 deletions(-)
Signature · 1 line
2.18.1
PATCH v3 1/8 hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig
From: Philippe Mathieu-Daudé <[email protected]>
The XLNX_ZYNQMP config is used in multiple subdirectories (timer, intc). Move it to the root hw/Kconfig.
Message-Id: <[email protected]>
--- hw/Kconfig | 3 +++ hw/timer/Kconfig | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
hw/Kconfig +3 -0
@@ -73,3 +73,6 @@ config XILINX config XILINX_AXI bool select PTIMER # for hw/dma/xilinx_axidma.c + +config XLNX_ZYNQMP + bool
hw/timer/Kconfig +0 -3
@@ -34,9 +34,6 @@ config TWL92230 bool depends on I2C -config XLNX_ZYNQMP - bool - config ALTERA_TIMER bool select PTIMER
Signature · 1 line
2.18.1
PATCH v3 2/8 hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The Xilinx I/O Module Interrupt Controller is only used by the MicroBlaze PMU, not by the AArch64 machine.
Move it from the generic ZynqMP object list to the PMU specific.
Message-Id: <[email protected]>
--- hw/intc/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/Makefile.objs +1 -1
@@ -3,7 +3,7 @@ common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o common-obj-$(CONFIG_PL190) += pl190.o common-obj-$(CONFIG_PUV3) += puv3_intc.o common-obj-$(CONFIG_XILINX) += xilinx_intc.o -common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-pmu-iomod-intc.o +common-obj-$(CONFIG_XLNX_ZYNQMP_PMU) += xlnx-pmu-iomod-intc.o common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-ipi.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_pic.o common-obj-$(CONFIG_IMX) += imx_avic.o imx_gpcv2.o
Signature · 1 line
2.18.1
PATCH v3 3/8 hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
The xlnx_dpdma device is only used by the ZynqMP AArch64 machine (not the MicroBlaze PMU). Remove it from the ZynqMP generic objects. (Note, this entry was duplicated for the AArch64).
Message-Id: <[email protected]>
--- hw/dma/Makefile.objs | 1 - 1 file changed, 1 deletion(-)
hw/dma/Makefile.objs +0 -1
@@ -8,7 +8,6 @@ common-obj-$(CONFIG_XILINX_AXI) += xilinx_axidma.o common-obj-$(CONFIG_ZYNQ_DEVCFG) += xlnx-zynq-devcfg.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_dma.o common-obj-$(CONFIG_STP2000) += sparc32_dma.o -obj-$(CONFIG_XLNX_ZYNQMP) += xlnx_dpdma.o obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dpdma.o common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zdma.o
Signature · 1 line
2.18.1
PATCH v3 4/8 hw/core: Add a config switch for the "register" device
In reply to Thomas HuthThe "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
--- hw/Kconfig | 1 + hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)
hw/Kconfig +1 -0
@@ -76,3 +76,4 @@ config XILINX_AXI config XLNX_ZYNQMP bool + select REGISTER
hw/core/Kconfig +3 -0
@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + bool
hw/core/Makefile.objs +1 -1
@@ -17,7 +17,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
hw/dma/Kconfig +1 -0
@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 bool
Signature · 1 line
2.18.1
Re: [Qemu-arm] [PATCH v3 4/8] hw/core: Add a config switch for the "register" device
Quoted 17 lines · Thomas Huth
The "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/Kconfig | 1 + hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)hw/Kconfig +0
-0
hw/Kconfig config XILINX_AXI · line 79
Quoted 4 lines
hw/Kconfig +1
-0@@ -76,3 +76,4 @@ config XILINX_AXI config XLNX_ZYNQMP bool + select REGISTER
I still find REGISTER confusing, and prefer Alistair's suggestion:REGISTER_API.
Since this patch is valid:
Quoted 37 lines
hw/core/Kconfig +3
-0@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + boolhw/core/Makefile.objs +1
-1@@ -17,7 +17,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.ohw/dma/Kconfig +1
-0@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 bool
Re: [Qemu-arm] [Qemu-devel] [PATCH v3 4/8] hw/core: Add a config switch for the "register" device
In reply to Thomas HuthQuoted 6 lines · Thomas Huth
The "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>
Alistair
Quoted 56 lines
--- hw/Kconfig | 1 + hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)hw/Kconfig +1
-0@@ -76,3 +76,4 @@ config XILINX_AXI config XLNX_ZYNQMP bool + select REGISTERhw/core/Kconfig +3
-0@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + boolhw/core/Makefile.objs +1
-1@@ -17,7 +17,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.ohw/dma/Kconfig +1
-1@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 bool --2.18.1
PATCH v3 5/8 hw/core: Add a config switch for the "or-irq" device
In reply to Thomas HuthThe "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
--- hw/arm/Kconfig | 3 +++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-)
hw/arm/Kconfig +3 -0
@@ -292,6 +292,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG
@@ -360,6 +361,7 @@ config MPS2 select LAN9118 select MPS2_FPGAIO select MPS2_SCC + select OR_IRQ select PL022 # Serial port select PL080 # DMA controller
@@ -439,6 +441,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPC select TZ_MSC select TZ_PPC
hw/core/Kconfig +3 -0
@@ -7,6 +7,9 @@ config PTIMER config FITLOADER bool +config OR_IRQ + bool + config PLATFORM_BUS bool
hw/core/Makefile.objs +1 -1
@@ -18,7 +18,7 @@ common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_REGISTER) += register.o -common-obj-$(CONFIG_SOFTMMU) += or-irq.o +common-obj-$(CONFIG_OR_IRQ) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_SOFTMMU) += generic-loader.o
hw/pci-host/Kconfig +2 -1
@@ -2,8 +2,9 @@ config PAM bool config PREP_PCI - select PCI bool + select PCI + select OR_IRQ config GRACKLE_PCI select PCI
Signature · 1 line
2.18.1
PATCH v3 6/8 hw/core: Add a config switch for the "split-irq" device
In reply to Thomas HuthThe "split-irq" device is currently only used by machines that use CONFIG_ARMSSE. Let's add a proper CONFIG_SPLIT_IRQ switch for this so that it only gets compiled when we really need it.
--- hw/arm/Kconfig | 3 +++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-)
hw/arm/Kconfig +3 -0
@@ -81,6 +81,7 @@ config MUSCA select ARMSSE select PL011 select PL031 + select SPLIT_IRQ config MUSICPAL bool
@@ -364,6 +365,7 @@ config MPS2 select OR_IRQ select PL022 # Serial port select PL080 # DMA controller + select SPLIT_IRQ config FSL_IMX7 bool
@@ -442,6 +444,7 @@ config ARMSSE select IOTKIT_SYSCTL select IOTKIT_SYSINFO select OR_IRQ + select SPLIT_IRQ select TZ_MPC select TZ_MSC select TZ_PPC
hw/core/Kconfig +3 -0
@@ -15,3 +15,6 @@ config PLATFORM_BUS config REGISTER bool + +config SPLIT_IRQ + bool
hw/core/Makefile.objs +1 -1
@@ -19,7 +19,7 @@ common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_OR_IRQ) += or-irq.o -common-obj-$(CONFIG_SOFTMMU) += split-irq.o +common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_SOFTMMU) += generic-loader.o common-obj-$(CONFIG_SOFTMMU) += null-machine.o
Signature · 1 line
2.18.1
PATCH v3 7/8 hw/misc: Add a config switch for the "unimplemented" device
In reply to Thomas HuthThe device is only used by some few boards. Let's use a proper Kconfig switch so that we only compile this code if we really need it.
--- hw/arm/Kconfig | 11 +++++++++++ hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/sparc64/Kconfig | 1 + 5 files changed, 17 insertions(+), 1 deletion(-)
hw/arm/Kconfig +11 -0
@@ -82,6 +82,7 @@ config MUSCA select PL011 select PL031 select SPLIT_IRQ + select UNIMP config MUSICPAL bool
@@ -217,6 +218,7 @@ config STELLARIS select SSI_SD select STELLARIS_INPUT select STELLARIS_ENET # ethernet + select UNIMP config STRONGARM bool
@@ -283,6 +285,7 @@ config ALLWINNER_A10 select ALLWINNER_A10_PIC select ALLWINNER_EMAC select SERIAL + select UNIMP config RASPI bool
@@ -320,6 +323,7 @@ config XLNX_VERSAL select PL011 select CADENCE select VIRTIO_MMIO + select UNIMP config FSL_IMX25 bool
@@ -355,6 +359,7 @@ config ASPEED_SOC select SSI_M25P80 select TMP105 select TMP421 + select UNIMP config MPS2 bool
@@ -366,6 +371,7 @@ config MPS2 select PL022 # Serial port select PL080 # DMA controller select SPLIT_IRQ + select UNIMP config FSL_IMX7 bool
@@ -378,6 +384,7 @@ config FSL_IMX7 select IMX_I2C select PCI_EXPRESS_DESIGNWARE select SDHCI + select UNIMP config ARM_SMMUV3 bool
@@ -389,6 +396,7 @@ config FSL_IMX6UL select IMX_FEC select IMX_I2C select SDHCI + select UNIMP config MICROBIT bool
@@ -398,6 +406,7 @@ config NRF51_SOC bool select I2C select ARM_V7M + select UNIMP config EMCRAFT_SF2 bool
@@ -410,6 +419,7 @@ config MSF2 select PTIMER select SERIAL select SSI + select UNIMP config ZAURUS bool
@@ -448,6 +458,7 @@ config ARMSSE select TZ_MPC select TZ_MSC select TZ_PPC + select UNIMP config ARMSSE_CPUID bool
hw/microblaze/Kconfig +1 -0
@@ -4,6 +4,7 @@ config PETALOGIX_S3ADSP1800 select XILINX select XILINX_AXI select XILINX_ETHLITE + select UNIMP config PETALOGIX_ML605 bool
hw/misc/Kconfig +3 -0
@@ -117,4 +117,7 @@ config AUX bool select I2C +config UNIMP + bool + source macio/Kconfig
hw/misc/Makefile.objs +1 -1
@@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o common-obj-$(CONFIG_EDU) += edu.o common-obj-$(CONFIG_PCA9552) += pca9552.o -common-obj-y += unimp.o +common-obj-$(CONFIG_UNIMP) += unimp.o common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o # ARM devices
hw/sparc64/Kconfig +1 -0
@@ -17,3 +17,4 @@ config NIAGARA bool select EMPTY_SLOT select SUN4V_RTC + select UNIMP
Signature · 1 line
2.18.1
Re: [Qemu-arm] [PATCH v3 7/8] hw/misc: Add a config switch for the "unimplemented" device
Quoted 4 lines · Thomas Huth
The device is only used by some few boards. Let's use a proper
Kconfigswitch so that we only compile this code if we really need it.Signed-off-by Thomas Huth <[email protected]>
Quoted 147 lines
--- hw/arm/Kconfig | 11 +++++++++++ hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/sparc64/Kconfig | 1 + 5 files changed, 17 insertions(+), 1 deletion(-)hw/arm/Kconfig +11
-0@@ -82,6 +82,7 @@ config MUSCA select PL011 select PL031 select SPLIT_IRQ + select UNIMP config MUSICPAL bool@@ -217,6 +218,7 @@ config STELLARIS select SSI_SD select STELLARIS_INPUT select STELLARIS_ENET # ethernet + select UNIMP config STRONGARM bool@@ -283,6 +285,7 @@ config ALLWINNER_A10 select ALLWINNER_A10_PIC select ALLWINNER_EMAC select SERIAL + select UNIMP config RASPI bool@@ -320,6 +323,7 @@ config XLNX_VERSAL select PL011 select CADENCE select VIRTIO_MMIO + select UNIMP config FSL_IMX25 bool@@ -355,6 +359,7 @@ config ASPEED_SOC select SSI_M25P80 select TMP105 select TMP421 + select UNIMP config MPS2 bool@@ -366,6 +371,7 @@ config MPS2 select PL022 # Serial port select PL080 # DMA controller select SPLIT_IRQ + select UNIMP config FSL_IMX7 bool@@ -378,6 +384,7 @@ config FSL_IMX7 select IMX_I2C select PCI_EXPRESS_DESIGNWARE select SDHCI + select UNIMP config ARM_SMMUV3 bool@@ -389,6 +396,7 @@ config FSL_IMX6UL select IMX_FEC select IMX_I2C select SDHCI + select UNIMP config MICROBIT bool@@ -398,6 +406,7 @@ config NRF51_SOC bool select I2C select ARM_V7M + select UNIMP config EMCRAFT_SF2 bool@@ -410,6 +419,7 @@ config MSF2 select PTIMER select SERIAL select SSI + select UNIMP config ZAURUS bool@@ -448,6 +458,7 @@ config ARMSSE select TZ_MPC select TZ_MSC select TZ_PPC + select UNIMP config ARMSSE_CPUID boolhw/microblaze/Kconfig +1
-0@@ -4,6 +4,7 @@ config PETALOGIX_S3ADSP1800 select XILINX select XILINX_AXI select XILINX_ETHLITE + select UNIMP config PETALOGIX_ML605 boolhw/misc/Kconfig +3
-0@@ -117,4 +117,7 @@ config AUX bool select I2C +config UNIMP + bool + source macio/Kconfighw/misc/Makefile.objs +1
-1@@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o common-obj-$(CONFIG_EDU) += edu.o common-obj-$(CONFIG_PCA9552) += pca9552.o -common-obj-y += unimp.o +common-obj-$(CONFIG_UNIMP) += unimp.o common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o # ARM deviceshw/sparc64/Kconfig +1
-0@@ -17,3 +17,4 @@ config NIAGARA bool select EMPTY_SLOT select SUN4V_RTC + select UNIMP
PATCH v3 8/8 hw/core: Add a config switch for the generic loader device
In reply to Thomas HuthThe generic loader device is completely optional. Let's add a proper config switch for it so that people can disable it if they don't need it and want to create a minimalistic QEMU binary.
--- hw/core/Kconfig | 4 ++++ hw/core/Makefile.objs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
hw/core/Kconfig +4 -0
@@ -7,6 +7,10 @@ config PTIMER config FITLOADER bool +config GENERIC_LOADER + bool + default y + config OR_IRQ bool
hw/core/Makefile.objs +1 -1
@@ -21,7 +21,7 @@ common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_OR_IRQ) += or-irq.o common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o -common-obj-$(CONFIG_SOFTMMU) += generic-loader.o +common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o common-obj-$(CONFIG_SOFTMMU) += null-machine.o obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
Signature · 1 line
2.18.1
Quoted 3 lines · Thomas Huth
Here are some more
Kconfigpatches that clean up the switches of existing devices and introduce proper config switches for some other devices that were always enabled before.
Thomas, you can go ahead and send a pull request as I will be on vacation soon.
Paolo
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Thomas Huth
Here are some more
Kconfigpatches that clean up the switches of existing devices and introduce proper config switches for some other devices that were always enabled before.Thomas, you can go ahead and send a pull request as I will be on vacation soon.
Ok, I'm going to prepare one.
Thomas