All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches
@ 2019-07-31  7:56 Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 1/8] hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig Thomas Huth
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

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.

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        | 15 +++++++++++++++
 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, 46 insertions(+), 11 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 1/8] hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 2/8] hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU Thomas Huth
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

The XLNX_ZYNQMP config is used in multiple subdirectories
(timer, intc). Move it to the root hw/Kconfig.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190427141459.19728-2-philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/Kconfig       | 3 +++
 hw/timer/Kconfig | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/Kconfig b/hw/Kconfig
index 195f541e50..dbae1c0852 100644
--- a/hw/Kconfig
+++ b/hw/Kconfig
@@ -73,3 +73,6 @@ config XILINX
 config XILINX_AXI
     bool
     select PTIMER # for hw/dma/xilinx_axidma.c
+
+config XLNX_ZYNQMP
+    bool
diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
index 51921eb63f..eefc95f35e 100644
--- a/hw/timer/Kconfig
+++ b/hw/timer/Kconfig
@@ -34,9 +34,6 @@ config TWL92230
     bool
     depends on I2C
 
-config XLNX_ZYNQMP
-    bool
-
 config ALTERA_TIMER
     bool
     select PTIMER
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 2/8] hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 1/8] hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 3/8] hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines Thomas Huth
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

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.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190427141459.19728-3-philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/intc/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs
index 03019b9a03..f726d87532 100644
--- a/hw/intc/Makefile.objs
+++ b/hw/intc/Makefile.objs
@@ -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
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 3/8] hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 1/8] hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 2/8] hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device Thomas Huth
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

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).

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190427141459.19728-4-philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/dma/Makefile.objs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/dma/Makefile.objs b/hw/dma/Makefile.objs
index 8b39f9c600..b672e7a522 100644
--- a/hw/dma/Makefile.objs
+++ b/hw/dma/Makefile.objs
@@ -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
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
                   ` (2 preceding siblings ...)
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 3/8] hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31 11:44   ` Philippe Mathieu-Daudé
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device Thomas Huth
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

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 <thuth@redhat.com>
---
 hw/Kconfig            | 1 +
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/dma/Kconfig        | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/Kconfig b/hw/Kconfig
index dbae1c0852..b45db3c813 100644
--- a/hw/Kconfig
+++ b/hw/Kconfig
@@ -76,3 +76,4 @@ config XILINX_AXI
 
 config XLNX_ZYNQMP
     bool
+    select REGISTER
diff --git a/hw/core/Kconfig b/hw/core/Kconfig
index c2a1ae8122..d11920fcb3 100644
--- a/hw/core/Kconfig
+++ b/hw/core/Kconfig
@@ -9,3 +9,6 @@ config FITLOADER
 
 config PLATFORM_BUS
     bool
+
+config REGISTER
+    bool
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index f8481d959f..d6cfb2a81b 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -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
diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig
index 751dec5426..5c61b67bc0 100644
--- a/hw/dma/Kconfig
+++ b/hw/dma/Kconfig
@@ -16,6 +16,7 @@ config I8257
 
 config ZYNQ_DEVCFG
     bool
+    select REGISTER
 
 config STP2000
     bool
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
                   ` (3 preceding siblings ...)
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31 15:50   ` Philippe Mathieu-Daudé
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device Thomas Huth
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

The "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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 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(-)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index ab65ecd216..849195c3f6 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -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
diff --git a/hw/core/Kconfig b/hw/core/Kconfig
index d11920fcb3..984143456a 100644
--- a/hw/core/Kconfig
+++ b/hw/core/Kconfig
@@ -7,6 +7,9 @@ config PTIMER
 config FITLOADER
     bool
 
+config OR_IRQ
+    bool
+
 config PLATFORM_BUS
     bool
 
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index d6cfb2a81b..ce337bd7c9 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -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
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index 8c16d96b3f..1edc1a31d4 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -2,8 +2,9 @@ config PAM
     bool
 
 config PREP_PCI
-    select PCI
     bool
+    select PCI
+    select OR_IRQ
 
 config GRACKLE_PCI
     select PCI
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
                   ` (4 preceding siblings ...)
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31 15:53   ` Philippe Mathieu-Daudé
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device Thomas Huth
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

The "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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/Kconfig        | 3 +++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 849195c3f6..6e24c73b54 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -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
diff --git a/hw/core/Kconfig b/hw/core/Kconfig
index 984143456a..fffb3d62b2 100644
--- a/hw/core/Kconfig
+++ b/hw/core/Kconfig
@@ -15,3 +15,6 @@ config PLATFORM_BUS
 
 config REGISTER
     bool
+
+config SPLIT_IRQ
+    bool
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index ce337bd7c9..bb1afe422a 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -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
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
                   ` (5 preceding siblings ...)
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31 11:47   ` Philippe Mathieu-Daudé
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device Thomas Huth
  2019-07-31 12:34 ` [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Paolo Bonzini
  8 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

The 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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/Kconfig        | 9 +++++++++
 hw/microblaze/Kconfig | 1 +
 hw/misc/Kconfig       | 3 +++
 hw/misc/Makefile.objs | 2 +-
 hw/sparc64/Kconfig    | 1 +
 5 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 6e24c73b54..ab9e592d74 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -217,6 +217,7 @@ config STELLARIS
     select SSI_SD
     select STELLARIS_INPUT
     select STELLARIS_ENET # ethernet
+    select UNIMP
 
 config STRONGARM
     bool
@@ -283,6 +284,7 @@ config ALLWINNER_A10
     select ALLWINNER_A10_PIC
     select ALLWINNER_EMAC
     select SERIAL
+    select UNIMP
 
 config RASPI
     bool
@@ -320,6 +322,7 @@ config XLNX_VERSAL
     select PL011
     select CADENCE
     select VIRTIO_MMIO
+    select UNIMP
 
 config FSL_IMX25
     bool
@@ -355,6 +358,7 @@ config ASPEED_SOC
     select SSI_M25P80
     select TMP105
     select TMP421
+    select UNIMP
 
 config MPS2
     bool
@@ -378,6 +382,7 @@ config FSL_IMX7
     select IMX_I2C
     select PCI_EXPRESS_DESIGNWARE
     select SDHCI
+    select UNIMP
 
 config ARM_SMMUV3
     bool
@@ -389,6 +394,7 @@ config FSL_IMX6UL
     select IMX_FEC
     select IMX_I2C
     select SDHCI
+    select UNIMP
 
 config MICROBIT
     bool
@@ -398,6 +404,7 @@ config NRF51_SOC
     bool
     select I2C
     select ARM_V7M
+    select UNIMP
 
 config EMCRAFT_SF2
     bool
@@ -410,6 +417,7 @@ config MSF2
     select PTIMER
     select SERIAL
     select SSI
+    select UNIMP
 
 config ZAURUS
     bool
@@ -448,6 +456,7 @@ config ARMSSE
     select TZ_MPC
     select TZ_MSC
     select TZ_PPC
+    select UNIMP
 
 config ARMSSE_CPUID
     bool
diff --git a/hw/microblaze/Kconfig b/hw/microblaze/Kconfig
index c4dc120973..e2697ced9c 100644
--- a/hw/microblaze/Kconfig
+++ b/hw/microblaze/Kconfig
@@ -4,6 +4,7 @@ config PETALOGIX_S3ADSP1800
     select XILINX
     select XILINX_AXI
     select XILINX_ETHLITE
+    select UNIMP
 
 config PETALOGIX_ML605
     bool
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 385e1b0cec..51754bb47c 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -117,4 +117,7 @@ config AUX
     bool
     select I2C
 
+config UNIMP
+    bool
+
 source macio/Kconfig
diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
index e9aab519a1..e4aad707fb 100644
--- a/hw/misc/Makefile.objs
+++ b/hw/misc/Makefile.objs
@@ -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
diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig
index d4d76a89be..f9f8b0f73a 100644
--- a/hw/sparc64/Kconfig
+++ b/hw/sparc64/Kconfig
@@ -17,3 +17,4 @@ config NIAGARA
     bool
     select EMPTY_SLOT
     select SUN4V_RTC
+    select UNIMP
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
                   ` (6 preceding siblings ...)
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device Thomas Huth
@ 2019-07-31  7:56 ` Thomas Huth
  2019-07-31 15:54   ` Philippe Mathieu-Daudé
  2019-07-31 12:34 ` [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Paolo Bonzini
  8 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2019-07-31  7:56 UTC (permalink / raw)
  To: Paolo Bonzini, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

The 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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/core/Kconfig       | 4 ++++
 hw/core/Makefile.objs | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/core/Kconfig b/hw/core/Kconfig
index fffb3d62b2..fdf03514d7 100644
--- a/hw/core/Kconfig
+++ b/hw/core/Kconfig
@@ -7,6 +7,10 @@ config PTIMER
 config FITLOADER
     bool
 
+config GENERIC_LOADER
+    bool
+    default y
+
 config OR_IRQ
     bool
 
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index bb1afe422a..b49f880a0c 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -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
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device Thomas Huth
@ 2019-07-31 11:44   ` Philippe Mathieu-Daudé
  2019-07-31 12:33     ` Paolo Bonzini
  0 siblings, 1 reply; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 11:44 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Peter Maydell, Mark Cave-Ayland, qemu-arm, Alistair Francis,
	Edgar E. Iglesias, Artyom Tarasenko

On 7/31/19 9:56 AM, Thomas Huth wrote:
> 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 <thuth@redhat.com>
> ---
>  hw/Kconfig            | 1 +
>  hw/core/Kconfig       | 3 +++
>  hw/core/Makefile.objs | 2 +-
>  hw/dma/Kconfig        | 1 +
>  4 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/Kconfig b/hw/Kconfig
> index dbae1c0852..b45db3c813 100644
> --- a/hw/Kconfig
> +++ b/hw/Kconfig
> @@ -76,3 +76,4 @@ config XILINX_AXI
>  
>  config XLNX_ZYNQMP
>      bool
> +    select REGISTER
> diff --git a/hw/core/Kconfig b/hw/core/Kconfig
> index c2a1ae8122..d11920fcb3 100644
> --- a/hw/core/Kconfig
> +++ b/hw/core/Kconfig
> @@ -9,3 +9,6 @@ config FITLOADER
>  
>  config PLATFORM_BUS
>      bool
> +
> +config REGISTER

What about naming it REGISTER_ARRAY or REGISTER_BLOCK?

The API is:

    RegisterInfoArray *register_init_block32(...);

Cc'ing Alistair for better name ideas :)

> +    bool
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index f8481d959f..d6cfb2a81b 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -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
> diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig
> index 751dec5426..5c61b67bc0 100644
> --- a/hw/dma/Kconfig
> +++ b/hw/dma/Kconfig
> @@ -16,6 +16,7 @@ config I8257
>  
>  config ZYNQ_DEVCFG
>      bool
> +    select REGISTER
>  
>  config STP2000
>      bool
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device Thomas Huth
@ 2019-07-31 11:47   ` Philippe Mathieu-Daudé
  2019-07-31 11:50     ` Thomas Huth
  0 siblings, 1 reply; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 11:47 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 7/31/19 9:56 AM, Thomas Huth wrote:
> The 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.

I'd prefer having the UnimpDevice user-creatable and always present as a
core device...

Maybe this can be solved by using 'default y':

    config UNIMP
        bool
        default y

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/arm/Kconfig        | 9 +++++++++
>  hw/microblaze/Kconfig | 1 +
>  hw/misc/Kconfig       | 3 +++
>  hw/misc/Makefile.objs | 2 +-
>  hw/sparc64/Kconfig    | 1 +
>  5 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 6e24c73b54..ab9e592d74 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -217,6 +217,7 @@ config STELLARIS
>      select SSI_SD
>      select STELLARIS_INPUT
>      select STELLARIS_ENET # ethernet
> +    select UNIMP
>  
>  config STRONGARM
>      bool
> @@ -283,6 +284,7 @@ config ALLWINNER_A10
>      select ALLWINNER_A10_PIC
>      select ALLWINNER_EMAC
>      select SERIAL
> +    select UNIMP
>  
>  config RASPI
>      bool
> @@ -320,6 +322,7 @@ config XLNX_VERSAL
>      select PL011
>      select CADENCE
>      select VIRTIO_MMIO
> +    select UNIMP
>  
>  config FSL_IMX25
>      bool
> @@ -355,6 +358,7 @@ config ASPEED_SOC
>      select SSI_M25P80
>      select TMP105
>      select TMP421
> +    select UNIMP
>  
>  config MPS2
>      bool
> @@ -378,6 +382,7 @@ config FSL_IMX7
>      select IMX_I2C
>      select PCI_EXPRESS_DESIGNWARE
>      select SDHCI
> +    select UNIMP
>  
>  config ARM_SMMUV3
>      bool
> @@ -389,6 +394,7 @@ config FSL_IMX6UL
>      select IMX_FEC
>      select IMX_I2C
>      select SDHCI
> +    select UNIMP
>  
>  config MICROBIT
>      bool
> @@ -398,6 +404,7 @@ config NRF51_SOC
>      bool
>      select I2C
>      select ARM_V7M
> +    select UNIMP
>  
>  config EMCRAFT_SF2
>      bool
> @@ -410,6 +417,7 @@ config MSF2
>      select PTIMER
>      select SERIAL
>      select SSI
> +    select UNIMP
>  
>  config ZAURUS
>      bool
> @@ -448,6 +456,7 @@ config ARMSSE
>      select TZ_MPC
>      select TZ_MSC
>      select TZ_PPC
> +    select UNIMP
>  
>  config ARMSSE_CPUID
>      bool
> diff --git a/hw/microblaze/Kconfig b/hw/microblaze/Kconfig
> index c4dc120973..e2697ced9c 100644
> --- a/hw/microblaze/Kconfig
> +++ b/hw/microblaze/Kconfig
> @@ -4,6 +4,7 @@ config PETALOGIX_S3ADSP1800
>      select XILINX
>      select XILINX_AXI
>      select XILINX_ETHLITE
> +    select UNIMP
>  
>  config PETALOGIX_ML605
>      bool
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index 385e1b0cec..51754bb47c 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -117,4 +117,7 @@ config AUX
>      bool
>      select I2C
>  
> +config UNIMP
> +    bool
> +
>  source macio/Kconfig
> diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
> index e9aab519a1..e4aad707fb 100644
> --- a/hw/misc/Makefile.objs
> +++ b/hw/misc/Makefile.objs
> @@ -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
> diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig
> index d4d76a89be..f9f8b0f73a 100644
> --- a/hw/sparc64/Kconfig
> +++ b/hw/sparc64/Kconfig
> @@ -17,3 +17,4 @@ config NIAGARA
>      bool
>      select EMPTY_SLOT
>      select SUN4V_RTC
> +    select UNIMP
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device
  2019-07-31 11:47   ` Philippe Mathieu-Daudé
@ 2019-07-31 11:50     ` Thomas Huth
  2019-07-31 15:55       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Huth @ 2019-07-31 11:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote:
> On 7/31/19 9:56 AM, Thomas Huth wrote:
>> The 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.
> 
> I'd prefer having the UnimpDevice user-creatable and always present as a
> core device...

Why? This is a sysbus device that needs to be wired up in code, so I
don't see a reason for making this user-creatable right now.

Anyway, that's a different subject, so this should not be part of this
patch.

 Thomas


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device
  2019-07-31 11:44   ` Philippe Mathieu-Daudé
@ 2019-07-31 12:33     ` Paolo Bonzini
  2019-08-05 17:04       ` Alistair Francis
  0 siblings, 1 reply; 21+ messages in thread
From: Paolo Bonzini @ 2019-07-31 12:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, Yang Zhong, qemu-devel
  Cc: Peter Maydell, Mark Cave-Ayland, qemu-arm, Alistair Francis,
	Edgar E. Iglesias, Artyom Tarasenko

On 31/07/19 13:44, Philippe Mathieu-Daudé wrote:
> What about naming it REGISTER_ARRAY or REGISTER_BLOCK?
> 
> The API is:
> 
>     RegisterInfoArray *register_init_block32(...);
> 
> Cc'ing Alistair for better name ideas :)
> 

I think REGISTER is okay. :)

Paolo


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches
  2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
                   ` (7 preceding siblings ...)
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device Thomas Huth
@ 2019-07-31 12:34 ` Paolo Bonzini
  8 siblings, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2019-07-31 12:34 UTC (permalink / raw)
  To: Thomas Huth, Yang Zhong, Philippe Mathieu-Daudé, qemu-devel
  Cc: Edgar E. Iglesias, Mark Cave-Ayland, Artyom Tarasenko, Peter Maydell

On 31/07/19 09:56, Thomas Huth wrote:
> 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.
> 
> 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        | 15 +++++++++++++++
>  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, 46 insertions(+), 11 deletions(-)
> 

Looks good.  Peter, are you picking it?

Paolo


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device Thomas Huth
@ 2019-07-31 15:50   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 15:50 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 7/31/19 9:56 AM, Thomas Huth wrote:
> The "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.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  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(-)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index ab65ecd216..849195c3f6 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -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
> diff --git a/hw/core/Kconfig b/hw/core/Kconfig
> index d11920fcb3..984143456a 100644
> --- a/hw/core/Kconfig
> +++ b/hw/core/Kconfig
> @@ -7,6 +7,9 @@ config PTIMER
>  config FITLOADER
>      bool
>  
> +config OR_IRQ
> +    bool
> +
>  config PLATFORM_BUS
>      bool
>  
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index d6cfb2a81b..ce337bd7c9 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -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
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index 8c16d96b3f..1edc1a31d4 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -2,8 +2,9 @@ config PAM
>      bool
>  
>  config PREP_PCI
> -    select PCI
>      bool
> +    select PCI
> +    select OR_IRQ
>  
>  config GRACKLE_PCI
>      select PCI
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device Thomas Huth
@ 2019-07-31 15:53   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 15:53 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 7/31/19 9:56 AM, Thomas Huth wrote:
> The "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.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/arm/Kconfig        | 3 +++
>  hw/core/Kconfig       | 3 +++
>  hw/core/Makefile.objs | 2 +-
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 849195c3f6..6e24c73b54 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -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
> diff --git a/hw/core/Kconfig b/hw/core/Kconfig
> index 984143456a..fffb3d62b2 100644
> --- a/hw/core/Kconfig
> +++ b/hw/core/Kconfig
> @@ -15,3 +15,6 @@ config PLATFORM_BUS
>  
>  config REGISTER
>      bool
> +
> +config SPLIT_IRQ
> +    bool
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index ce337bd7c9..bb1afe422a 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -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
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device
  2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device Thomas Huth
@ 2019-07-31 15:54   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 15:54 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 7/31/19 9:56 AM, Thomas Huth wrote:
> The 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.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/core/Kconfig       | 4 ++++
>  hw/core/Makefile.objs | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/core/Kconfig b/hw/core/Kconfig
> index fffb3d62b2..fdf03514d7 100644
> --- a/hw/core/Kconfig
> +++ b/hw/core/Kconfig
> @@ -7,6 +7,10 @@ config PTIMER
>  config FITLOADER
>      bool
>  
> +config GENERIC_LOADER
> +    bool
> +    default y
> +
>  config OR_IRQ
>      bool
>  
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index bb1afe422a..b49f880a0c 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -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
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device
  2019-07-31 11:50     ` Thomas Huth
@ 2019-07-31 15:55       ` Philippe Mathieu-Daudé
  2019-07-31 15:59         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 15:55 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, qemu-devel
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 7/31/19 1:50 PM, Thomas Huth wrote:
> On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote:
>> On 7/31/19 9:56 AM, Thomas Huth wrote:
>>> The 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.
>>
>> I'd prefer having the UnimpDevice user-creatable and always present as a
>> core device...
> 
> Why? This is a sysbus device that needs to be wired up in code, so I
> don't see a reason for making this user-creatable right now.

Right now no.

> Anyway, that's a different subject, so this should not be part of this
> patch.

Fair enough.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device
  2019-07-31 15:55       ` Philippe Mathieu-Daudé
@ 2019-07-31 15:59         ` Philippe Mathieu-Daudé
  2019-08-01  8:08           ` Thomas Huth
  0 siblings, 1 reply; 21+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-31 15:59 UTC (permalink / raw)
  To: Thomas Huth, Paolo Bonzini, Yang Zhong, QEMU Developers
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On Wed, Jul 31, 2019 at 5:55 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
> On 7/31/19 1:50 PM, Thomas Huth wrote:
> > On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote:
> >> On 7/31/19 9:56 AM, Thomas Huth wrote:
> >>> The 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.
> >>
> >> I'd prefer having the UnimpDevice user-creatable and always present as a
> >> core device...
> >
> > Why? This is a sysbus device that needs to be wired up in code, so I
> > don't see a reason for making this user-creatable right now.
>
> Right now no.
>
> > Anyway, that's a different subject, so this should not be part of this
> > patch.
>
> Fair enough.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Err, you missed MUSCA and MPS2.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device
  2019-07-31 15:59         ` Philippe Mathieu-Daudé
@ 2019-08-01  8:08           ` Thomas Huth
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Huth @ 2019-08-01  8:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Paolo Bonzini, Yang Zhong, QEMU Developers
  Cc: Edgar E. Iglesias, qemu-arm, Mark Cave-Ayland, Artyom Tarasenko,
	Peter Maydell

On 31/07/2019 17.59, Philippe Mathieu-Daudé wrote:
> On Wed, Jul 31, 2019 at 5:55 PM Philippe Mathieu-Daudé
> <philmd@redhat.com> wrote:
>> On 7/31/19 1:50 PM, Thomas Huth wrote:
>>> On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote:
>>>> On 7/31/19 9:56 AM, Thomas Huth wrote:
>>>>> The 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.
>>>>
>>>> I'd prefer having the UnimpDevice user-creatable and always present as a
>>>> core device...
>>>
>>> Why? This is a sysbus device that needs to be wired up in code, so I
>>> don't see a reason for making this user-creatable right now.
>>
>> Right now no.
>>
>>> Anyway, that's a different subject, so this should not be part of this
>>> patch.
>>
>> Fair enough.
>>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Err, you missed MUSCA and MPS2.

Ah, well, that's another one of those indirections that we discussed in
v1 and which I apparently forgot to add now in v2 ... both select ARMSSE
which in turn select UNIMP, so it's not completely missing. I'll send a
v3 with a fix.

Thanks for noticing!

 Thomas


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device
  2019-07-31 12:33     ` Paolo Bonzini
@ 2019-08-05 17:04       ` Alistair Francis
  0 siblings, 0 replies; 21+ messages in thread
From: Alistair Francis @ 2019-08-05 17:04 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Yang Zhong, Peter Maydell, Thomas Huth, Mark Cave-Ayland,
	qemu-devel@nongnu.org Developers, qemu-arm, Alistair Francis,
	Edgar E. Iglesias, Philippe Mathieu-Daudé,
	Artyom Tarasenko

On Wed, Jul 31, 2019 at 5:33 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 31/07/19 13:44, Philippe Mathieu-Daudé wrote:
> > What about naming it REGISTER_ARRAY or REGISTER_BLOCK?
> >
> > The API is:
> >
> >     RegisterInfoArray *register_init_block32(...);
> >
> > Cc'ing Alistair for better name ideas :)
> >
>
> I think REGISTER is okay. :)

I think REGISTER is fine as well. If you really wanted something
longer I would go with REGISTER_API.

Alistair

>
> Paolo
>


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-08-05 17:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31  7:56 [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Thomas Huth
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 1/8] hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig Thomas Huth
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 2/8] hw/intc: Only build the xlnx-iomod-intc device for the MicroBlaze PMU Thomas Huth
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 3/8] hw/dma: Do not build the xlnx_dpdma device for the MicroBlaze machines Thomas Huth
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 4/8] hw/core: Add a config switch for the "register" device Thomas Huth
2019-07-31 11:44   ` Philippe Mathieu-Daudé
2019-07-31 12:33     ` Paolo Bonzini
2019-08-05 17:04       ` Alistair Francis
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 5/8] hw/core: Add a config switch for the "or-irq" device Thomas Huth
2019-07-31 15:50   ` Philippe Mathieu-Daudé
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 6/8] hw/core: Add a config switch for the "split-irq" device Thomas Huth
2019-07-31 15:53   ` Philippe Mathieu-Daudé
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device Thomas Huth
2019-07-31 11:47   ` Philippe Mathieu-Daudé
2019-07-31 11:50     ` Thomas Huth
2019-07-31 15:55       ` Philippe Mathieu-Daudé
2019-07-31 15:59         ` Philippe Mathieu-Daudé
2019-08-01  8:08           ` Thomas Huth
2019-07-31  7:56 ` [Qemu-devel] [PATCH v2 8/8] hw/core: Add a config switch for the generic loader device Thomas Huth
2019-07-31 15:54   ` Philippe Mathieu-Daudé
2019-07-31 12:34 ` [Qemu-devel] [PATCH for-4.2 v2 0/8] Kconfig switches Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.