Skip to contentSkip to conversation

Kconfig switches for core / misc devices

PATCH In review Thomas Huth 4 participants 17 messages May 14, 2019 – May 22, 2019

lore
Share & tools
lore
#0 lore raw

cover Kconfig switches for core / misc devices

Here are some more Kconfig patches that introduce proper config switches for some devices in the hw/core and hw/misc directories.

Thomas Huth (4):
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/arm/Kconfig        | 12 ++++++++++++
 hw/core/Kconfig       |  9 +++++++++
 hw/core/Makefile.objs |  6 +++---
 hw/dma/Kconfig        |  1 +
 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      |  1 +
 10 files changed, 34 insertions(+), 5 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/4 hw/core: Add a config switch for the "register" device

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.

---
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/dma/Kconfig        | 1 +
 hw/timer/Kconfig      | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)
hw/core/Kconfig +3 -0
index c2a1ae8122..d11920fcb3 100644
@@ -9,3 +9,6 @@ config FITLOADER
 
 config PLATFORM_BUS
     bool
+
+config REGISTER
+    bool
hw/core/Makefile.objs +1 -1
index a799c83815..d493a051ee 100644
@@ -16,7 +16,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
index 751dec5426..5c61b67bc0 100644
@@ -16,6 +16,7 @@ config I8257
 
 config ZYNQ_DEVCFG
     bool
+    select REGISTER
 
 config STP2000
     bool
hw/timer/Kconfig +1 -0
index 51921eb63f..f575481210 100644
@@ -36,6 +36,7 @@ config TWL92230
 
 config XLNX_ZYNQMP
     bool
+    select REGISTER
 
 config ALTERA_TIMER
     bool
Signature · 1 line
2.21.0
#2 lore raw

Re: [Qemu-arm] [PATCH 1/4] hw/core: Add a config switch for the "register" device

Quoted 54 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.

---
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/dma/Kconfig        | 1 +
 hw/timer/Kconfig      | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)
hw/core/Kconfig +3 -0
index c2a1ae8122..d11920fcb3 100644
@@ -9,3 +9,6 @@ config FITLOADER
 
 config PLATFORM_BUS
     bool
+
+config REGISTER
+    bool
hw/core/Makefile.objs +1 -1
index a799c83815..d493a051ee 100644
@@ -16,7 +16,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
index 751dec5426..5c61b67bc0 100644
@@ -16,6 +16,7 @@ config I8257
 
 config ZYNQ_DEVCFG
     bool
+    select REGISTER
 
 config STP2000
     bool
hw/timer/Kconfig +0 -0
index 51921eb63f..f575481210 100644

hw/timer/Kconfig config TWL92230 · line 42

Quoted 7 lines
hw/timer/Kconfig +1 -0
@@ -36,6 +36,7 @@ config TWL92230
 
 config XLNX_ZYNQMP
     bool
+    select REGISTER
 
 config ALTERA_TIMER
     bool

Annoying, this clashes with "hw/microblaze: Kconfig cleanup" which is already queued by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04669.html

#3 lore raw

Re: [Qemu-devel] [PATCH 1/4] hw/core: Add a config switch for the "register" device

Quoted 59 lines · Philippe Mathieu-Daudé
Quoted 58 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.

---
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/dma/Kconfig        | 1 +
 hw/timer/Kconfig      | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)
hw/core/Kconfig +3 -0
index c2a1ae8122..d11920fcb3 100644
@@ -9,3 +9,6 @@ config FITLOADER
 
 config PLATFORM_BUS
     bool
+
+config REGISTER
+    bool
hw/core/Makefile.objs +1 -1
index a799c83815..d493a051ee 100644
@@ -16,7 +16,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
index 751dec5426..5c61b67bc0 100644
@@ -16,6 +16,7 @@ config I8257
 
 config ZYNQ_DEVCFG
     bool
+    select REGISTER
 
 config STP2000
     bool
hw/timer/Kconfig +1 -0
index 51921eb63f..f575481210 100644
@@ -36,6 +36,7 @@ config TWL92230
 
 config XLNX_ZYNQMP
     bool
+    select REGISTER
 
Quoted 7 lines

hw/timer/Kconfig config TWL92230 · line 42

Quoted 3 lines
hw/timer/Kconfig +0 -0
 config ALTERA_TIMER
     bool

Annoying, this clashes with "hw/microblaze: Kconfig cleanup" which is already queued by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04669.html

Ok, I'll wait for the merge of Paolo's next PULL request before sending the v2 of my series.

Thomas

#4 lore raw

Re: [Qemu-arm] [Qemu-devel] [PATCH 1/4] hw/core: Add a config switch for the "register" device

Quoted 68 lines · Thomas Huth
Quoted 59 lines · Philippe Mathieu-Daudé
Quoted 58 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.

---
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/dma/Kconfig        | 1 +
 hw/timer/Kconfig      | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)
hw/core/Kconfig +3 -0
index c2a1ae8122..d11920fcb3 100644
@@ -9,3 +9,6 @@ config FITLOADER
 
 config PLATFORM_BUS
     bool
+
+config REGISTER
+    bool
hw/core/Makefile.objs +1 -1
index a799c83815..d493a051ee 100644
@@ -16,7 +16,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
index 751dec5426..5c61b67bc0 100644
@@ -16,6 +16,7 @@ config I8257
 
 config ZYNQ_DEVCFG
     bool
+    select REGISTER
 
 config STP2000
     bool
hw/timer/Kconfig +1 -0
index 51921eb63f..f575481210 100644
@@ -36,6 +36,7 @@ config TWL92230
 
 config XLNX_ZYNQMP
     bool
+    select REGISTER
 
Quoted 7 lines

hw/timer/Kconfig config TWL92230 · line 42

Quoted 3 lines
hw/timer/Kconfig +0 -0
 config ALTERA_TIMER
     bool

Annoying, this clashes with "hw/microblaze: Kconfig cleanup" which is already queued by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04669.html

Quoted 2 lines

Ok, I'll wait for the merge of Paolo's next PULL request before sending the v2 of my series.

Looks like your patches were not included in Paolo's last PULL request? Did the patches fall through the cracks?

Thomas

#5 lore raw

PATCH 2/4 hw/core: Add a config switch for the "or-irq" device

In reply to Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +2 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG
@@ -424,6 +425,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
index d11920fcb3..984143456a 100644
@@ -7,6 +7,9 @@ config PTIMER
 config FITLOADER
     bool
 
+config OR_IRQ
+    bool
+
 config PLATFORM_BUS
     bool
 
hw/core/Makefile.objs +1 -1
index d493a051ee..dd2c2ca812 100644
@@ -17,7 +17,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
index 8c16d96b3f..1edc1a31d4 100644
@@ -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.21.0
#6 lore raw

Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device

Quoted 26 lines · Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +1 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG

hw/arm/Kconfig config ARMSSE · line 431

Quoted 7 lines
hw/arm/Kconfig +1 -0
@@ -424,6 +425,7 @@ config ARMSSE
     select IOTKIT_SECCTL
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select OR_IRQ
     select TZ_MPC
     select TZ_MSC
     select TZ_PPC

In cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select OR_IRQ only in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?

thanks
-- PMM

#7 lore raw

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device

Quoted 32 lines · Peter Maydell
Quoted 31 lines · Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +2 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG
@@ -424,6 +425,7 @@ config ARMSSE
     select IOTKIT_SECCTL
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select OR_IRQ
     select TZ_MPC
Quoted 8 lines

hw/arm/Kconfig config ARMSSE · line 431

Quoted 2 lines
hw/arm/Kconfig +0 -0
     select TZ_MSC
     select TZ_PPC

In cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select OR_IRQ only in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?

Someone should be able to work on the board without having to look at the SoC code/config, so both :) The idea of Kconfig is you only worry about a specific device, and the qgraph sort the rest out.

So having in both place is safer, and helps to visualize dependencies in the graph tree (I'm slowly working on this feature to help new-comer to understand model dependencies).

#8 lore raw

Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device

Quoted 42 lines · Philippe Mathieu-Daudé
Quoted 32 lines · Peter Maydell
Quoted 31 lines · Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +2 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG
@@ -424,6 +425,7 @@ config ARMSSE
     select IOTKIT_SECCTL
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select OR_IRQ
     select TZ_MPC
Quoted 8 lines

hw/arm/Kconfig config ARMSSE · line 431

Quoted 2 lines
hw/arm/Kconfig +0 -0
     select TZ_MSC
     select TZ_PPC

In cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select OR_IRQ only in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?

Quoted 3 lines

Someone should be able to work on the board without having to look at the SoC code/config, so both :) The idea of Kconfig is you only worry about a specific device, and the qgraph sort the rest out.

I don't have a strong opinion here, but likely is safer indeed to put the switch into both sections in this case - so if one of the two ever gets changed, the config switch is still there for the other one that still requires it. I'll send a v2.

Thomas

#9 lore raw

Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device

In reply to Philippe Mathieu-Daudé
Quoted 42 lines · Philippe Mathieu-Daudé
Quoted 32 lines · Peter Maydell
Quoted 31 lines · Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +2 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG
@@ -424,6 +425,7 @@ config ARMSSE
     select IOTKIT_SECCTL
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select OR_IRQ
     select TZ_MPC
Quoted 8 lines

hw/arm/Kconfig config ARMSSE · line 431

Quoted 2 lines
hw/arm/Kconfig +0 -0
     select TZ_MSC
     select TZ_PPC

In cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select OR_IRQ only in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?

Quoted 3 lines

Someone should be able to work on the board without having to look at the SoC code/config, so both :) The idea of Kconfig is you only worry about a specific device, and the qgraph sort the rest out.

Hypothetical example if you only use the selector in the SoC config:
If you replace the SoC OR_IRQ by a more complex device or extended one, the board will lack the OR_IRQ selector.

Using Kconfig selectors in all place a dependency is explicit also ease backports.

Quoted 5 lines

So having in both place is safer, and helps to visualize dependencies in the graph tree (I'm slowly working on this feature to help new-comer to understand model dependencies).

#10 lore raw

Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device

In reply to Thomas Huth
Quoted 25 lines · Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +1 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG

hw/arm/Kconfig config ARMSSE · line 431

Quoted 7 lines
hw/arm/Kconfig +1 -0
@@ -424,6 +425,7 @@ config ARMSSE
     select IOTKIT_SECCTL
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select OR_IRQ
     select TZ_MPC
     select TZ_MSC
     select TZ_PPC

You missed the MPS2* boards

Quoted 43 lines
hw/core/Kconfig +3 -0
index d11920fcb3..984143456a 100644
@@ -7,6 +7,9 @@ config PTIMER
 config FITLOADER
     bool
 
+config OR_IRQ
+    bool
+
 config PLATFORM_BUS
     bool
 
hw/core/Makefile.objs +1 -1
index d493a051ee..dd2c2ca812 100644
@@ -17,7 +17,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
index 8c16d96b3f..1edc1a31d4 100644
@@ -2,8 +2,9 @@ config PAM
     bool
 
 config PREP_PCI
-    select PCI
     bool
+    select PCI
+    select OR_IRQ
 
 config GRACKLE_PCI
     select PCI
#11 lore raw

Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device

Quoted 27 lines · Philippe Mathieu-Daudé
Quoted 26 lines · Thomas Huth

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.

---
 hw/arm/Kconfig        | 2 ++
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 hw/pci-host/Kconfig   | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +1 -0
index af8cffde9c..0bb3bbe9d3 100644
@@ -277,6 +277,7 @@ config RASPI
 config STM32F205_SOC
     bool
     select ARM_V7M
+    select OR_IRQ
     select STM32F2XX_TIMER
     select STM32F2XX_USART
     select STM32F2XX_SYSCFG
@@ -424,6 +425,7 @@ config ARMSSE
     select IOTKIT_SECCTL
Quoted 8 lines

hw/arm/Kconfig config ARMSSE · line 431

Quoted 6 lines
hw/arm/Kconfig +1 -0
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select OR_IRQ
     select TZ_MPC
     select TZ_MSC
     select TZ_PPC

You missed the MPS2* boards

No, the MPS2 boards "select ARMSSE", so this gets added via the above hunk there. But as mentioned in the reply to Peter, it's likely better to add it there, too.

Thomas

#12 lore raw

PATCH 3/4 hw/core: Add a config switch for the "split-irq" device

In reply to Thomas Huth

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.

---
 hw/arm/Kconfig        | 1 +
 hw/core/Kconfig       | 3 +++
 hw/core/Makefile.objs | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)
hw/arm/Kconfig +1 -0
index 0bb3bbe9d3..ac1e94f63a 100644
@@ -426,6 +426,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
index 984143456a..fffb3d62b2 100644
@@ -15,3 +15,6 @@ config PLATFORM_BUS
 
 config REGISTER
     bool
+
+config SPLIT_IRQ
+    bool
hw/core/Makefile.objs +1 -1
index dd2c2ca812..d8c908da14 100644
@@ -18,7 +18,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.21.0
#13 lore raw

PATCH 4/4 hw/misc: Add a config switch for the "unimplemented" device

In reply to Thomas Huth

The device is only used by certain Arm boards. Now that we have fine-grained Kconfig for these machines, too, we can enable the "unimplemented" devices only for the machines that really need it.

---
 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(-)
hw/arm/Kconfig +9 -0
index ac1e94f63a..7e261f5d73 100644
@@ -201,6 +201,7 @@ config STELLARIS
     select SSI_SD
     select STELLARIS_INPUT
     select STELLARIS_ENET # ethernet
+    select UNIMP
 
 config STRONGARM
     bool
@@ -267,6 +268,7 @@ config ALLWINNER_A10
     select ALLWINNER_A10_PIC
     select ALLWINNER_EMAC
     select SERIAL
+    select UNIMP
 
 config RASPI
     bool
@@ -304,6 +306,7 @@ config XLNX_VERSAL
     select PL011
     select CADENCE
     select VIRTIO_MMIO
+    select UNIMP
 
 config FSL_IMX25
     bool
@@ -339,6 +342,7 @@ config ASPEED_SOC
     select SSI_M25P80
     select TMP105
     select TMP421
+    select UNIMP
 
 config MPS2
     bool
@@ -360,6 +364,7 @@ config FSL_IMX7
     select IMX_I2C
     select PCI_EXPRESS_DESIGNWARE
     select SDHCI
+    select UNIMP
 
 config ARM_SMMUV3
     bool
@@ -371,6 +376,7 @@ config FSL_IMX6UL
     select IMX_FEC
     select IMX_I2C
     select SDHCI
+    select UNIMP
 
 config MICROBIT
     bool
@@ -380,6 +386,7 @@ config NRF51_SOC
     bool
     select I2C
     select ARM_V7M
+    select UNIMP
 
 config EMCRAFT_SF2
     bool
@@ -392,6 +399,7 @@ config MSF2
     select PTIMER
     select SERIAL
     select SSI
+    select UNIMP
 
 config ZAURUS
     bool
@@ -430,6 +438,7 @@ config ARMSSE
     select TZ_MPC
     select TZ_MSC
     select TZ_PPC
+    select UNIMP
 
 config ARMSSE_CPUID
     bool
hw/microblaze/Kconfig +1 -0
index c4dc120973..e2697ced9c 100644
@@ -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
index 385e1b0cec..51754bb47c 100644
@@ -117,4 +117,7 @@ config AUX
     bool
     select I2C
 
+config UNIMP
+    bool
+
 source macio/Kconfig
hw/misc/Makefile.objs +1 -1
index c71e07ae35..7a0902c76f 100644
@@ -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
index d4d76a89be..f9f8b0f73a 100644
@@ -17,3 +17,4 @@ config NIAGARA
     bool
     select EMPTY_SLOT
     select SUN4V_RTC
+    select UNIMP
Signature · 1 line
2.21.0
#14 lore raw

Re: [Qemu-devel] [Qemu-arm] [PATCH 4/4] hw/misc: Add a config switch for the "unimplemented" device

Quoted 5 lines · Thomas Huth

The device is only used by certain Arm boards. Now that we have fine-grained Kconfig for these machines, too, we can enable the "unimplemented" devices only for the machines that really need it.

Quoted 8 lines
---
 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(-)

Commit message says "only Arm" but code change changes sparc and microblaze Kconfigs too :-)

thanks
-- PMM

#15 lore raw

Re: [Qemu-arm] [PATCH 4/4] hw/misc: Add a config switch for the "unimplemented" device

Quoted 15 lines · Peter Maydell
Quoted 5 lines · Thomas Huth

The device is only used by certain Arm boards. Now that we have fine-grained Kconfig for these machines, too, we can enable the "unimplemented" devices only for the machines that really need it.

Quoted 8 lines
---
 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(-)
Quoted 2 lines

Commit message says "only Arm" but code change changes sparc and microblaze Kconfigs too :-)

D'oh! ... I started with grep'ing for TYPE_UNIMPLEMENTED_DEVICE and only saw Arm boards there. When I tested my patches, I noticed that I must also add the machines that use the create_unimplemented_device() function, but apparently forgot to fix up the commit message accordingly. I'll fix it in v2.

Thomas

Acked-by on the v1 series
#16 lore raw
In reply to Thomas Huth
Quoted 9 lines · Thomas Huth

Here are some more Kconfig patches that introduce proper config switches for some devices in the hw/core and hw/misc directories.

Thomas Huth (4):
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

Quoted 12 lines
 hw/arm/Kconfig        | 12 ++++++++++++
 hw/core/Kconfig       |  9 +++++++++
 hw/core/Makefile.objs |  6 +++---
 hw/dma/Kconfig        |  1 +
 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      |  1 +
 10 files changed, 34 insertions(+), 5 deletions(-)

Paolo