]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
build: convert pci.mak to Kconfig
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Jan 2019 06:56:04 +0000 (14:56 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Mar 2019 20:45:53 +0000 (21:45 +0100)
Instead of including the same list of devices for each target,
set CONFIG_PCI to true, and make the devices default to present
whenever PCI is available.  However, s390x does not want all the
PCI devices, so there is a separate symbol to enable them.

Done mostly with the following script:

  while read i; do
     i=${i%=y}; i=${i#CONFIG_}
     sed -i -e'/^config '$i'$/!b' -en \
            -e'a\' -e'    default y if PCI_DEVICES\' -e'    depends on PCI' \
          `grep -lw $i hw/*/Kconfig`
  done < default-configs/pci.mak

followed by replacing a few "depends on" clauses with "select"
whenever the symbol is not really related to PCI.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-31-yang.zhong@intel.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
30 files changed:
default-configs/alpha-softmmu.mak
default-configs/arm-softmmu.mak
default-configs/hppa-softmmu.mak
default-configs/i386-softmmu.mak
default-configs/mips-softmmu-common.mak
default-configs/mips64el-softmmu.mak
default-configs/pci.mak [deleted file]
default-configs/ppc-softmmu.mak
default-configs/riscv32-softmmu.mak
default-configs/riscv64-softmmu.mak
default-configs/sh4-softmmu.mak
default-configs/sh4eb-softmmu.mak
default-configs/sparc64-softmmu.mak
docs/devel/build-system.txt
hw/audio/Kconfig
hw/block/Kconfig
hw/char/Kconfig
hw/display/Kconfig
hw/ide/Kconfig
hw/ipack/Kconfig
hw/misc/Kconfig
hw/net/Kconfig
hw/pci-bridge/Kconfig
hw/pci-host/Kconfig
hw/pci/Kconfig
hw/scsi/Kconfig
hw/sd/Kconfig
hw/usb/Kconfig
hw/virtio/Kconfig
hw/watchdog/Kconfig

index 3fd656e14f66324581c1bcaebdbee9c6715b08c8..d19d920fc31f189b3d274200f59afceef86f856b 100644 (file)
@@ -1,7 +1,8 @@
 # Default configuration for alpha-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_I82374=y
index b430be5dd9a12ce24ef6d4458a6e596016144a8c..e9a972f9c882d085dfbc1ef056aaee768ec003fc 100644 (file)
@@ -1,7 +1,8 @@
 # Default configuration for arm-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
@@ -163,3 +164,7 @@ CONFIG_PCI_EXPRESS_DESIGNWARE=y
 CONFIG_STRONGARM=y
 CONFIG_HIGHBANK=y
 CONFIG_MUSICPAL=y
+
+# for realview and versatilepb
+CONFIG_SCSI=y
+CONFIG_LSI_SCSI_PCI=y
index e0a6cdcad1fc720622dfdae06d65ad9489bf05aa..85a201184aedcdf45a89bd382d87dd5287d60e76 100644 (file)
@@ -1,5 +1,6 @@
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_ISA_BUS=y
@@ -7,6 +8,8 @@ CONFIG_I8259=y
 CONFIG_E1000_PCI=y
 CONFIG_IDE_CMD646=y
 # CONFIG_IDE_MMIO=y
+CONFIG_SCSI=y
+CONFIG_LSI_SCSI_PCI=y
 CONFIG_VIRTIO_VGA=y
 CONFIG_MC146818RTC=y
 CONFIG_DINO=y
index 256443ebfaea376923e16d1ec4a6e7454efb6b8e..80c4b49eb079b01ab2f6fbd79fae1203912cf481 100644 (file)
@@ -1,12 +1,12 @@
 # Default configuration for i386-softmmu
 
-include pci.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 include sound.mak
 include usb.mak
 include hyperv.mak
 CONFIG_TEST_DEVICES=y
 CONFIG_VGA_ISA=y
-CONFIG_VGA_CIRRUS=y
 CONFIG_VMWARE_VGA=y
 CONFIG_VMXNET3_PCI=y
 CONFIG_VIRTIO_VGA=y
@@ -54,7 +54,6 @@ CONFIG_MEM_DEVICE=y
 CONFIG_DIMM=y
 CONFIG_NVDIMM=y
 CONFIG_ACPI_NVDIMM=y
-CONFIG_PCIE_PORT=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
index 331bdc5c18048fd2b435be316730abce3a188280..88f28e504040f4bc43523cd2c11775a9606adb9d 100644 (file)
@@ -1,8 +1,9 @@
 # Common mips*-softmmu CONFIG defines
 
-include pci.mak
 include sound.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_ESP=y
 CONFIG_SCSI=y
 CONFIG_VGA_ISA=y
index c6ad4dab4ebe3ffc135a1522b753b605d61efd22..8b255efc5489ffe9ea4e328c96ff5d09a88c62dd 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_JAZZ=y
 CONFIG_G364FB=y
 CONFIG_JAZZ_LED=y
 CONFIG_VT82C686=y
+CONFIG_AHCI=y
 CONFIG_MIPS_BOSTON=y
 CONFIG_FITLOADER=y
 CONFIG_PCI_EXPRESS=y
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
deleted file mode 100644 (file)
index 41af5e7..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-CONFIG_PCI=y
-# For now, CONFIG_IDE_CORE requires ISA, so we enable it here
-CONFIG_ISA_BUS=y
-CONFIG_VIRTIO_PCI=y
-include virtio.mak
-CONFIG_USB_UHCI=y
-CONFIG_USB_OHCI=y
-CONFIG_USB_EHCI=y
-CONFIG_USB_XHCI=y
-CONFIG_USB_XHCI_NEC=y
-CONFIG_NE2000_PCI=y
-CONFIG_EEPRO100_PCI=y
-CONFIG_PCNET_PCI=y
-CONFIG_PCNET_COMMON=y
-CONFIG_AC97=y
-CONFIG_HDA=y
-CONFIG_ES1370=y
-CONFIG_SCSI=y
-CONFIG_LSI_SCSI_PCI=y
-CONFIG_VMW_PVSCSI_SCSI_PCI=y
-CONFIG_MEGASAS_SCSI_PCI=y
-CONFIG_MPTSAS_SCSI_PCI=y
-CONFIG_RTL8139_PCI=y
-CONFIG_E1000_PCI=y
-CONFIG_E1000E_PCI_EXPRESS=y
-CONFIG_AHCI=y
-CONFIG_ESP=y
-CONFIG_ESP_PCI=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
-CONFIG_SERIAL_PCI=y
-CONFIG_CAN_BUS=y
-CONFIG_CAN_SJA1000=y
-CONFIG_CAN_PCI=y
-CONFIG_IPACK=y
-CONFIG_WDT_IB6300ESB=y
-CONFIG_PCI_TESTDEV=y
-CONFIG_NVME_PCI=y
-CONFIG_SD=y
-CONFIG_SDHCI=y
-CONFIG_EDU=y
-CONFIG_VGA=y
-CONFIG_VGA_PCI=y
-CONFIG_BOCHS_DISPLAY=y
-CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
-CONFIG_ROCKER=y
-CONFIG_VFIO_PCI=y
-CONFIG_EDID=y
index 5c576fef8574dec2657d337b45cd92d5d1c3cb96..f47c06916f6a6432b1a3e789c6f45cc0cd3753e7 100644 (file)
@@ -1,8 +1,9 @@
 # Default configuration for ppc-softmmu
 
-include pci.mak
 include sound.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_TEST_DEVICES=y
 
 # For embedded PPCs:
index 8c3a91a18572479d84d734ec326c965476d7a745..5501c1b884d8a77943535b7eed68a4f4925c4444 100644 (file)
@@ -1,8 +1,8 @@
 # Default configuration for riscv-softmmu
 
-include pci.mak
 include usb.mak
-
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_VIRTIO_MMIO=y
 
index 8c3a91a18572479d84d734ec326c965476d7a745..5501c1b884d8a77943535b7eed68a4f4925c4444 100644 (file)
@@ -1,8 +1,8 @@
 # Default configuration for riscv-softmmu
 
-include pci.mak
 include usb.mak
-
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_VIRTIO_MMIO=y
 
index 38c7290186faed9ba17736ca5b7fc7ddd193c93e..4c33d341d97b60e345529c87065c14b7e31ac12c 100644 (file)
@@ -1,7 +1,8 @@
 # Default configuration for sh4-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
index c966ccafacf303ce6bf39ec924668a5a2bdd4974..71f81dad1357596261619789635d11ca16c1ae0c 100644 (file)
@@ -1,7 +1,8 @@
 # Default configuration for sh4eb-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
index b17513beed6bfcb6d91c41bfea023d0079b4df98..cb707983888c9a32e0fcab07361bced8447f4a8e 100644 (file)
@@ -1,7 +1,8 @@
 # Default configuration for sparc64-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_M48T59=y
 CONFIG_PTIMER=y
 CONFIG_SERIAL=y
index f9fd27fab0c7293cf31d2eb0042ba9a2a7faad5d..addd274eebd9f0d75418cb2a7f4a3383e8d09ba0 100644 (file)
@@ -417,7 +417,6 @@ into each QEMU system and userspace emulator targets. They merely
 contain a long list of config variable definitions. For example,
 default-configs/x86_64-softmmu.mak has:
 
-  include pci.mak
   include sound.mak
   include usb.mak
   CONFIG_QXL=$(CONFIG_SPICE)
index 207baee6e1c0827c2b7ec36120fac82f0b4f12e8..aa5c82bd0a4520c4965a222c594a9704d5f066f2 100644 (file)
@@ -3,9 +3,13 @@ config SB16
 
 config ES1370
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config AC97
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config ADLIB
     bool
@@ -18,6 +22,8 @@ config CS4231A
 
 config HDA
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config PCSPK
     bool
index 65431c47f2ece0037e405c348b8085632f533d46..b60e2ab87270f7f92fe57b23f9a635dc3b86e9f7 100644 (file)
@@ -21,6 +21,8 @@ config ONENAND
 
 config NVME_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VIRTIO_BLK
     bool
index 26c13243cf97e3462665e5b11a209334b02d2dc7..6eba69a64f5d1e204a0a1506a24cdaf80fb5ba4d 100644 (file)
@@ -15,6 +15,8 @@ config SERIAL_ISA
 
 config SERIAL_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VIRTIO_SERIAL
     bool
index 1149ea2bcdd72c7dc8469cd51a3fad5b349b545e..9199beb44743fa6264d2c6b2f770cf712f0396b1 100644 (file)
@@ -9,6 +9,9 @@ config ADS7846
 
 config VGA_CIRRUS
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config G364FB
     bool
@@ -30,6 +33,9 @@ config SSD0323
 
 config VGA_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config VGA_ISA
     bool
@@ -39,9 +45,15 @@ config VGA_ISA_MM
 
 config VMWARE_VGA
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config BOCHS_DISPLAY
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config BLIZZARD
     bool
@@ -69,12 +81,16 @@ config VGA
 config QXL
     bool
     depends on SPICE && PCI
+    select VGA
 
 config VIRTIO_GPU
     bool
 
 config VIRTIO_VGA
     bool
+    default y if PCI_DEVICES
+    depends on VIRTIO_PCI
+    select VGA
 
 config DPCD
     bool
index fe2770579040ae4f4d8c0f4981ee4010d1f280f5..246e27b9e8dc3ea986d044ea6ae393075f71b013 100644 (file)
@@ -7,6 +7,7 @@ config IDE_QDEV
 
 config IDE_PCI
     bool
+    depends on PCI
     select IDE_CORE
 
 config IDE_ISA
@@ -42,6 +43,8 @@ config MICRODRIVE
 
 config AHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
     select IDE_QDEV
 
 config IDE_SII3112
index 481e0d2e64c3d0a1b7d05b33bed199e9774ef886..f8da24a62be8e760e6287d315d98fdabf127fa14 100644 (file)
@@ -1,2 +1,4 @@
 config IPACK
     bool
+    default y if PCI_DEVICES
+           depends on PCI
index fc068efdfdd2728743fb70b1492d6fcf53c11517..1c6964d75fabb203ab0f39626554b616851db93f 100644 (file)
@@ -21,9 +21,13 @@ config ISA_TESTDEV
 
 config PCI_TESTDEV
     bool
+    default y if TEST_DEVICES
+    depends on PCI
 
 config EDU
     bool
+    default y if TEST_DEVICES
+    depends on PCI
 
 config PCA9552
     bool
@@ -48,7 +52,7 @@ config MACIO
 
 config IVSHMEM_DEVICE
     bool
-    default y
+    default y if PCI_DEVICES
     depends on PCI && LINUX && IVSHMEM
 
 config ECCMEMCTL
index ad56fc0d7b9093ab98477d2a8f5f1338c8b71d68..c8df8498452f1fa1e35aa06e3b00b9f6b3608076 100644 (file)
@@ -3,27 +3,42 @@ config DP8393X
 
 config NE2000_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config EEPRO100_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config PCNET_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select PCNET_COMMON
 
 config PCNET_COMMON
     bool
 
 config E1000_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config E1000E_PCI_EXPRESS
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config RTL8139_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VMXNET3_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config SMC91C111
     bool
@@ -81,12 +96,20 @@ config ETSEC
 
 config ROCKER
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config CAN_BUS
     bool
 
 config CAN_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select CAN_BUS
 
 config CAN_SJA1000
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select CAN_BUS
index bb19b7aac1cd29290f4390de67cc84d8e52ac9b1..0519eb1f670a1d9f01d2ddd39a5352ae96db16c6 100644 (file)
@@ -1,17 +1,25 @@
 config PCIE_PORT
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config PXB
     bool
 
 config XIO3130
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config IOH3420
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config I82801B11
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config DEC_PCI
     bool
index 2edc5bbc9a3a064361d6efb8fb4352b721deedd6..c01812a316d52c5fb9b6ad9b1d483b527d25367f 100644 (file)
@@ -2,21 +2,27 @@ config PAM
     bool
 
 config PREP_PCI
+    select PCI
     bool
 
 config GRACKLE_PCI
+    select PCI
     bool
 
 config UNIN_PCI
+    select PCI
     bool
 
 config PPCE500_PCI
+    select PCI
     bool
 
 config VERSATILE_PCI
+    select PCI
     bool
 
 config PCI_SABRE
+    select PCI
     bool
 
 config PCI_PIIX
@@ -24,12 +30,16 @@ config PCI_PIIX
 
 config PCI_EXPRESS_Q35
     bool
+    select PCI_EXPRESS
 
 config PCI_EXPRESS_GENERIC_BRIDGE
     bool
+    select PCI_EXPRESS
 
 config PCI_EXPRESS_XILINX
     bool
+    select PCI_EXPRESS
 
 config PCI_EXPRESS_DESIGNWARE
     bool
+    select PCI_EXPRESS
index 4ca2537980662d8121d09e471e9f9cc273b57d87..3b8638b51d70abeb9cbf6277e9ab3a70c02953e1 100644 (file)
@@ -4,3 +4,6 @@ config PCI
 config PCI_EXPRESS
     bool
     select PCI
+
+config PCI_DEVICES
+    bool
index a3518a3754e5924116efe353440fd4a415bb4775..a7d25d326185ef2efbea721acf2ac525fb01ba48 100644 (file)
@@ -3,21 +3,32 @@ config SCSI
 
 config LSI_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config MPTSAS_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config MEGASAS_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VMW_PVSCSI_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config ESP
     bool
 
 config ESP_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select ESP
 
 config SPAPR_VSCSI
     bool
index 4f43bbb352a2ba447e9364f1398e099e9d7423b5..c6c5dfb09f5c3de6297d7775f22c6c73c4bf4de7 100644 (file)
@@ -9,3 +9,6 @@ config SD
 
 config SDHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select SD
index cbf5c5d761d5aa14e58ac1aec086687520e4384b..86ee615022f51473fc153c2688fd4f43450b49b2 100644 (file)
@@ -3,21 +3,31 @@ config USB
 
 config USB_UHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_OHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_EHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_EHCI_SYSBUS
     bool
 
 config USB_XHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_XHCI_NEC
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_MUSB
     bool
index ebf18124fb47057f1dd71eefbbb5d0b287ecf635..5dafbe35e126cff50d4186398663036c1dfda2ff 100644 (file)
@@ -6,6 +6,9 @@ config VIRTIO_RNG
 
 config VIRTIO_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VIRTIO
 
 config VIRTIO_MMIO
     bool
index cd0244f4e1c339a653f2087cf0e30e1f2ea7e977..edb3d42ce91ad561e5cb15b9bfba66055a768199 100644 (file)
@@ -3,6 +3,8 @@ config CMSDK_APB_WATCHDOG
 
 config WDT_IB6300ESB
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config WDT_IB700
     bool