Skip to contentSkip to conversation

hw: Fix various --without-default-devices issues

PATCH In review Philippe Mathieu-Daudé 7 participants 41 messages Dec 31, 2019 – Jan 7, 2020

lore
Share & tools
lore
#0 lore raw

cover hw: Fix various --without-default-devices issues

Various fixes when configured with --without-default-devices and building each machine individually.
Adding the corresponding CI tests is out of the scope of this series.

This series is pushed on top of "hw/i386: Allow building machines without IOMMU" [*] here:
https://gitlab.com/philmd/qemu/commits/kconfig_misc_fixes

Happy new year!

[*] https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg05230.html

Philippe Mathieu-Daudé (14):
hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled hw/intc/i8259: Fix Kconfig dependency on ISA bus hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config hw/i386: Restrict fw_cfg to the PC machines hw/i2c/Kconfig: Add an entry for the SMBus
hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based
platforms
hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices hw/ppc/Makefile: Simplify the sPAPR PCI objects rule hw/ppc/Kconfig: Only select fw_cfg with machines using OpenBIOS hw/ppc/Kconfig: Only select FDT helper for machines using it hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or
SLOF
hw/intc/Kconfig: Let APIC select IOAPIC

 default-configs/mips-softmmu-common.mak |  1 +
 default-configs/ppc-softmmu.mak         |  1 -
 hw/i2c/Kconfig                          |  8 ++++++--
 hw/i2c/Makefile.objs                    |  3 ++-
 hw/i386/Kconfig                         |  2 +-
 hw/i386/Makefile.objs                   |  2 +-
 hw/intc/Kconfig                         |  2 ++
 hw/net/Kconfig                          |  2 ++
 hw/nvram/Kconfig                        |  8 ++++++++
 hw/nvram/Makefile.objs                  |  4 ++--
 hw/ppc/Kconfig                          | 20 ++++++++++++++++++++
 hw/ppc/Makefile.objs                    |  9 ++++-----
 hw/scsi/Kconfig                         |  1 +
 hw/sparc/Kconfig                        |  1 +
 hw/sparc64/Kconfig                      |  1 +
 hw/usb/Makefile.objs                    |  2 ++
 16 files changed, 54 insertions(+), 13 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/14 hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled

The 'usb-redir' device requires the USB core code to work. Do not link it when there is no USB support. This fixes:

  $ qemu-system-tricore -M tricore_testboard -device usb-redir
  qemu-system-tricore: -device usb-redir: No 'usb-bus' bus found for device 'usb-redir'
---
 hw/usb/Makefile.objs | 2 ++
 1 file changed, 2 insertions(+)
hw/usb/Makefile.objs +2 -0
index 0ab20f9d73..0052d49ce1 100644
@@ -39,9 +39,11 @@ common-obj-$(CONFIG_USB_STORAGE_MTP)  += dev-mtp.o
 endif
 
 # usb redirection
+ifeq ($(CONFIG_USB),y)
 common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 redirect.o-cflags = $(USB_REDIR_CFLAGS)
 redirect.o-libs = $(USB_REDIR_LIBS)
+endif
 
 # usb pass-through
 ifeq ($(CONFIG_USB_LIBUSB)$(CONFIG_USB),yy)
Signature · 1 line
2.21.0
Reviewed-by on v1 1/14
#2 lore raw

Re: [PATCH 01/14] hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled

Quoted 18 lines · Philippe Mathieu-Daudé

The 'usb-redir' device requires the USB core code to work. Do not link it when there is no USB support. This fixes:

  $ qemu-system-tricore -M tricore_testboard -device usb-redir
  qemu-system-tricore: -device usb-redir: No 'usb-bus' bus found for device 'usb-redir'
---
 hw/usb/Makefile.objs | 2 ++
 1 file changed, 2 insertions(+)
hw/usb/Makefile.objs +0 -0
index 0ab20f9d73..0052d49ce1 100644
@@ -39,9 +39,11 @@ common-obj-$(CONFIG_USB_STORAGE_MTP)  += dev-mtp.o
 endif

hw/usb/Makefile.objs common-obj-$(CONFIG_USB_STORAGE_MTP) += dev-mtp.o · line 49

Quoted 10 lines
hw/usb/Makefile.objs +2 -0
 
 # usb redirection
+ifeq ($(CONFIG_USB),y)
 common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 redirect.o-cflags = $(USB_REDIR_CFLAGS)
 redirect.o-libs = $(USB_REDIR_LIBS)
+endif
 
 # usb pass-through
 ifeq ($(CONFIG_USB_LIBUSB)$(CONFIG_USB),yy)
#3 lore raw

PATCH 2/14 hw/intc/i8259: Fix Kconfig dependency on ISA bus

In reply to Philippe Mathieu-Daudé

The 8259 Interrupt Controller sits on a ISA bus.
Add the missing dependency to fix:

    LINK    x86_64-softmmu/qemu-system-x86_64

/usr/bin/ld: ../hw/intc/i8259_common.o: in function `pic_common_realize':
hw/intc/i8259_common.c:84: undefined reference to isa_register_ioport' /usr/bin/ld: hw/intc/i8259_common.c:86: undefined reference to isa_register_ioport' /usr/bin/ld: ../hw/intc/i8259_common.o: in function `i8259_init_chip':
hw/intc/i8259_common.c:97: undefined reference to `isa_create'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1

---
Cc: "Michael S. Tsirkin" <[email protected]> (supporter:PC Chipset)

---
 hw/intc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/intc/Kconfig +1 -0
index 10a680b53a..a189d6fedd 100644
@@ -3,6 +3,7 @@ config HEATHROW_PIC
 
 config I8259
     bool
+    select ISA_BUS
 
 config PL190
     bool
Signature · 1 line
2.21.0
Reviewed-by on v1 2/14
#4 lore raw

Re: [PATCH 02/14] hw/intc/i8259: Fix Kconfig dependency on ISA bus

Quoted 25 lines · Philippe Mathieu-Daudé

The 8259 Interrupt Controller sits on a ISA bus.
Add the missing dependency to fix:

    LINK    x86_64-softmmu/qemu-system-x86_64

/usr/bin/ld: ../hw/intc/i8259_common.o: in function `pic_common_realize':
hw/intc/i8259_common.c:84: undefined reference to isa_register_ioport' /usr/bin/ld: hw/intc/i8259_common.c:86: undefined reference to isa_register_ioport' /usr/bin/ld: ../hw/intc/i8259_common.o: in function `i8259_init_chip':
hw/intc/i8259_common.c:97: undefined reference to `isa_create'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1

---
Cc: "Michael S. Tsirkin" <[email protected]> (supporter:PC Chipset)

---
 hw/intc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/intc/Kconfig +0 -0
index 10a680b53a..a189d6fedd 100644

hw/intc/Kconfig config HEATHROW_PIC · line 9

Quoted 7 lines
hw/intc/Kconfig +1 -0
@@ -3,6 +3,7 @@ config HEATHROW_PIC
 
 config I8259
     bool
+    select ISA_BUS
 
 config PL190
     bool

The code uses "parent = TYPE_ISA_DEVICE", so this seems to be right.

#5 lore raw

PATCH 3/14 hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config

In reply to Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

     LINK    x86_64-softmmu/qemu-system-x86_64

/usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init':
hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
make: *** [Makefile:483: x86_64-softmmu/all] Error 2

While the MicroVM machine only uses the ISA serial port when the MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked with it. Replace the 'imply' Kconfig rule by a 'select'.

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Kconfig +1 -1
index e428322a2c..cbcfb1ce81 100644
@@ -96,7 +96,7 @@ config Q35
 
 config MICROVM
     bool
-    imply SERIAL_ISA
+    select SERIAL_ISA
     select ISA_BUS
     select APIC
     select IOAPIC
Signature · 1 line
2.21.0
#6 lore raw

Re: [PATCH 03/14] hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config

Quoted 9 lines · Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

     LINK    x86_64-softmmu/qemu-system-x86_64

/usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init':
hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
make: *** [Makefile:483: x86_64-softmmu/all] Error 2

Quoted 3 lines

While the MicroVM machine only uses the ISA serial port when the MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked with it. Replace the 'imply' Kconfig rule by a 'select'.

I added a comment "# for serial_hds_isa_init()" here.

Paolo

Quoted 21 lines

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Kconfig +1 -1
index e428322a2c..cbcfb1ce81 100644
@@ -96,7 +96,7 @@ config Q35
 
 config MICROVM
     bool
-    imply SERIAL_ISA
+    select SERIAL_ISA
     select ISA_BUS
     select APIC
     select IOAPIC
#7 lore raw

Re: [PATCH 03/14] hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config

Quoted 10 lines · Paolo Bonzini
Quoted 9 lines · Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

      LINK    x86_64-softmmu/qemu-system-x86_64

/usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init':
hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
make: *** [Makefile:483: x86_64-softmmu/all] Error 2

Quoted 5 lines
Quoted 3 lines

While the MicroVM machine only uses the ISA serial port when the MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked with it. Replace the 'imply' Kconfig rule by a 'select'.

I added a comment "# for serial_hds_isa_init()" here.

Sounds good, assuming the microvm might become more modular later.

Quoted 22 lines
Quoted 21 lines

---
Cc: Sergio Lopez <[email protected]>

---
  hw/i386/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Kconfig +1 -1
index e428322a2c..cbcfb1ce81 100644
@@ -96,7 +96,7 @@ config Q35
 
  config MICROVM
      bool
-    imply SERIAL_ISA
+    select SERIAL_ISA
      select ISA_BUS
      select APIC
      select IOAPIC
#8 lore raw

PATCH 4/14 hw/i386: Restrict fw_cfg to the PC machines

In reply to Philippe Mathieu-Daudé

Only the PC-based machines use the fw_cfg device. In particular, the MicroVM machine does not use it. Only compile/link it when machines require it.

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +1 -1
index 6ebb6d0cf0..48f2693546 100644
@@ -5,7 +5,7 @@ obj-$(CONFIG_PC) += pc.o pc_sysfw.o
 obj-$(CONFIG_I440FX) += pc_piix.o
 obj-$(CONFIG_Q35) += pc_q35.o
 obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
+obj-$(CONFIG_PC) += fw_cfg.o
 obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
 obj-$(CONFIG_VTD) += intel_iommu.o
 obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
Signature · 1 line
2.21.0
#9 lore raw

Re: [PATCH 04/14] hw/i386: Restrict fw_cfg to the PC machines

Quoted 17 lines · Philippe Mathieu-Daudé

Only the PC-based machines use the fw_cfg device. In particular, the MicroVM machine does not use it. Only compile/link it when machines require it.

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +0 -0
index 6ebb6d0cf0..48f2693546 100644

hw/i386/Makefile.objs obj-$(CONFIG_PC) += pc.o pc_sysfw.o · line 11

Quoted 8 lines
hw/i386/Makefile.objs +1 -1
@@ -5,7 +5,7 @@ obj-$(CONFIG_PC) += pc.o pc_sysfw.o
 obj-$(CONFIG_I440FX) += pc_piix.o
 obj-$(CONFIG_Q35) += pc_q35.o
 obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
+obj-$(CONFIG_PC) += fw_cfg.o
 obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
 obj-$(CONFIG_VTD) += intel_iommu.o
 obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o

It does use it, it calls fw_cfg_init_io_dma.

Paolo

#10 lore raw

Re: [PATCH 04/14] hw/i386: Restrict fw_cfg to the PC machines

In reply to Philippe Mathieu-Daudé
Quoted 17 lines · Philippe Mathieu-Daudé

Only the PC-based machines use the fw_cfg device. In particular, the MicroVM machine does not use it. Only compile/link it when machines require it.

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +0 -0
index 6ebb6d0cf0..48f2693546 100644

hw/i386/Makefile.objs obj-$(CONFIG_PC) += pc.o pc_sysfw.o · line 11

Quoted 8 lines
hw/i386/Makefile.objs +1 -1
@@ -5,7 +5,7 @@ obj-$(CONFIG_PC) += pc.o pc_sysfw.o
 obj-$(CONFIG_I440FX) += pc_piix.o
 obj-$(CONFIG_Q35) += pc_q35.o
 obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
+obj-$(CONFIG_PC) += fw_cfg.o
 obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
 obj-$(CONFIG_VTD) += intel_iommu.o
 obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o

Ah no, this is hw/i386/fw_cfg.c; of course hw/nvram/fw_cfg.c has its own Kconfig symbol. Can you rename the file to pc-fwcfg.c and adjust the commit message?

Paolo

#11 lore raw

Re: [PATCH 04/14] hw/i386: Restrict fw_cfg to the PC machines

Quoted 22 lines · Paolo Bonzini
Quoted 21 lines · Philippe Mathieu-Daudé

Only the PC-based machines use the fw_cfg device. In particular, the MicroVM machine does not use it. Only compile/link it when machines require it.

---
Cc: Sergio Lopez <[email protected]>

---
  hw/i386/Makefile.objs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +1 -1
index 6ebb6d0cf0..48f2693546 100644
@@ -5,7 +5,7 @@ obj-$(CONFIG_PC) += pc.o pc_sysfw.o
  obj-$(CONFIG_I440FX) += pc_piix.o
  obj-$(CONFIG_Q35) += pc_q35.o
  obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
+obj-$(CONFIG_PC) += fw_cfg.o
Quoted 8 lines

hw/i386/Makefile.objs obj-$(CONFIG_PC) += pc.o pc_sysfw.o · line 11

Quoted 4 lines
hw/i386/Makefile.objs +0 -0
  obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
  obj-$(CONFIG_VTD) += intel_iommu.o
  obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o

Ah no, this is hw/i386/fw_cfg.c; of course hw/nvram/fw_cfg.c has its own Kconfig symbol. Can you rename the file to pc-fwcfg.c and adjust the commit message?

Yes, will do (I'll try to post a new series with only patches you haven't picked already).

#12 lore raw

Re: [PATCH 04/14] hw/i386: Restrict fw_cfg to the PC machines

In reply to Paolo Bonzini
Quoted 21 lines · Paolo Bonzini
Quoted 20 lines · Philippe Mathieu-Daudé

Only the PC-based machines use the fw_cfg device. In particular, the MicroVM machine does not use it. Only compile/link it when machines require it.

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +0 -1
index 6ebb6d0cf0..48f2693546 100644
@@ -5,7 +5,7 @@ obj-$(CONFIG_PC) += pc.o pc_sysfw.o
 obj-$(CONFIG_I440FX) += pc_piix.o
 obj-$(CONFIG_Q35) += pc_q35.o
 obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
Quoted 8 lines

hw/i386/Makefile.objs obj-$(CONFIG_PC) += pc.o pc_sysfw.o · line 11

Quoted 5 lines
hw/i386/Makefile.objs +1 -0
+obj-$(CONFIG_PC) += fw_cfg.o
 obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
 obj-$(CONFIG_VTD) += intel_iommu.o
 obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o

Ah no, this is hw/i386/fw_cfg.c; of course hw/nvram/fw_cfg.c has its own Kconfig symbol.

Sorry couldn't find it. Which symbol is that?

Quoted 4 lines

Can you rename the file to pc-fwcfg.c and adjust the
commit message?

Paolo

Yea hw/i386/fw_cfg.c are helpers for use of fw cfg in pc, it's not a fw cfg device as the commit message seems to imply.

If there is a fw cfg symbol, would it be cleaner to make pc-fwcfg.c depend on it?

Signature · 1 line
MST
#13 lore raw

Re: [PATCH 04/14] hw/i386: Restrict fw_cfg to the PC machines

Quoted 31 lines · Michael S. Tsirkin
Quoted 21 lines · Paolo Bonzini
Quoted 20 lines · Philippe Mathieu-Daudé

Only the PC-based machines use the fw_cfg device. In particular, the MicroVM machine does not use it. Only compile/link it when machines require it.

---
Cc: Sergio Lopez <[email protected]>

---
 hw/i386/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +0 -1
index 6ebb6d0cf0..48f2693546 100644
@@ -5,7 +5,7 @@ obj-$(CONFIG_PC) += pc.o pc_sysfw.o
 obj-$(CONFIG_I440FX) += pc_piix.o
 obj-$(CONFIG_Q35) += pc_q35.o
 obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
Quoted 8 lines

hw/i386/Makefile.objs obj-$(CONFIG_PC) += pc.o pc_sysfw.o · line 11

Quoted 5 lines
hw/i386/Makefile.objs +1 -0
+obj-$(CONFIG_PC) += fw_cfg.o
 obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
 obj-$(CONFIG_VTD) += intel_iommu.o
 obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o

Ah no, this is hw/i386/fw_cfg.c; of course hw/nvram/fw_cfg.c has its own Kconfig symbol.

Quoted 1 line

Sorry couldn't find it. Which symbol is that?

None. :) fw_cfg has a bunch of uses in vl.c, it's not really going to be easy to stub it out and probably pointless because it's an easy way for firmware to get QEMU-specific information.

Paolo

#14 lore raw

PATCH 5/14 hw/i2c/Kconfig: Add an entry for the SMBus

In reply to Philippe Mathieu-Daudé

The System Management Bus is more or less a derivative of the I2C bus, thus the Kconfig entry depends of I2C.
Not all boards providing an I2C bus support SMBus.
Use two different Kconfig entries to be able to select I2C without selecting SMBus.

---
Cc: Corey Minyard <[email protected]>

---
 default-configs/mips-softmmu-common.mak | 1 +
 hw/i2c/Kconfig                          | 8 ++++++--
 hw/i2c/Makefile.objs                    | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)
default-configs/mips-softmmu-common.mak +1 -0
index da29c6c0b2..ac76d944b8 100644
@@ -37,6 +37,7 @@ CONFIG_R4K=y
 CONFIG_MALTA=y
 CONFIG_PCNET_PCI=y
 CONFIG_MIPSSIM=y
+CONFIG_SMBUS=y
 CONFIG_ACPI_SMBUS=y
 CONFIG_SMBUS_EEPROM=y
 CONFIG_TEST_DEVICES=y
hw/i2c/Kconfig +6 -2
index 2bbd395813..09642a6dcb 100644
@@ -1,9 +1,13 @@
 config I2C
     bool
 
+config SMBUS
+    bool
+    select I2C
+
 config SMBUS_EEPROM
     bool
-    depends on I2C
+    select SMBUS
 
 config VERSATILE_I2C
     bool
@@ -11,7 +15,7 @@ config VERSATILE_I2C
 
 config ACPI_SMBUS
     bool
-    select I2C
+    select SMBUS
 
 config BITBANG_I2C
     bool
hw/i2c/Makefile.objs +2 -1
index d7073a401f..cbbc8507a3 100644
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_I2C) += core.o smbus_slave.o smbus_master.o
+common-obj-$(CONFIG_I2C) += core.o
+common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
 common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
Signature · 1 line
2.21.0
Reviewed-by on v1 5/14
#15 lore raw

Re: [PATCH 05/14] hw/i2c/Kconfig: Add an entry for the SMBus

Quoted 20 lines · Philippe Mathieu-Daudé

The System Management Bus is more or less a derivative of the I2C bus, thus the Kconfig entry depends of I2C.
Not all boards providing an I2C bus support SMBus.
Use two different Kconfig entries to be able to select I2C without selecting SMBus.

---
Cc: Corey Minyard <[email protected]>

---
 default-configs/mips-softmmu-common.mak | 1 +
 hw/i2c/Kconfig                          | 8 ++++++--
 hw/i2c/Makefile.objs                    | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)
default-configs/mips-softmmu-common.mak +0 -0
index da29c6c0b2..ac76d944b8 100644

default-configs/mips-softmmu-common.mak CONFIG_R4K=y · line 40

Quoted 4 lines
default-configs/mips-softmmu-common.mak +1 -0
@@ -37,6 +37,7 @@ CONFIG_R4K=y
 CONFIG_MALTA=y
 CONFIG_PCNET_PCI=y
 CONFIG_MIPSSIM=y
+CONFIG_SMBUS=y

Why is the above necessary? Wouldn't CONFIG_ACPI_SMBUS=y below cause this to be done?

Quoted 36 lines
default-configs/mips-softmmu-common.mak +0 -0
 CONFIG_ACPI_SMBUS=y
 CONFIG_SMBUS_EEPROM=y
 CONFIG_TEST_DEVICES=y
hw/i2c/Kconfig +6 -2
index 2bbd395813..09642a6dcb 100644
@@ -1,9 +1,13 @@
 config I2C
     bool
 
+config SMBUS
+    bool
+    select I2C
+
 config SMBUS_EEPROM
     bool
-    depends on I2C
+    select SMBUS
 
 config VERSATILE_I2C
     bool
@@ -11,7 +15,7 @@ config VERSATILE_I2C
 
 config ACPI_SMBUS
     bool
-    select I2C
+    select SMBUS
 
 config BITBANG_I2C
     bool
hw/i2c/Makefile.objs +0 -0
index d7073a401f..cbbc8507a3 100644

hw/i2c/Makefile.objs line 5

Quoted 6 lines
hw/i2c/Makefile.objs +2 -1
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_I2C) += core.o smbus_slave.o smbus_master.o
+common-obj-$(CONFIG_I2C) += core.o
+common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
 common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o

There is some messiness with ICH, but it appears that everything will work correctly there and this patch is not the right place to fix it.

This looks fine and avoids including smbus code when it is not necessary. With the MIPS config item removed (assuming it is not necessary):

I can take it into my tree if you like.

Thanks,

-corey

Quoted 3 lines
Signature · 1 line
2.21.0
#16 lore raw

Re: [PATCH 05/14] hw/i2c/Kconfig: Add an entry for the SMBus

Quoted 16 lines · Corey Minyard
Quoted 15 lines · Philippe Mathieu-Daudé

The System Management Bus is more or less a derivative of the I2C bus, thus the Kconfig entry depends of I2C.
Not all boards providing an I2C bus support SMBus.
Use two different Kconfig entries to be able to select I2C without selecting SMBus.

---
Cc: Corey Minyard <[email protected]>

---
  default-configs/mips-softmmu-common.mak | 1 +
  hw/i2c/Kconfig                          | 8 ++++++--
  hw/i2c/Makefile.objs                    | 3 ++-
  3 files changed, 9 insertions(+), 3 deletions(-)
Quoted 12 lines

default-configs/mips-softmmu-common.mak CONFIG_R4K=y · line 40

Quoted 9 lines
default-configs/mips-softmmu-common.mak +1 -0
index da29c6c0b2..ac76d944b8 100644
@@ -37,6 +37,7 @@ CONFIG_R4K=y
  CONFIG_MALTA=y
  CONFIG_PCNET_PCI=y
  CONFIG_MIPSSIM=y
+CONFIG_SMBUS=y

Why is the above necessary? Wouldn't CONFIG_ACPI_SMBUS=y below cause this to be done?

Yes you are correct!

Quoted 30 lines
Quoted 30 lines
default-configs/mips-softmmu-common.mak +0 -0
  CONFIG_ACPI_SMBUS=y
  CONFIG_SMBUS_EEPROM=y
  CONFIG_TEST_DEVICES=y
hw/i2c/Kconfig +6 -2
index 2bbd395813..09642a6dcb 100644
@@ -1,9 +1,13 @@
  config I2C
      bool
 
+config SMBUS
+    bool
+    select I2C
+
  config SMBUS_EEPROM
      bool
-    depends on I2C
+    select SMBUS
 
  config VERSATILE_I2C
      bool
@@ -11,7 +15,7 @@ config VERSATILE_I2C
 
  config ACPI_SMBUS
      bool
-    select I2C
+    select SMBUS
 
Quoted 16 lines

hw/i2c/Makefile.objs line 5

Quoted 13 lines
hw/i2c/Kconfig +0 -0
  config BITBANG_I2C
      bool
hw/i2c/Makefile.objs +2 -1
index d7073a401f..cbbc8507a3 100644
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_I2C) += core.o smbus_slave.o smbus_master.o
+common-obj-$(CONFIG_I2C) += core.o
+common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
  common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
  common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
  common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o

There is some messiness with ICH, but it appears that everything will work correctly there and this patch is not the right place to fix it.

I did some cleaning with the ICH9 chipset last year, I need to find some time to refresh it.

Quoted 5 lines

This looks fine and avoids including smbus code when it is not necessary. With the MIPS config item removed (assuming it is not necessary):

Thanks!

Quoted 2 lines

I can take it into my tree if you like.

Sure, do you mind cleaning default-configs/mips-softmmu-common.mak or you prefer a respin of this single patch?

Quoted 9 lines

Thanks,

-corey

Quoted 3 lines
Signature · 1 line
2.21.0
#17 lore raw

Re: [PATCH 05/14] hw/i2c/Kconfig: Add an entry for the SMBus

Quoted 84 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Corey Minyard
Quoted 15 lines · Philippe Mathieu-Daudé

The System Management Bus is more or less a derivative of the I2C bus, thus the Kconfig entry depends of I2C.
Not all boards providing an I2C bus support SMBus.
Use two different Kconfig entries to be able to select I2C without selecting SMBus.

---
Cc: Corey Minyard <[email protected]>

---
  default-configs/mips-softmmu-common.mak | 1 +
  hw/i2c/Kconfig                          | 8 ++++++--
  hw/i2c/Makefile.objs                    | 3 ++-
  3 files changed, 9 insertions(+), 3 deletions(-)
Quoted 12 lines

default-configs/mips-softmmu-common.mak CONFIG_R4K=y · line 40

Quoted 9 lines
default-configs/mips-softmmu-common.mak +1 -0
index da29c6c0b2..ac76d944b8 100644
@@ -37,6 +37,7 @@ CONFIG_R4K=y
  CONFIG_MALTA=y
  CONFIG_PCNET_PCI=y
  CONFIG_MIPSSIM=y
+CONFIG_SMBUS=y

Why is the above necessary? Wouldn't CONFIG_ACPI_SMBUS=y below cause this to be done?

Yes you are correct!

Quoted 34 lines
Quoted 34 lines
default-configs/mips-softmmu-common.mak +0 -0
  CONFIG_ACPI_SMBUS=y
  CONFIG_SMBUS_EEPROM=y
  CONFIG_TEST_DEVICES=y
hw/i2c/Kconfig +6 -2
index 2bbd395813..09642a6dcb 100644
@@ -1,9 +1,13 @@
  config I2C
      bool
+config SMBUS
+    bool
+    select I2C
+
  config SMBUS_EEPROM
      bool
-    depends on I2C
+    select SMBUS
  config VERSATILE_I2C
      bool
@@ -11,7 +15,7 @@ config VERSATILE_I2C
  config ACPI_SMBUS
      bool
-    select I2C
+    select SMBUS
  config BITBANG_I2C
      bool
hw/i2c/Makefile.objs +0 -1
index d7073a401f..cbbc8507a3 100644
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_I2C) += core.o smbus_slave.o smbus_master.o
Quoted 8 lines

hw/i2c/Makefile.objs line 5

Quoted 5 lines
hw/i2c/Makefile.objs +2 -0
+common-obj-$(CONFIG_I2C) += core.o
+common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
  common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
  common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
  common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o

There is some messiness with ICH, but it appears that everything will work correctly there and this patch is not the right place to fix it.

I did some cleaning with the ICH9 chipset last year, I need to find some time to refresh it.

Quoted 5 lines

This looks fine and avoids including smbus code when it is not necessary. With the MIPS config item removed (assuming it is not necessary):

Quoted 7 lines

Thanks!

Quoted 2 lines

I can take it into my tree if you like.

Sure, do you mind cleaning default-configs/mips-softmmu-common.mak or you prefer a respin of this single patch?

I removed that piece and have it queued.

Thanks,

-corey

Quoted 11 lines
Quoted 10 lines

Thanks,

-corey

Quoted 3 lines
Signature · 1 line
2.21.0
#18 lore raw

Re: [PATCH 05/14] hw/i2c/Kconfig: Add an entry for the SMBus

Quoted 88 lines · Corey Minyard
Quoted 87 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Corey Minyard
Quoted 15 lines · Philippe Mathieu-Daudé

The System Management Bus is more or less a derivative of the I2C bus, thus the Kconfig entry depends of I2C.
Not all boards providing an I2C bus support SMBus.
Use two different Kconfig entries to be able to select I2C without selecting SMBus.

---
Cc: Corey Minyard <[email protected]>

---
   default-configs/mips-softmmu-common.mak | 1 +
   hw/i2c/Kconfig                          | 8 ++++++--
   hw/i2c/Makefile.objs                    | 3 ++-
   3 files changed, 9 insertions(+), 3 deletions(-)
Quoted 12 lines

default-configs/mips-softmmu-common.mak CONFIG_R4K=y · line 40

Quoted 9 lines
default-configs/mips-softmmu-common.mak +1 -0
index da29c6c0b2..ac76d944b8 100644
@@ -37,6 +37,7 @@ CONFIG_R4K=y
   CONFIG_MALTA=y
   CONFIG_PCNET_PCI=y
   CONFIG_MIPSSIM=y
+CONFIG_SMBUS=y

Why is the above necessary? Wouldn't CONFIG_ACPI_SMBUS=y below cause this to be done?

Yes you are correct!

Quoted 34 lines
Quoted 34 lines
default-configs/mips-softmmu-common.mak +0 -0
   CONFIG_ACPI_SMBUS=y
   CONFIG_SMBUS_EEPROM=y
   CONFIG_TEST_DEVICES=y
hw/i2c/Kconfig +6 -2
index 2bbd395813..09642a6dcb 100644
@@ -1,9 +1,13 @@
   config I2C
       bool
+config SMBUS
+    bool
+    select I2C
+
   config SMBUS_EEPROM
       bool
-    depends on I2C
+    select SMBUS
   config VERSATILE_I2C
       bool
@@ -11,7 +15,7 @@ config VERSATILE_I2C
   config ACPI_SMBUS
       bool
-    select I2C
+    select SMBUS
   config BITBANG_I2C
       bool
hw/i2c/Makefile.objs +0 -1
index d7073a401f..cbbc8507a3 100644
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_I2C) += core.o smbus_slave.o smbus_master.o
Quoted 8 lines

hw/i2c/Makefile.objs line 5

Quoted 5 lines
hw/i2c/Makefile.objs +2 -0
+common-obj-$(CONFIG_I2C) += core.o
+common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
   common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
   common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
   common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o

There is some messiness with ICH, but it appears that everything will work correctly there and this patch is not the right place to fix it.

I did some cleaning with the ICH9 chipset last year, I need to find some time to refresh it.

Quoted 5 lines

This looks fine and avoids including smbus code when it is not necessary. With the MIPS config item removed (assuming it is not necessary):

Thanks!

Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I can take it into my tree if you like.

Sure, do you mind cleaning default-configs/mips-softmmu-common.mak or you prefer a respin of this single patch?

I removed that piece and have it queued.

Thanks!

Phil.

#19 lore raw

PATCH 6/14 hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based platforms

In reply to Philippe Mathieu-Daudé

Only the PowerPC e500-based platforms use the MPC I2C controller. Do not build it for the other machines.

---
 default-configs/ppc-softmmu.mak | 1 -
 hw/ppc/Kconfig                  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +0 -1
index bf86128a0c..61b78b844d 100644
@@ -1,7 +1,6 @@
 # Default configuration for ppc-softmmu
 
 # For embedded PPCs:
-CONFIG_MPC_I2C=y
 CONFIG_DS1338=y
 CONFIG_E500=y
 CONFIG_PPC405=y
hw/ppc/Kconfig +1 -0
index f927ec9c74..0cd8d4053e 100644
@@ -105,6 +105,7 @@ config E500
     select PLATFORM_BUS
     select PPCE500_PCI
     select SERIAL
+    select MPC_I2C
 
 config VIRTEX
     bool
Signature · 1 line
2.21.0
Acked-by on v1 6/14
#20 lore raw

Re: [PATCH 06/14] hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based platforms

Quoted 4 lines · Philippe Mathieu-Daudé

Only the PowerPC e500-based platforms use the MPC I2C controller. Do not build it for the other machines.

Quoted 29 lines
---
 default-configs/ppc-softmmu.mak | 1 -
 hw/ppc/Kconfig                  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +0 -1
index bf86128a0c..61b78b844d 100644
@@ -1,7 +1,6 @@
 # Default configuration for ppc-softmmu
 
 # For embedded PPCs:
-CONFIG_MPC_I2C=y
 CONFIG_DS1338=y
 CONFIG_E500=y
 CONFIG_PPC405=y
hw/ppc/Kconfig +1 -0
index f927ec9c74..0cd8d4053e 100644
@@ -105,6 +105,7 @@ config E500
     select PLATFORM_BUS
     select PPCE500_PCI
     select SERIAL
+    select MPC_I2C
 
 config VIRTEX
     bool
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#21 lore raw

PATCH 7/14 hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices

In reply to Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

LINK ppc-softmmu/qemu-system-ppc
/usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
hw/ppc/sam460ex.c:313: undefined reference to ppc4xx_plb_init' /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to ppc405_ebc_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-ppc] Error 1

Fix by selecting the PPC405 config.

---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/Kconfig +1 -0
index 0cd8d4053e..004b7d5ad5 100644
@@ -50,6 +50,7 @@ config PPC4XX
 
 config SAM460EX
     bool
+    select PPC405
     select PFLASH_CFI01
     select IDE_SII3112
     select M41T80
Signature · 1 line
2.21.0
Reviewed-by on v1 7/14
#22 lore raw

Re: [PATCH 07/14] hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices

Quoted 9 lines · Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

LINK ppc-softmmu/qemu-system-ppc
/usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
hw/ppc/sam460ex.c:313: undefined reference to ppc4xx_plb_init' /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to ppc405_ebc_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-ppc] Error 1

Quoted 3 lines

Fix by selecting the PPC405 config.

(The 405 and 440 devices are currently entangled by both using similar parts and maybe not all of them are in 4xx yet. Because of this I'm not sure if it's worth having separate configure options for these or just have a common PPC4XX option for now until these are cleaned up to separate them.)

Regards,
BALATON Zoltan

Quoted 17 lines

---
hw/ppc/Kconfig | 1 +

1 file changed, 1 insertion(+)
hw/ppc/Kconfig +0 -0
index 0cd8d4053e..004b7d5ad5 100644
@@ -50,6 +50,7 @@ config PPC4XX
 

config SAM460EX
bool
+ select PPC405

    select PFLASH_CFI01
    select IDE_SII3112
    select M41T80
#23 lore raw

Re: [PATCH 07/14] hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices

Quoted 10 lines · BALATON Zoltan
Quoted 9 lines · Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

   LINK    ppc-softmmu/qemu-system-ppc
 /usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
 hw/ppc/sam460ex.c:313: undefined reference to ppc4xx_plb_init' /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to ppc405_ebc_init'
 collect2: error: ld returned 1 exit status
 make[1]: *** [Makefile:206: qemu-system-ppc] Error 1

Quoted 7 lines
Quoted 3 lines

Fix by selecting the PPC405 config.

(The 405 and 440 devices are currently entangled by both using similar parts and maybe not all of them are in 4xx yet. Because of this I'm not sure if it's worth having separate configure options for these or just have a common PPC4XX option for now until these are cleaned up to separate them.)

You are correct. Using a config.mak limited to CONFIG_SAM460EX=y also pulls the 440-based machines in.

Building this series with 'make ppc-softmmu/all':

$ ppc-softmmu/qemu-system-ppc -M help
Supported machines are:
bamboo               bamboo
none                 empty machine
ref405ep             ref405ep
sam460ex             aCube Sam460ex
taihu                taihu

Thanks for the review!

Quoted 21 lines

Regards,
BALATON Zoltan

Quoted 17 lines

---
hw/ppc/Kconfig | 1 +

1 file changed, 1 insertion(+)
hw/ppc/Kconfig +0 -0
index 0cd8d4053e..004b7d5ad5 100644
@@ -50,6 +50,7 @@ config PPC4XX
 

config SAM460EX
    bool
+    select PPC405
    select PFLASH_CFI01
    select IDE_SII3112
    select M41T80

Acked-by on v1 7/14
#24 lore raw

Re: [PATCH 07/14] hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices

In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

LINK ppc-softmmu/qemu-system-ppc
/usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
hw/ppc/sam460ex.c:313: undefined reference to ppc4xx_plb_init' /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to ppc405_ebc_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-ppc] Error 1

Quoted 3 lines

Fix by selecting the PPC405 config.

Quoted 16 lines
---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/Kconfig +1 -0
index 0cd8d4053e..004b7d5ad5 100644
@@ -50,6 +50,7 @@ config PPC4XX
 
 config SAM460EX
     bool
+    select PPC405
     select PFLASH_CFI01
     select IDE_SII3112
     select M41T80
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#25 lore raw

PATCH 8/14 hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices

In reply to Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

LINK ppc-softmmu/qemu-system-ppc
/usr/bin/ld: hw/ppc/virtex_ml507.o: in function `ppc440_init_xilinx':
hw/ppc/virtex_ml507.c:112: undefined reference to `ppcuic_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-ppc] Error 1
make: *** [Makefile:483: ppc-softmmu/all] Error 2

Fix by selecting the PPC4XX config.

---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/Kconfig +1 -0
index 004b7d5ad5..d8482a5e99 100644
@@ -110,6 +110,7 @@ config E500
 
 config VIRTEX
     bool
+    select PPC4XX
     select PFLASH_CFI01
     select SERIAL
     select XILINX
Signature · 1 line
2.21.0
Acked-by on v1 8/14
#26 lore raw

Re: [PATCH 08/14] hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices

Quoted 9 lines · Philippe Mathieu-Daudé

When configured with --without-default-devices, the build fails:

LINK ppc-softmmu/qemu-system-ppc
/usr/bin/ld: hw/ppc/virtex_ml507.o: in function `ppc440_init_xilinx':
hw/ppc/virtex_ml507.c:112: undefined reference to `ppcuic_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-ppc] Error 1
make: *** [Makefile:483: ppc-softmmu/all] Error 2

Quoted 3 lines

Fix by selecting the PPC4XX config.

Quoted 16 lines
---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/ppc/Kconfig +1 -0
index 004b7d5ad5..d8482a5e99 100644
@@ -110,6 +110,7 @@ config E500
 
 config VIRTEX
     bool
+    select PPC4XX
     select PFLASH_CFI01
     select SERIAL
     select XILINX
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#27 lore raw

PATCH 9/14 hw/ppc/Makefile: Simplify the sPAPR PCI objects rule

In reply to Philippe Mathieu-Daudé

The CONFIG_PSERIES already selects CONFIG_PCI.
Simplify the Makefile rules.

---
 hw/ppc/Makefile.objs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
hw/ppc/Makefile.objs +1 -4
index 101e9fc591..79adf06aa3 100644
@@ -7,14 +7,11 @@ obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o
 obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o
 obj-$(CONFIG_PSERIES) += spapr_tpm_proxy.o
 obj-$(CONFIG_SPAPR_RNG) +=  spapr_rng.o
+obj-$(call land,$(CONFIG_PSERIES),$(CONFIG_LINUX)) += spapr_pci_vfio.o spapr_pci_nvlink2.o
 # IBM PowerNV
 obj-$(CONFIG_POWERNV) += pnv.o pnv_xscom.o pnv_core.o pnv_lpc.o pnv_psi.o pnv_occ.o pnv_bmc.o
 obj-$(CONFIG_POWERNV) += pnv_homer.o pnv_pnor.o
 
-
-ifeq ($(CONFIG_PCI)$(CONFIG_PSERIES)$(CONFIG_LINUX), yyy)
-obj-y += spapr_pci_vfio.o spapr_pci_nvlink2.o
-endif
 obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
 # PowerPC 4xx boards
 obj-$(CONFIG_PPC405) += ppc405_boards.o ppc405_uc.o
Signature · 1 line
2.21.0
Acked-by on v1 9/14
#28 lore raw

Re: [PATCH 09/14] hw/ppc/Makefile: Simplify the sPAPR PCI objects rule

Quoted 4 lines · Philippe Mathieu-Daudé

The CONFIG_PSERIES already selects CONFIG_PCI.
Simplify the Makefile rules.

Quoted 24 lines
---
 hw/ppc/Makefile.objs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
hw/ppc/Makefile.objs +1 -4
index 101e9fc591..79adf06aa3 100644
@@ -7,14 +7,11 @@ obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o
 obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o
 obj-$(CONFIG_PSERIES) += spapr_tpm_proxy.o
 obj-$(CONFIG_SPAPR_RNG) +=  spapr_rng.o
+obj-$(call land,$(CONFIG_PSERIES),$(CONFIG_LINUX)) += spapr_pci_vfio.o spapr_pci_nvlink2.o
 # IBM PowerNV
 obj-$(CONFIG_POWERNV) += pnv.o pnv_xscom.o pnv_core.o pnv_lpc.o pnv_psi.o pnv_occ.o pnv_bmc.o
 obj-$(CONFIG_POWERNV) += pnv_homer.o pnv_pnor.o
 
-
-ifeq ($(CONFIG_PCI)$(CONFIG_PSERIES)$(CONFIG_LINUX), yyy)
-obj-y += spapr_pci_vfio.o spapr_pci_nvlink2.o
-endif
 obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
 # PowerPC 4xx boards
 obj-$(CONFIG_PPC405) += ppc405_boards.o ppc405_uc.o
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#29 lore raw

PATCH 10/14 hw/ppc/Kconfig: Only select fw_cfg with machines using OpenBIOS

In reply to Philippe Mathieu-Daudé

The fw_cfg helpers are only used by machines using OpenBIOS.

---
Cc: Mark Cave-Ayland <[email protected]>
Cc: "Hervé Poussineau" <[email protected]>

---
 hw/ppc/Kconfig       | 6 ++++++
 hw/ppc/Makefile.objs | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)
hw/ppc/Kconfig +6 -0
index d8482a5e99..e4ca920507 100644
@@ -72,6 +72,7 @@ config PREP
     select M48T59
     select PC87312
     select RS6000_MC
+    select FW_CFG_PPC
 
 config RS6000_MC
     bool
@@ -85,6 +86,7 @@ config MAC_OLDWORLD
     select GRACKLE_PCI
     select HEATHROW_PIC
     select MACIO
+    select FW_CFG_PPC
 
 config MAC_NEWWORLD
     bool
@@ -96,6 +98,7 @@ config MAC_NEWWORLD
     select MACIO_GPIO
     select MAC_PMU
     select UNIN_PCI
+    select FW_CFG_PPC
 
 config E500
     bool
@@ -130,3 +133,6 @@ config XIVE_KVM
     bool
     default y
     depends on XIVE_SPAPR && KVM
+
+config FW_CFG_PPC
+    bool
hw/ppc/Makefile.objs +2 -1
index 79adf06aa3..5c46c68e44 100644
@@ -1,5 +1,6 @@
 # shared objects
-obj-y += ppc.o ppc_booke.o fdt.o fw_cfg.o
+obj-y += ppc.o ppc_booke.o fdt.o
+obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
 # IBM pSeries (sPAPR)
 obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
 obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o
Signature · 1 line
2.21.0
Acked-by on v1 10/14
#30 lore raw

Re: [PATCH 10/14] hw/ppc/Kconfig: Only select fw_cfg with machines using OpenBIOS

Quoted 3 lines · Philippe Mathieu-Daudé

The fw_cfg helpers are only used by machines using OpenBIOS.

Quoted 55 lines

---
Cc: Mark Cave-Ayland <[email protected]>
Cc: "Hervé Poussineau" <[email protected]>

---
 hw/ppc/Kconfig       | 6 ++++++
 hw/ppc/Makefile.objs | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)
hw/ppc/Kconfig +6 -0
index d8482a5e99..e4ca920507 100644
@@ -72,6 +72,7 @@ config PREP
     select M48T59
     select PC87312
     select RS6000_MC
+    select FW_CFG_PPC
 
 config RS6000_MC
     bool
@@ -85,6 +86,7 @@ config MAC_OLDWORLD
     select GRACKLE_PCI
     select HEATHROW_PIC
     select MACIO
+    select FW_CFG_PPC
 
 config MAC_NEWWORLD
     bool
@@ -96,6 +98,7 @@ config MAC_NEWWORLD
     select MACIO_GPIO
     select MAC_PMU
     select UNIN_PCI
+    select FW_CFG_PPC
 
 config E500
     bool
@@ -130,3 +133,6 @@ config XIVE_KVM
     bool
     default y
     depends on XIVE_SPAPR && KVM
+
+config FW_CFG_PPC
+    bool
hw/ppc/Makefile.objs +2 -1
index 79adf06aa3..5c46c68e44 100644
@@ -1,5 +1,6 @@
 # shared objects
-obj-y += ppc.o ppc_booke.o fdt.o fw_cfg.o
+obj-y += ppc.o ppc_booke.o fdt.o
+obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
 # IBM pSeries (sPAPR)
 obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
 obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#31 lore raw

PATCH 11/14 hw/ppc/Kconfig: Only select FDT helper for machines using it

In reply to Philippe Mathieu-Daudé

Not all machines use the ppc_create_page_sizes_prop() helper.

---
Can Kconfig can restrict to TARGET_PPC64?

---
 hw/ppc/Kconfig       | 10 ++++++++++
 hw/ppc/Makefile.objs |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)
hw/ppc/Kconfig +10 -0
index e4ca920507..8e62d8f470 100644
@@ -10,6 +10,7 @@ config PSERIES
     select XICS_SPAPR
     select XIVE_SPAPR
     select MSI_NONBROKEN
+    select FDT_PPC
 
 config SPAPR_RNG
     bool
@@ -26,6 +27,7 @@ config POWERNV
     select MC146818RTC
     select XICS
     select XIVE
+    select FDT_PPC
 
 config PPC405
     bool
@@ -42,6 +44,7 @@ config PPC440
     select PCI_EXPRESS
     select PPC4XX
     select SERIAL
+    select FDT_PPC
 
 config PPC4XX
     bool
@@ -60,6 +63,7 @@ config SAM460EX
     select SMBUS_EEPROM
     select USB_EHCI_SYSBUS
     select USB_OHCI
+    select FDT_PPC
 
 config PREP
     bool
@@ -110,6 +114,7 @@ config E500
     select PPCE500_PCI
     select SERIAL
     select MPC_I2C
+    select FDT_PPC
 
 config VIRTEX
     bool
@@ -118,6 +123,7 @@ config VIRTEX
     select SERIAL
     select XILINX
     select XILINX_ETHLITE
+    select FDT_PPC
 
 config XIVE
     bool
@@ -134,5 +140,9 @@ config XIVE_KVM
     default y
     depends on XIVE_SPAPR && KVM
 
+# Only used by 64-bit targets
 config FW_CFG_PPC
     bool
+
+config FDT_PPC
+    bool
hw/ppc/Makefile.objs +2 -1
index 5c46c68e44..a4bac57be6 100644
@@ -1,5 +1,6 @@
 # shared objects
-obj-y += ppc.o ppc_booke.o fdt.o
+obj-y += ppc.o ppc_booke.o
+obj-$(CONFIG_FDT_PPC) += fdt.o
 obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
 # IBM pSeries (sPAPR)
 obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
Signature · 1 line
2.21.0
Acked-by on v1 11/14
#32 lore raw

Re: [PATCH 11/14] hw/ppc/Kconfig: Only select FDT helper for machines using it

Quoted 3 lines · Philippe Mathieu-Daudé

Not all machines use the ppc_create_page_sizes_prop() helper.

Quoted 81 lines

---
Can Kconfig can restrict to TARGET_PPC64?

---
 hw/ppc/Kconfig       | 10 ++++++++++
 hw/ppc/Makefile.objs |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)
hw/ppc/Kconfig +10 -0
index e4ca920507..8e62d8f470 100644
@@ -10,6 +10,7 @@ config PSERIES
     select XICS_SPAPR
     select XIVE_SPAPR
     select MSI_NONBROKEN
+    select FDT_PPC
 
 config SPAPR_RNG
     bool
@@ -26,6 +27,7 @@ config POWERNV
     select MC146818RTC
     select XICS
     select XIVE
+    select FDT_PPC
 
 config PPC405
     bool
@@ -42,6 +44,7 @@ config PPC440
     select PCI_EXPRESS
     select PPC4XX
     select SERIAL
+    select FDT_PPC
 
 config PPC4XX
     bool
@@ -60,6 +63,7 @@ config SAM460EX
     select SMBUS_EEPROM
     select USB_EHCI_SYSBUS
     select USB_OHCI
+    select FDT_PPC
 
 config PREP
     bool
@@ -110,6 +114,7 @@ config E500
     select PPCE500_PCI
     select SERIAL
     select MPC_I2C
+    select FDT_PPC
 
 config VIRTEX
     bool
@@ -118,6 +123,7 @@ config VIRTEX
     select SERIAL
     select XILINX
     select XILINX_ETHLITE
+    select FDT_PPC
 
 config XIVE
     bool
@@ -134,5 +140,9 @@ config XIVE_KVM
     default y
     depends on XIVE_SPAPR && KVM
 
+# Only used by 64-bit targets
 config FW_CFG_PPC
     bool
+
+config FDT_PPC
+    bool
hw/ppc/Makefile.objs +2 -1
index 5c46c68e44..a4bac57be6 100644
@@ -1,5 +1,6 @@
 # shared objects
-obj-y += ppc.o ppc_booke.o fdt.o
+obj-y += ppc.o ppc_booke.o
+obj-$(CONFIG_FDT_PPC) += fdt.o
 obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
 # IBM pSeries (sPAPR)
 obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#33 lore raw

PATCH 12/14 hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM

In reply to Philippe Mathieu-Daudé

The NMC93xx EEPROM is only used by few NIC cards and the Am53C974 SCSI controller.

---
Cc: Stefan Weil <[email protected]>

---
 hw/net/Kconfig         | 2 ++
 hw/nvram/Kconfig       | 4 ++++
 hw/nvram/Makefile.objs | 2 +-
 hw/scsi/Kconfig        | 1 +
 4 files changed, 8 insertions(+), 1 deletion(-)
hw/net/Kconfig +2 -0
index 3856417d42..af6a11baf3 100644
@@ -14,6 +14,7 @@ config EEPRO100_PCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select NMC93XX_EEPROM
 
 config PCNET_PCI
     bool
@@ -28,6 +29,7 @@ config TULIP
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select NMC93XX_EEPROM
 
 config E1000_PCI
     bool
hw/nvram/Kconfig +4 -0
index ebaa749ce9..e082a5610c 100644
@@ -7,3 +7,7 @@ config AT24C
 
 config MAC_NVRAM
     bool
+
+# NMC93XX uses the NS μWire interface (similar to SPI but less configurable)
+config NMC93XX_EEPROM
+    bool
hw/nvram/Makefile.objs +1 -1
index 26f7b4ca35..a4bdfbf187 100644
@@ -1,5 +1,5 @@
 common-obj-$(CONFIG_DS1225Y) += ds1225y.o
-common-obj-y += eeprom93xx.o
+common-obj-$(CONFIG_NMC93XX_EEPROM) += eeprom93xx.o
 common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
hw/scsi/Kconfig +1 -0
index b3ba540c17..77d397c949 100644
@@ -34,6 +34,7 @@ config ESP_PCI
     default y if PCI_DEVICES
     depends on PCI
     select ESP
+    select NMC93XX_EEPROM
 
 config SPAPR_VSCSI
     bool
Signature · 1 line
2.21.0
#34 lore raw

Re: [PATCH 12/14] hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM

Quoted 38 lines · Philippe Mathieu-Daudé

The NMC93xx EEPROM is only used by few NIC cards and the Am53C974 SCSI controller.

---
Cc: Stefan Weil <[email protected]>

---
  hw/net/Kconfig         | 2 ++
  hw/nvram/Kconfig       | 4 ++++
  hw/nvram/Makefile.objs | 2 +-
  hw/scsi/Kconfig        | 1 +
  4 files changed, 8 insertions(+), 1 deletion(-)
hw/net/Kconfig +2 -0
index 3856417d42..af6a11baf3 100644
@@ -14,6 +14,7 @@ config EEPRO100_PCI
      bool
      default y if PCI_DEVICES
      depends on PCI
+    select NMC93XX_EEPROM
 
  config PCNET_PCI
      bool
@@ -28,6 +29,7 @@ config TULIP
      bool
      default y if PCI_DEVICES
      depends on PCI
+    select NMC93XX_EEPROM
 
  config E1000_PCI
      bool
hw/nvram/Kconfig +0 -0
index ebaa749ce9..e082a5610c 100644

hw/nvram/Kconfig config AT24C · line 11

Quoted 5 lines
hw/nvram/Kconfig +2 -0
@@ -7,3 +7,7 @@ config AT24C
 
  config MAC_NVRAM
      bool
+
+# NMC93XX uses the NS μWire interface (similar to SPI but less configurable)

Ah this line triggers:

Traceback (most recent call last):
File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line
700, in <module>
parser.parse_file(fp)
File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line
362, in parse_file
self.parse_config()
File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line
575, in parse_config
self.parse_clause()
File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line
564, in parse_clause
self.do_include(val)
File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line
413, in do_include
KconfigParser(self.data).parse_file(fp)
File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line
355, in parse_file
self.src = fp.read()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 138: ordinal not in range(128)

Quoted 26 lines
hw/nvram/Kconfig +2 -0
+config NMC93XX_EEPROM
+    bool
hw/nvram/Makefile.objs +1 -1
index 26f7b4ca35..a4bdfbf187 100644
@@ -1,5 +1,5 @@
  common-obj-$(CONFIG_DS1225Y) += ds1225y.o
-common-obj-y += eeprom93xx.o
+common-obj-$(CONFIG_NMC93XX_EEPROM) += eeprom93xx.o
  common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
  common-obj-y += fw_cfg.o
  common-obj-y += chrp_nvram.o
hw/scsi/Kconfig +1 -0
index b3ba540c17..77d397c949 100644
@@ -34,6 +34,7 @@ config ESP_PCI
      default y if PCI_DEVICES
      depends on PCI
      select ESP
+    select NMC93XX_EEPROM
 
  config SPAPR_VSCSI
      bool
#35 lore raw

Re: [PATCH 12/14] hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM

Quoted 34 lines · Philippe Mathieu-Daudé
Quoted 33 lines · Philippe Mathieu-Daudé

The NMC93xx EEPROM is only used by few NIC cards and the Am53C974 SCSI controller.

---
Cc: Stefan Weil <[email protected]>
---
  hw/net/Kconfig         | 2 ++
  hw/nvram/Kconfig       | 4 ++++
  hw/nvram/Makefile.objs | 2 +-
  hw/scsi/Kconfig        | 1 +

  4 files changed, 8 insertions(+), 1 deletion(-)
hw/net/Kconfig +0 -0
index 3856417d42..af6a11baf3 100644
@@ -14,6 +14,7 @@ config EEPRO100_PCI

      bool
      default y if PCI_DEVICES
      depends on PCI
+    select NMC93XX_EEPROM
    config PCNET_PCI
      bool

hw/net/Kconfig +0 -0
@@ -28,6 +29,7 @@ config TULIP

      bool
      default y if PCI_DEVICES
      depends on PCI
+    select NMC93XX_EEPROM
    config E1000_PCI
      bool

hw/nvram/Kconfig +0 -0
index ebaa749ce9..e082a5610c 100644
Quoted 8 lines
Quoted 8 lines
hw/nvram/Kconfig +0 -0
@@ -7,3 +7,7 @@ config AT24C

    config MAC_NVRAM
      bool

hw/nvram/Kconfig +2 -0
+
+# NMC93XX uses the NS μWire interface (similar to SPI but less

configurable)

Changed to uWire. Gotta love Python 3. :)

Paolo

Quoted 52 lines

Ah this line triggers:

Traceback (most recent call last):
  File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line 700, in <module>
    parser.parse_file(fp)
  File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line 362, in parse_file
    self.parse_config()
  File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line 575, in parse_config
    self.parse_clause()
  File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line 564, in parse_clause
    self.do_include(val)
  File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line 413, in do_include KconfigParser(self.data).parse_file(fp)
  File "/root/src/github.com/philmd/qemu/scripts/minikconf.py", line 355, in parse_file
    self.src = fp.read()
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 138: ordinal not in range(128)

Quoted 25 lines
hw/nvram/Kconfig +2 -0
+config NMC93XX_EEPROM
+    bool
hw/nvram/Makefile.objs +0 -0
index 26f7b4ca35..a4bdfbf187 100644
@@ -1,5 +1,5 @@

  common-obj-$(CONFIG_DS1225Y) += ds1225y.o

hw/nvram/Makefile.objs +1 -1
-common-obj-y += eeprom93xx.o
+common-obj-$(CONFIG_NMC93XX_EEPROM) += eeprom93xx.o

  common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
  common-obj-y += fw_cfg.o
  common-obj-y += chrp_nvram.o

hw/scsi/Kconfig +0 -0
index b3ba540c17..77d397c949 100644
@@ -34,6 +34,7 @@ config ESP_PCI

      default y if PCI_DEVICES
      depends on PCI
      select ESP
+    select NMC93XX_EEPROM
    config SPAPR_VSCSI
      bool

#36 lore raw

PATCH 13/14 hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or SLOF

In reply to Philippe Mathieu-Daudé

Only the OpenBIOS and SLOF firmwares use the CHRP NVRAM layout.

---
 hw/nvram/Kconfig       | 4 ++++
 hw/nvram/Makefile.objs | 2 +-
 hw/ppc/Kconfig         | 1 +
 hw/sparc/Kconfig       | 1 +
 hw/sparc64/Kconfig     | 1 +
 5 files changed, 8 insertions(+), 1 deletion(-)
hw/nvram/Kconfig +4 -0
index e082a5610c..0d2ba531ac 100644
@@ -7,7 +7,11 @@ config AT24C
 
 config MAC_NVRAM
     bool
+    select CHRP_NVRAM
 
 # NMC93XX uses the NS μWire interface (similar to SPI but less configurable)
 config NMC93XX_EEPROM
     bool
+
+config CHRP_NVRAM
+    bool
hw/nvram/Makefile.objs +1 -1
index a4bdfbf187..090df63fcd 100644
@@ -2,7 +2,7 @@ common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-$(CONFIG_NMC93XX_EEPROM) += eeprom93xx.o
 common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
-common-obj-y += chrp_nvram.o
+common-obj-$(CONFIG_CHRP_NVRAM) += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
 obj-$(CONFIG_PSERIES) += spapr_nvram.o
 obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o
hw/ppc/Kconfig +1 -0
index 8e62d8f470..e27efe9a24 100644
@@ -11,6 +11,7 @@ config PSERIES
     select XIVE_SPAPR
     select MSI_NONBROKEN
     select FDT_PPC
+    select CHRP_NVRAM
 
 config SPAPR_RNG
     bool
hw/sparc/Kconfig +1 -0
index 2a83a8010e..22aff2f5b7 100644
@@ -12,6 +12,7 @@ config SUN4M
     select LANCE
     select M48T59
     select STP2000
+    select CHRP_NVRAM
 
 config LEON3
     bool
hw/sparc64/Kconfig +1 -0
index f9f8b0f73a..980a201bb7 100644
@@ -12,6 +12,7 @@ config SUN4U
     select IDE_CMD646
     select PCKBD
     select SIMBA
+    select CHRP_NVRAM
 
 config NIAGARA
     bool
Signature · 1 line
2.21.0
Acked-by on v1 13/14
#37 lore raw

Re: [PATCH 13/14] hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or SLOF

Quoted 3 lines · Philippe Mathieu-Daudé

Only the OpenBIOS and SLOF firmwares use the CHRP NVRAM layout.

Quoted 73 lines
---
 hw/nvram/Kconfig       | 4 ++++
 hw/nvram/Makefile.objs | 2 +-
 hw/ppc/Kconfig         | 1 +
 hw/sparc/Kconfig       | 1 +
 hw/sparc64/Kconfig     | 1 +
 5 files changed, 8 insertions(+), 1 deletion(-)
hw/nvram/Kconfig +4 -0
index e082a5610c..0d2ba531ac 100644
@@ -7,7 +7,11 @@ config AT24C
 
 config MAC_NVRAM
     bool
+    select CHRP_NVRAM
 
 # NMC93XX uses the NS μWire interface (similar to SPI but less configurable)
 config NMC93XX_EEPROM
     bool
+
+config CHRP_NVRAM
+    bool
hw/nvram/Makefile.objs +1 -1
index a4bdfbf187..090df63fcd 100644
@@ -2,7 +2,7 @@ common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-$(CONFIG_NMC93XX_EEPROM) += eeprom93xx.o
 common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
-common-obj-y += chrp_nvram.o
+common-obj-$(CONFIG_CHRP_NVRAM) += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
 obj-$(CONFIG_PSERIES) += spapr_nvram.o
 obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o
hw/ppc/Kconfig +1 -0
index 8e62d8f470..e27efe9a24 100644
@@ -11,6 +11,7 @@ config PSERIES
     select XIVE_SPAPR
     select MSI_NONBROKEN
     select FDT_PPC
+    select CHRP_NVRAM
 
 config SPAPR_RNG
     bool
hw/sparc/Kconfig +1 -0
index 2a83a8010e..22aff2f5b7 100644
@@ -12,6 +12,7 @@ config SUN4M
     select LANCE
     select M48T59
     select STP2000
+    select CHRP_NVRAM
 
 config LEON3
     bool
hw/sparc64/Kconfig +1 -0
index f9f8b0f73a..980a201bb7 100644
@@ -12,6 +12,7 @@ config SUN4U
     select IDE_CMD646
     select PCKBD
     select SIMBA
+    select CHRP_NVRAM
 
 config NIAGARA
     bool
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#38 lore raw

RFC PATCH 14/14 hw/intc/Kconfig: Let APIC select IOAPIC

In reply to Philippe Mathieu-Daudé

apic_eoi() calls ioapic_eoi_broadcast(), so APIC has to select the IOAPIC Kconfig.

---
Cc: "Michael S. Tsirkin" <[email protected]>

RFC because I'm not sure the design is correct (meanwhile the fix is, however).

---
 hw/intc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/intc/Kconfig +1 -0
index a189d6fedd..82748ae13d 100644
@@ -24,6 +24,7 @@ config APIC
     bool
     select MSI_NONBROKEN
     select I8259
+    select IOAPIC
 
 config ARM_GIC_KVM
     bool
Signature · 1 line
2.21.0
#39 lore raw

Re: [RFC PATCH 14/14] hw/intc/Kconfig: Let APIC select IOAPIC

Quoted 8 lines · Philippe Mathieu-Daudé

apic_eoi() calls ioapic_eoi_broadcast(), so APIC has to select the IOAPIC Kconfig.

---
Cc: "Michael S. Tsirkin" <[email protected]>

RFC because I'm not sure the design is correct (meanwhile the fix is, however).

Just add a comment like "# for ioapic_eoi_broadcast()". If anybody wants to drop it, they can add a stub.

Paolo

Quoted 17 lines
---
 hw/intc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/intc/Kconfig +1 -0
index a189d6fedd..82748ae13d 100644
@@ -24,6 +24,7 @@ config APIC
     bool
     select MSI_NONBROKEN
     select I8259
+    select IOAPIC
 
 config ARM_GIC_KVM
     bool
#40 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 5 lines · Philippe Mathieu-Daudé

Various fixes when configured with --without-default-devices and building each machine individually.
Adding the corresponding CI tests is out of the scope of this series.

Quoted 7 lines

This series is pushed on top of "hw/i386: Allow building machines without IOMMU" [*] here:
https://gitlab.com/philmd/qemu/commits/kconfig_misc_fixes

Happy new year!

[*] https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg05230.html

Queued these:

hw/intc/i8259: Fix Kconfig dependency on ISA bus hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based platforms hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices hw/ppc/Makefile: Simplify the sPAPR PCI objects rule hw/ppc/Kconfig: Only select fw_cfg with machines using OpenBIOS hw/ppc/Kconfig: Only select FDT helper for machines using it hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or SLOF

Thanks David for the acks.

Paolo

Quoted 36 lines

Philippe Mathieu-Daudé (14):
hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled hw/intc/i8259: Fix Kconfig dependency on ISA bus hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config hw/i386: Restrict fw_cfg to the PC machines hw/i2c/Kconfig: Add an entry for the SMBus
hw/ppc/Kconfig: Restrict the MPC I2C controller to e500-based
platforms
hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices hw/ppc/Kconfig: Let the Xilinx Virtex5 ML507 use the PPC-440 devices hw/ppc/Makefile: Simplify the sPAPR PCI objects rule hw/ppc/Kconfig: Only select fw_cfg with machines using OpenBIOS hw/ppc/Kconfig: Only select FDT helper for machines using it hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM hw/nvram/Kconfig: Restrict CHRP NVRAM to machines using OpenBIOS or
SLOF
hw/intc/Kconfig: Let APIC select IOAPIC

 default-configs/mips-softmmu-common.mak |  1 +
 default-configs/ppc-softmmu.mak         |  1 -
 hw/i2c/Kconfig                          |  8 ++++++--
 hw/i2c/Makefile.objs                    |  3 ++-
 hw/i386/Kconfig                         |  2 +-
 hw/i386/Makefile.objs                   |  2 +-
 hw/intc/Kconfig                         |  2 ++
 hw/net/Kconfig                          |  2 ++
 hw/nvram/Kconfig                        |  8 ++++++++
 hw/nvram/Makefile.objs                  |  4 ++--
 hw/ppc/Kconfig                          | 20 ++++++++++++++++++++
 hw/ppc/Makefile.objs                    |  9 ++++-----
 hw/scsi/Kconfig                         |  1 +
 hw/sparc/Kconfig                        |  1 +
 hw/sparc64/Kconfig                      |  1 +
 hw/usb/Makefile.objs                    |  2 ++
 16 files changed, 54 insertions(+), 13 deletions(-)